Class PackageDecider
- java.lang.Object
-
- org.emftext.language.java.resolver.decider.AbstractDecider
-
- org.emftext.language.java.resolver.decider.PackageDecider
-
- All Implemented Interfaces:
IResolutionTargetDecider
public class PackageDecider extends AbstractDecider
A decider that assumes that a package is referenced if the context of the reference allows for a package reference at that position. The decider creates a package element as additional candidate in that case.
-
-
Field Summary
-
Fields inherited from class org.emftext.language.java.resolver.decider.AbstractDecider
active
-
-
Constructor Summary
Constructors Constructor Description PackageDecider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canFindTargetsFor(EObject referenceContainer, EReference crossReference)
Determines if the decider is of any use for the given resolving procedure.boolean
containsCandidates(EObject container, EReference containingReference)
Determines if the decider needs to look into the given reference.EList<? extends EObject>
getAdditionalCandidates(String identifier, EObject container)
Allows for the decider to provide additional target candidates that are not directly contained in the traversed model tree.boolean
isPossibleTarget(String id, EObject element)
Decides if the given element is a (possibly the final) target.-
Methods inherited from class org.emftext.language.java.resolver.decider.AbstractDecider
activate, continueAfterReference, deactivate, isActive, isSure, reset, walkInto
-
-
-
-
Method Detail
-
canFindTargetsFor
public boolean canFindTargetsFor(EObject referenceContainer, EReference crossReference)
Description copied from interface:IResolutionTargetDecider
Determines if the decider is of any use for the given resolving procedure.- Returns:
- decision
-
getAdditionalCandidates
public EList<? extends EObject> getAdditionalCandidates(String identifier, EObject container)
Description copied from interface:IResolutionTargetDecider
Allows for the decider to provide additional target candidates that are not directly contained in the traversed model tree. The additional candidates will be inserted into the scope behind the children of the given container.- Specified by:
getAdditionalCandidates
in interfaceIResolutionTargetDecider
- Overrides:
getAdditionalCandidates
in classAbstractDecider
- Returns:
- null (corresponds to empty list) by default
-
containsCandidates
public boolean containsCandidates(EObject container, EReference containingReference)
Description copied from interface:IResolutionTargetDecider
Determines if the decider needs to look into the given reference.- Returns:
- decision
-
isPossibleTarget
public boolean isPossibleTarget(String id, EObject element)
Description copied from interface:IResolutionTargetDecider
Decides if the given element is a (possibly the final) target.- Returns:
- decision
-
-