Runtime

org.eclipse.gmf.runtime.common.ui.services.elementselection
Interface IElementSelectionProvider

All Superinterfaces:
IProvider
All Known Implementing Classes:
AbstractElementSelectionProvider, ElementSelectionService

public interface IElementSelectionProvider
extends IProvider

Interface describing a element selection provider for the element selection service.


Method Summary
 ElementSelectionServiceJob getMatchingObjects(IElementSelectionInput input, IElementSelectionListener listener)
          Retrieve a list of matching objects from the provider.
 java.lang.Object resolve(IMatchingObject object)
          Resolve the matching object to a modeling object.
 void run(IProgressMonitor monitor)
          Retrieve the list of matching objects from the provider.
 
Methods inherited from interface org.eclipse.gmf.runtime.common.core.service.IProvider
addProviderChangeListener, provides, removeProviderChangeListener
 

Method Detail

getMatchingObjects

ElementSelectionServiceJob getMatchingObjects(IElementSelectionInput input,
                                              IElementSelectionListener listener)
Retrieve a list of matching objects from the provider.

The provider is given an IElementSelectionInput and IElementSelectionListener and creates a ElementSelectionServiceJob.

The provider returns IMatchingObjectEvent to the IElementSelectionListener. If there are ten matching objects, then eleven IMatchingObjectEvent will be sent to the listener. The first ten will have type MatchingObjectEventType.MATCH and will have a matching object. The eleventh event will have type MatchingObjectEventType.END_OF_MATCHES.

Parameters:
input - the element selection input.
listener - the provider will send matching object events to this listener.
Returns:
the job that is running this provider.

run

void run(IProgressMonitor monitor)
Retrieve the list of matching objects from the provider.

The ElementSelectionServiceJob will invoke run. Clients must not call this method.

Parameters:
monitor - a progress monitor in which the provider is running.

resolve

java.lang.Object resolve(IMatchingObject object)
Resolve the matching object to a modeling object.

Parameters:
object - the matching object.
Returns:
a modeling object.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.