1 /*******************************************************************************
2  * Copyright (c) 2000, 2015 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.ui.ide;
15 
16 import org.eclipse.core.resources.mapping.ResourceMapping;
17 import org.eclipse.core.runtime.IAdaptable;
18 import org.eclipse.ui.IContributorResourceAdapter;
19 
20 /**
21  * An extension to the <code>IContributorResourceAdapter</code> that adapts
22  * a model object to a <code>ResourceMapping</code>.
23  *
24  * @since 3.2
25  */
26 public interface IContributorResourceAdapter2 extends IContributorResourceAdapter {
27 
28 	/**
29 	 * Return the resource mapping that the supplied adaptable
30 	 * adapts to. An <code>IContributorResourceAdapter2</code> assumes
31 	 * that any object passed to it adapts to one equivalent
32 	 * resource mapping.
33 	 *
34 	 * @param adaptable the adaptable being queried
35 	 * @return a resource mapping, or <code>null</code> if there
36 	 *  is no adapted resource mapping for this type
37 	 */
getAdaptedResourceMapping(IAdaptable adaptable)38 	public ResourceMapping getAdaptedResourceMapping(IAdaptable adaptable);
39 }
40