|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gmf.runtime.common.core.service.AbstractProvider
org.eclipse.gmf.runtime.common.ui.services.elementselection.AbstractElementSelectionProvider
public abstract class AbstractElementSelectionProvider
Abstract implementation of an element selection provider.
Constructor Summary | |
---|---|
AbstractElementSelectionProvider()
|
Method Summary | |
---|---|
protected ElementSelectionServiceJob |
createSelectionJob()
Creates the selection service job that runs the provider's search. |
protected void |
fireEndOfMatchesEvent()
Fire an end of matches event since there are no more matches. |
protected void |
fireMatchingObjectEvent(IMatchingObject matchingObject)
Fire a matching object event. |
protected void |
fireMatchingObjectEvent(IMatchingObjectEvent matchingObjectEvent)
Send the matching object event to the listener. |
protected IElementSelectionInput |
getElementSelectionInput()
Retrieve the element selection input. |
protected IElementSelectionListener |
getElementSelectionListener()
Retrieve the element selection listener. |
protected java.lang.String |
getJobName()
Get the name for the ElementSelectionServiceJob. |
ElementSelectionServiceJob |
getMatchingObjects(IElementSelectionInput input,
IElementSelectionListener listener)
Retrieve a list of matching objects from the provider. |
boolean |
provides(IOperation operation)
Indicates whether this provider provides the specified operation. |
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 class org.eclipse.gmf.runtime.common.core.service.AbstractProvider |
---|
addProviderChangeListener, fireProviderChange, removeProviderChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.gmf.runtime.common.core.service.IProvider |
---|
addProviderChangeListener, removeProviderChangeListener |
Constructor Detail |
---|
public AbstractElementSelectionProvider()
Method Detail |
---|
public boolean provides(IOperation operation)
Providers generally cast the operation to a service specific
IOperation
-derived class in order to determine whether they
support the request.
provides
in interface IProvider
operation
- The operation in question.
true
if this provider provides the operation;
false
otherwise.public ElementSelectionServiceJob getMatchingObjects(IElementSelectionInput input, IElementSelectionListener listener)
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.
getMatchingObjects
in interface IElementSelectionProvider
input
- the element selection input.listener
- the provider will send matching object events to this
listener.
protected ElementSelectionServiceJob createSelectionJob()
public java.lang.Object resolve(IMatchingObject object)
resolve
in interface IElementSelectionProvider
object
- the matching object.
public void run(IProgressMonitor monitor)
The ElementSelectionServiceJob will invoke run. Clients must not call this method.
run
in interface IElementSelectionProvider
monitor
- a progress monitor in which the provider is running.protected java.lang.String getJobName()
protected void fireEndOfMatchesEvent()
protected void fireMatchingObjectEvent(IMatchingObject matchingObject)
matchingObject
- the matching object.protected void fireMatchingObjectEvent(IMatchingObjectEvent matchingObjectEvent)
matchingObjectEvent
- the matching object event.protected IElementSelectionInput getElementSelectionInput()
protected IElementSelectionListener getElementSelectionListener()
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.