01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 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.ide;
11:
12: import org.eclipse.core.resources.mapping.ResourceMapping;
13: import org.eclipse.core.runtime.IAdaptable;
14: import org.eclipse.ui.IContributorResourceAdapter;
15:
16: /**
17: * An extension to the <code>IContributorResourceAdapter</code> that adapts
18: * a model object to a <code>ResourceMapping</code>.
19: *
20: * @since 3.2
21: */
22: public interface IContributorResourceAdapter2 extends
23: IContributorResourceAdapter {
24:
25: /**
26: * Return the resource mapping that the supplied adaptable
27: * adapts to. An <code>IContributorResourceAdapter2</code> assumes
28: * that any object passed to it adapts to one equivalent
29: * resource mapping.
30: *
31: * @param adaptable the adaptable being queried
32: * @return a resource mapping, or <code>null</code> if there
33: * is no adapted resource mapping for this type
34: */
35: public ResourceMapping getAdaptedResourceMapping(
36: IAdaptable adaptable);
37: }
|