Package com.iizigo.event
Class QueryReferences
java.lang.Object
com.iizix.event.GEvent
com.iizix.event.SinkEvent
com.iizigo.event.QueryDesignerPropEvent
com.iizigo.event.QueryReferences
- All Implemented Interfaces:
IPostEventProcessing
Queries the workspace for references.
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from class com.iizigo.event.QueryDesignerPropEvent
QueryDesignerPropEvent.Type
Nested classes/interfaces inherited from class com.iizix.event.GEvent
GEvent.Operation
Field Summary
Fields inherited from class com.iizix.event.GEvent
PROP_ADDED, PROP_ATTR_CHANGED, PROP_CNR_ADDED, PROP_CNR_FOCUS, PROP_CNR_MOVED, PROP_CNR_RENAMED, PROP_DESIGNER_ASSET_CHANGED, PROP_DESIGNER_JAVA_CLASS_CHANGED, PROP_DESIGNER_JAVA_METHOD_RENAMED, PROP_DESIGNER_KSTRING, PROP_DESIGNER_VIEWER_UPDATE, PROP_DESIGNER_VS_REFERENCE, PROP_DISPOSED, PROP_FOCUS, PROP_MOVED_FROM, PROP_MOVED_TO, PROP_PROJECT_RENAMED, PROP_QUERY_DESIGNER_PROPS, PROP_REFRESH, PROP_REMOVED, PROP_RENAMED, PROP_REORDERED, PROP_RESOLVE_REFERENCES_DIRECT, PROP_VALUE_CHANGED, REMOTE
Constructor Summary
ConstructorDescriptionQueryReferences
(GProp<?>[] props, IJavaElement[] javaElements, boolean includeChildren) Creates a Query Reference message.Method Summary
Modifier and TypeMethodDescriptionvoid
add
(QueryJavaReference ref) Adds a reference to a Java element being referenced by any of the source properties.void
add
(QueryPropReference ref) Adds a reference to a Property element being referenced by any of the source properties or Java elements.boolean
Check if children should be searched for.Gets the Java elements for the query.GProp<?>[]
getProps()
Gets the source properties for the query.Gets the array of Java element references.Gets the set of found property references.getType()
Gets the type of message.GProp
<?> isReferenceValid
(GProp<?> prop) Checks if a property is valid as reference to one of the sources, it is on of the source properties, or ifareChildrenIncluded()
is true, one of their children.Methods inherited from class com.iizigo.event.QueryDesignerPropEvent
getAlternateDestination, isEventProcessed
Methods inherited from class com.iizix.event.SinkEvent
getOperations
Methods inherited from class com.iizix.event.GEvent
addPostProcessor, cancel, consume, getEventID, getEventName, getEventName, getEventTarget, getOperation, getPostProcessors, getSender, getSource, getTrigger, isCancelled, isClearCacheEvent, isConsumed, isPropertyChange, isPropertyChange, isPropertyChange, isPropertyChangeIn, isPropertyChangeInTree, isRefreshEvent, isRemoteInduced, isVerifyEvent, paramString, send, send, sendSelf, setInitialProperty, setOperation, setProgressMonitor, toString
Constructor Details
QueryReferences
Creates a Query Reference message.- Parameters:
props
- The properties to search references for.javaElements
- The Java elements to search references for.includeChildren
- Flag to extend search to the children of the sourceprops
orjavaElements
.
Method Details
getType
Gets the type of message.- Specified by:
getType
in classQueryDesignerPropEvent
getProps
Gets the source properties for the query.getJavaElements
Gets the Java elements for the query.areChildrenIncluded
public boolean areChildrenIncluded()Check if children should be searched for.isReferenceValid
Checks if a property is valid as reference to one of the sources, it is on of the source properties, or ifareChildrenIncluded()
is true, one of their children.- Parameters:
prop
- The property to test.- Returns:
- The source property matching, null for no valid reference.
add
Adds a reference to a Property element being referenced by any of the source properties or Java elements.- Parameters:
ref
- The instance of a QueryPropReference.- Throws:
NullPointerException
- Ifref
is null.
add
Adds a reference to a Java element being referenced by any of the source properties.- Parameters:
ref
- The instance of a QueryJavaReference.- Throws:
NullPointerException
- Ifref
is null.
getReferencedProps
Gets the set of found property references.getReferencedJavaElements
Gets the array of Java element references.