01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal;
11:
12: /**
13: * Objects of classes that implement this interface
14: * can be registered for certain object type
15: * in the IObjectContributorManager. Unlike with extenders,
16: * all the matching contributors will be processed
17: * in a sequence.
18: * <p>By implementing 'isApplicableTo' method,
19: * a contributor can tell the manager to skip it
20: * if the object is of the desired type, but its
21: * other properties do not match additional
22: * requirements imposed by the contributor.
23: *
24: */
25:
26: public interface IObjectContributor {
27: /**
28: * Returns true if this contributor should be considered
29: * for the given object.
30: * @param object the object to text
31: * @return boolean
32: */
33: public boolean isApplicableTo(Object object);
34:
35: /**
36: * Return whether or not the receiver can adapt to IResource.
37: * @return boolean
38: */
39: public boolean canAdapt();
40: }
|