| java.lang.Object org.eclipse.ui.BasicWorkingSetElementAdapter
BasicWorkingSetElementAdapter | final public class BasicWorkingSetElementAdapter implements IWorkingSetElementAdapter,IExecutableExtension(Code) | | Basic IWorkingSetElementAdapter implementation that allows plugins to decribe
simple declarative element adapters.
The executable extension format for this class is as follows:
<workingSet
elementAdapterClass="org.eclipse.ui.BasicWorkingSetElementAdapter:class1.to.adapt.to[;option1=value1][;option2=value2],class2.to.adapt.to[;option1=value1][;option2=value2],...">
... </workingSet>
The valid options are:
- adapt
- Values:
true or true . Specifies whether
or not the platform
org.eclipse.core.runtime.IAdapterManager and the
org.eclipse.core.runtime.IAdaptable interface should be consulted.
Please see the
BasicWorkingSetElementAdapter.adaptElements(IWorkingSet,IAdaptable[]) method for
details on behavior of this implementation.
since: 3.3 |
Method Summary | |
public IAdaptable[] | adaptElements(IWorkingSet ws, IAdaptable[] elements) When invoked this method will iterate over all classes specified as
IExecutableExtension arguements to this class in order and compare with
the elements. | public void | dispose() | public void | setInitializationData(IConfigurationElement config, String propertyName, Object data) |
adaptElements | public IAdaptable[] adaptElements(IWorkingSet ws, IAdaptable[] elements)(Code) | | When invoked this method will iterate over all classes specified as
IExecutableExtension arguements to this class in order and compare with
the elements. If the element is directly assignable to the provided class
then it is added to the result array as is. If the class has specified
"adapt=true" as an argument and there is an available adapter in the
platform IAdapterManager then it is returned. Finally, if "adapt=true"
and the class is already loaded (determined by inspecting exported
bundles via the platform PackageAdmin) a direct query for the adapter is
made on the object and if it is not null then it is
returned.
A consequence of the above is that it is possible for this method to
return differing results based on the state of bundles loaded within the
system.
See Also: org.eclipse.ui.IWorkingSetElementAdapter.adaptElements(org.eclipse.ui.IWorkingSetorg.eclipse.core.runtime.IAdaptable[]) See Also: org.eclipse.core.runtime.IAdapterManager.getAdapter(ObjectString) See Also: org.osgi.service.packageadmin.PackageAdmin.getExportedPackage(String) |
dispose | public void dispose()(Code) | | |
setInitializationData | public void setInitializationData(IConfigurationElement config, String propertyName, Object data)(Code) | | |
|
|