|
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.core.service.Service
org.eclipse.gmf.runtime.common.ui.services.elementselection.ElementSelectionService
public class ElementSelectionService
The element selection service.
Nested Class Summary | |
---|---|
protected class |
ElementSelectionService.JobData
|
Field Summary | |
---|---|
static IJobManager |
jobManager
|
Fields inherited from class org.eclipse.gmf.runtime.common.core.service.Service |
---|
INVALID_ELEMENT_MESSAGE_PATTERN |
Constructor Summary | |
---|---|
protected |
ElementSelectionService()
Constructs a new type selection service. |
Method Summary | |
---|---|
protected void |
cancelAllJobs()
Cancel the jobs running for the element selection service. |
void |
cancelJob(ElementSelectionServiceJob job)
|
protected void |
configureProviders()
Configures my providers from the elementSelectionProviders extension point. |
protected ElementSelectionServiceJob |
createSelectionJob()
Creates the selection service job that manages the individual provider search jobs. |
protected void |
fireEndOfMatchesEvent()
Fire an end of matches event since there are no more matches. |
protected void |
fireMatchingObjectEvent(IMatchingObjectEvent matchingObjectEvent)
Send the matching object event to the listener. |
static ElementSelectionService |
getInstance()
Retrieves the singleton instance of the type selection service. |
ElementSelectionService.JobData |
getJobData()
|
protected java.lang.String |
getJobName()
|
protected java.lang.String |
getJobName(ElementSelectionService.JobData data)
Get the name for the ElementSelectionServiceJob. |
java.util.List |
getMatchingObjects(IElementSelectionInput input)
For backward compatibility, use the element selection service and return the results in a list. |
ElementSelectionServiceJob |
getMatchingObjects(IElementSelectionInput input,
IElementSelectionListener listener)
Retrieve a list of matching objects from the provider. |
void |
matchingObjectEvent(IMatchingObjectEvent matchingObjectEvent)
A matching object event has been sent. |
protected Service.ProviderDescriptor |
newProviderDescriptor(IConfigurationElement element)
Creates a new provider descriptor for the specified configuration element . |
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. |
protected void |
schedule(IElementSelectionProvider provider,
ElementSelectionServiceJob job)
Schedules the specified selection provider job. |
Methods inherited from class org.eclipse.gmf.runtime.common.core.service.Service |
---|
addProvider, clearCache, configureProviders, configureProviders, createPriorityCache, execute, executeUnique, getAllProviders, getCachingKey, getPriority, getProviders, isOptimistic, isOptimized, providerChanged, provides, provides, removeProvider |
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, provides, removeProviderChangeListener |
Field Detail |
---|
public static final IJobManager jobManager
Constructor Detail |
---|
protected ElementSelectionService()
Method Detail |
---|
public ElementSelectionService.JobData getJobData()
public static ElementSelectionService getInstance()
public java.util.List getMatchingObjects(IElementSelectionInput input)
input
- the element selection input.
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 java.lang.String getJobName()
protected ElementSelectionServiceJob createSelectionJob()
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 void schedule(IElementSelectionProvider provider, ElementSelectionServiceJob job)
provider
- a selection providerjob
- the provider
's jobpublic java.lang.Object resolve(IMatchingObject object)
resolve
in interface IElementSelectionProvider
object
- the matching object.
protected java.lang.String getJobName(ElementSelectionService.JobData data)
protected void fireMatchingObjectEvent(IMatchingObjectEvent matchingObjectEvent)
matchingObjectEvent
- the matching object event.protected void fireEndOfMatchesEvent()
public void matchingObjectEvent(IMatchingObjectEvent matchingObjectEvent)
matchingObjectEvent
in interface IElementSelectionListener
protected void cancelAllJobs()
protected Service.ProviderDescriptor newProviderDescriptor(IConfigurationElement element)
Service
element
.
newProviderDescriptor
in class Service
element
- The configuration element from which to create the descriptor.
protected void configureProviders()
public void cancelJob(ElementSelectionServiceJob job)
|
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.