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
public class QueryReferences extends QueryDesignerPropEvent
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
Constructors Constructor Description QueryReferences(GProp<?>[] props, org.eclipse.jdt.core.IJavaElement[] javaElements, boolean includeChildren)
Creates a Query Reference message.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
areChildrenIncluded()
Check if children should be searched for.org.eclipse.jdt.core.IJavaElement[]
getJavaElements()
Gets the Java elements for the query.GProp<?>[]
getProps()
Gets the source properties for the query.java.util.List<QueryJavaReference>
getReferencedJavaElements()
Gets the array of Java element references.java.util.Set<QueryPropReference>
getReferencedProps()
Gets the set of found property references.QueryDesignerPropEvent.Type
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 Detail
QueryReferences
public QueryReferences(GProp<?>[] props, org.eclipse.jdt.core.IJavaElement[] javaElements, boolean includeChildren)
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 Detail
getType
public QueryDesignerPropEvent.Type getType()
Gets the type of message.- Specified by:
getType
in classQueryDesignerPropEvent
getProps
public GProp<?>[] getProps()
Gets the source properties for the query.
getJavaElements
public org.eclipse.jdt.core.IJavaElement[] getJavaElements()
Gets the Java elements for the query.
areChildrenIncluded
public boolean areChildrenIncluded()
Check if children should be searched for.
isReferenceValid
public 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.- Parameters:
prop
- The property to test.- Returns:
- The source property matching, null for no valid reference.
add
public void add(QueryPropReference ref)
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:
java.lang.NullPointerException
- Ifref
is null.
add
public void add(QueryJavaReference ref)
Adds a reference to a Java element being referenced by any of the source properties.- Parameters:
ref
- The instance of a QueryJavaReference.- Throws:
java.lang.NullPointerException
- Ifref
is null.
getReferencedProps
public java.util.Set<QueryPropReference> getReferencedProps()
Gets the set of found property references.
getReferencedJavaElements
public java.util.List<QueryJavaReference> getReferencedJavaElements()
Gets the array of Java element references.