blob: 397332b819cc9ee91e5334f5091e9d369683bb0e [file] [log] [blame]
package org.eclipse.ui;
/*
* Copyright (c) 2002 IBM Corp. All rights reserved.
* This file is made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*/
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IAdaptable;
/**
* The IContributorResourceAdapter is an interface that defines
* the API required to get a resource that an object adapts to
* for use of object contributions, decorators and property
* pages that have adaptable = true.
* Implementors of this interface are typically registered with an
* IAdapterFactory for lookup via the getAdapter() mechanism.
*/
public interface IContributorResourceAdapter {
/**
* Return the resource that the supplied adaptable
* adapts to. An IContributorResourceAdapter assumes
* that any object passed to it adapts to one equivalent
* resource.
* @return <code>IResource</code> or <code>null</code> if there
* is no adapted resource for this type.
* @param IAdaptable the adaptable being queried.
*/
public IResource getAdaptedResource(IAdaptable adaptable);
}