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!
}
- Since:
- 3.13
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTopic for all target events.static final StringBase topic for all target events.static final StringSent when a target is deleted.static final StringSent when a target is saved.static final StringSent when workspace target definition is changed. -
Constructor Summary
Constructors -
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
dataevent propertyof events with this topic is the changedITargetDefinition.- See Also:
-
TOPIC_TARGET_SAVED
Sent when a target is saved.The
dataevent propertyof events with this topic is the savedITargetHandle.- Since:
- 3.20
- See Also:
-
TOPIC_TARGET_DELETED
Sent when a target is deleted.The
dataevent propertyof events with this topic is the deletedITargetHandle.- Since:
- 3.20
- See Also:
-
-
Constructor Details
-
TargetEvents
public TargetEvents()
-