Package org.eclipse.e4.ui.workbench
Class UIEvents
java.lang.Object
org.eclipse.e4.ui.workbench.UIEvents
E4 UI events and event topic definitions.
This file contains generated and hand crafted event topic constants. There are also hand crafted
utility methods for constructing topic strings and publishing events.
When the UI model changes org.eclipse.e4.ui.internal.workbench.swt.GenTopic should be run as an
Eclipse application and the console results should be pasted into this file replacing the code
below the "Place Generated Code Here" comment
- Since:
- 1.0
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfaceE4 UI Event argument attribute keys.static interfaceE4 UI Event Types.static interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfaceE4 UI life cycle events.static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSpecial id passed to force all elements to be checkedstatic final StringWild card character for matching all sub topicsstatic final StringEvent sent when a enabled update is requested for tool-items.static final StringTopic separator characterstatic final StringName element for all E4 UI model events (these are generated by GenTopic)static final StringName element for E4 Renderer eventsstatic final StringBase name of all E4 UI events -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Iterable<?> asIterable(Event event, String propertyName) Return the provided event property as an iterable.static StringbuildTopic(String topic) Deprecated.static StringbuildTopic(String topic, String attrName) Deprecated.static StringbuildTopic(String topic, String attrName, String eventType) Deprecated.static booleanReturn true if the specified property containso.static booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanpublishEvent(String topic, Map<String, Object> argMap) Publish the topic with the provided arguments to the global event bus. argMap MUST contain an EventTags.ELEMENT argument that is an MUIElement. the contained MUIElement will be used to determine the event bus to publish to.static booleanpublishEvent(String topic, MUIElement changedElement) Publish the topic to the changedElements global event bus.
-
Field Details
-
TOPIC_SEP
Topic separator character- See Also:
-
ALL_SUB_TOPICS
Wild card character for matching all sub topics- See Also:
-
UITopicBase
Base name of all E4 UI events- See Also:
-
UIModelTopicBase
Name element for all E4 UI model events (these are generated by GenTopic)- See Also:
-
UIRendererTopicBase
Name element for E4 Renderer events- Since:
- 1.1
- See Also:
-
REQUEST_ENABLEMENT_UPDATE_TOPIC
Event sent when a enabled update is requested for tool-items.As a value you may pass in to the
IEventBroker.DATA:- the special value
ALL_ELEMENT_IDto request changes of all applicable elements (the default) - the
MApplicationElement.getElementId()of the element to check - instance of
Selector
- Since:
- 1.1
- See Also:
- the special value
-
ALL_ELEMENT_ID
Special id passed to force all elements to be checked- Since:
- 1.1
- See Also:
-
-
Constructor Details
-
UIEvents
public UIEvents()
-
-
Method Details
-
isADD
- Parameters:
event- An OSGI event representing a UIEvent- Returns:
- true if it is an add event (i.e.,
UIEvents.EventTypes.ADDorUIEvents.EventTypes.ADD_MANY), or false otherwise. - See Also:
-
isREMOVE
- Parameters:
event- An OSGI event representing a UIEvent- Returns:
- true if it is a remove event (i.e.,
UIEvents.EventTypes.REMOVEorUIEvents.EventTypes.REMOVE_MANY), or false otherwise. - See Also:
-
isMOVE
- Parameters:
event- An OSGI event representing a UIEvent- Returns:
- true if it is a move event, false otherwise.
- Since:
- 1.10
-
isSET
- Parameters:
event- An OSGI event representing a UIEvent- Returns:
- true if it is a set event, false otherwise.
-
isCREATE
- Parameters:
event- An OSGI event representing a UIEvent- Returns:
- true if it is a create event, false otherwise.
-
contains
Return true if the specified property containso. Intended as a helper function forUIEvents.EventTypes.ADD,UIEvents.EventTypes.ADD_MANY,UIEvents.EventTypes.REMOVE, andUIEvents.EventTypes.REMOVE_MANY. If the property is not a container (e.g., a collection or array), then return true then ifcontaineris equal too.- Parameters:
event- the eventpropertyName- the property nameo- the object to check for containment- Returns:
- true if the property value contains
oor is equal too
-
asIterable
Return the provided event property as an iterable. If already a collection, return the collection.- Parameters:
event- the event objectpropertyName- the name of the property- Returns:
- an iterable collection over the property elements
-
publishEvent
Publish the topic to the changedElements global event bus. The changedElement is added the the EventTags.ELEMENT tag.- Parameters:
topic- to broadcastchangedElement- the element that changed- Returns:
- true if the event is published correctly, false otherwise
-
publishEvent
Publish the topic with the provided arguments to the global event bus. argMap MUST contain an EventTags.ELEMENT argument that is an MUIElement. the contained MUIElement will be used to determine the event bus to publish to.- Parameters:
topic- to broadcastargMap- arguments map with a minimum of a changedElement- Returns:
- true if the event is published correctly, false otherwise
-
buildTopic
Deprecated. -
buildTopic
Deprecated. -
buildTopic
Deprecated.
-