KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > IContributorResourceAdapter


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;
12
13 import org.eclipse.core.resources.IResource;
14 import org.eclipse.core.runtime.IAdaptable;
15
16 /**
17  * The IContributorResourceAdapter is an interface that defines
18  * the API required to get a resource that an object adapts to
19  * for use of object contributions, decorators and property
20  * pages that have adaptable = true.
21  * Implementors of this interface are typically registered with an
22  * IAdapterFactory for lookup via the getAdapter() mechanism.
23  */

24 public interface IContributorResourceAdapter {
25
26     /**
27      * Return the resource that the supplied adaptable
28      * adapts to. An IContributorResourceAdapter assumes
29      * that any object passed to it adapts to one equivalent
30      * resource.
31      *
32      * @param adaptable the adaptable being queried
33      * @return a resource, or <code>null</code> if there
34      * is no adapted resource for this type
35      */

36     public IResource getAdaptedResource(IAdaptable adaptable);
37
38 }
39
40
Popular Tags