KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > IObjectContributor


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal;
12
13 /**
14  * Objects of classes that implement this interface
15  * can be registered for certain object type
16  * in the IObjectContributorManager. Unlike with extenders,
17  * all the matching contributors will be processed
18  * in a sequence.
19  * <p>By implementing 'isApplicableTo' method,
20  * a contributor can tell the manager to skip it
21  * if the object is of the desired type, but its
22  * other properties do not match additional
23  * requirements imposed by the contributor.
24  *
25  */

26
27 public interface IObjectContributor {
28     /**
29      * Returns true if this contributor should be considered
30      * for the given object.
31      * @param object the object to text
32      * @return boolean
33      */

34     public boolean isApplicableTo(Object JavaDoc object);
35
36     /**
37      * Return whether or not the receiver can adapt to IResource.
38      * @return boolean
39      */

40     public boolean canAdapt();
41 }
42
Popular Tags