org.eclipse.xtend.shared.ui.editor.navigation
Class ContextComputer
java.lang.Object
org.eclipse.xtend.shared.ui.editor.navigation.ContextComputer
- All Implemented Interfaces:
- VetoableCallback
public class ContextComputer
- extends java.lang.Object
- implements VetoableCallback
Used by the AbstractHyperlinkDetector
to compute the ExecutionContext
for a given Expression. Iff the expression is a FeatureCall
also the
evaluated expression result of the target is stored.
- Since:
- 2.0
- Author:
- jockel - Initial contribution and API
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextComputer
public ContextComputer(Expression se)
getContext
public ExecutionContext getContext()
pre
public boolean pre(SyntaxElement ele,
ExecutionContext ctx)
- Description copied from interface:
VetoableCallback
- Called before an element is being processed.
- Specified by:
pre
in interface VetoableCallback
- Parameters:
ele
- The element being processed. Never null.ctx
- The execution context in which processing occurs. Never null.
- Returns:
- true if processing should continue normally, false if this element should be skipped.
post
public void post(SyntaxElement ele,
ExecutionContext ctx,
java.lang.Object expressionResult)
- Description copied from interface:
VetoableCallback
- Called after an element has been processed.
- Specified by:
post
in interface VetoableCallback
- Parameters:
ele
- The element being processed. Never null.ctx
- The execution context in which processing occurs. Never null.expressionResult
- the result of the evaluation (an instance of Type
in analyzation phase) if syntax element was
an instance of Expression