Package org.eclipse.pde.core.target
Class TargetEvents
java.lang.Object
org.eclipse.pde.core.target.TargetEvents
Target events and event topic definitions.
The following code is an example of to subscribe to the
TOPIC_TARGET_SAVED
event:
EventHandler eventHandler = event -> { if (event.getProperty(IEventBroker.DATA) instanceof ITargetHandle handle) { // Work with the target handle... } }; IEclipseContext context = EclipseContextFactory.getServiceContext(bundleContext); IEventBroker broker = context.get(IEventBroker.class); if (broker != null) { broker.subscribe(TargetEvents.TOPIC_TARGET_SAVED, eventHandler); // Do not forget to unsubscribe later! }
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Topic for all target events.static final String
Base topic for all target events.static final String
Sent when a target is deleted.static final String
Sent when a target is saved.static final String
Sent when workspace target definition is changed. -
Constructor Summary
-
Method Summary
-
Field Details
-
TOPIC_BASE
Base topic for all target events.- See Also:
-
TOPIC_ALL
Topic for all target events.- See Also:
-
TOPIC_WORKSPACE_TARGET_CHANGED
Sent when workspace target definition is changed.The
data
event property
of events with this topic is the changedITargetDefinition
. -
TOPIC_TARGET_SAVED
Sent when a target is saved.The
data
event property
of events with this topic is the savedITargetHandle
.- Since:
- 3.20
- See Also:
-
TOPIC_TARGET_DELETED
Sent when a target is deleted.The
data
event property
of events with this topic is the deletedITargetHandle
.- Since:
- 3.20
- See Also:
-
-
Constructor Details
-
TargetEvents
public TargetEvents()
-