Class SelectionAdapterFactory

java.lang.Object
org.eclipse.ui.internal.SelectionAdapterFactory
All Implemented Interfaces:
IAdapterFactory

public class SelectionAdapterFactory extends Object implements IAdapterFactory
Adapts ISelection instances to either IIterable or ICountable. For use with core expressions.
Since:
3.3
  • Constructor Details

    • SelectionAdapterFactory

      public SelectionAdapterFactory()
  • Method Details

    • getAdapter

      public <T> T getAdapter(Object adaptableObject, Class<T> adapterType)
      Description copied from interface: IAdapterFactory
      Returns an object which is an instance of the given class associated with the given object. Returns null if no such object can be found.
      Specified by:
      getAdapter in interface IAdapterFactory
      Parameters:
      adaptableObject - the adaptable object being queried (usually an instance of IAdaptable)
      adapterType - the type of adapter to look up
      Returns:
      a object of the given adapter type, or null if this adapter factory does not have an adapter of the given type for the given object
    • getAdapterList

      public Class<?>[] getAdapterList()
      Description copied from interface: IAdapterFactory
      Returns the collection of adapter types handled by this factory.

      This method is generally used by an adapter manager to discover which adapter types are supported, in advance of dispatching any actual getAdapter requests.

      The default implementation collects the required classes from the AdapterTypes annotation, if that is not used implementors must override this method.

      Specified by:
      getAdapterList in interface IAdapterFactory
      Returns:
      the collection of adapter types