public abstract class XDebuggerEvaluator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
XDebuggerEvaluator.XEvaluationCallback |
Constructor and Description |
---|
XDebuggerEvaluator() |
Modifier and Type | Method and Description |
---|---|
abstract void |
evaluate(java.lang.String expression,
XDebuggerEvaluator.XEvaluationCallback callback,
XSourcePosition expressionPosition)
Start evaluating expression.
|
void |
evaluate(XExpression expression,
XDebuggerEvaluator.XEvaluationCallback callback,
XSourcePosition expressionPosition)
Start evaluating expression.
|
java.lang.String |
formatTextForEvaluation(java.lang.String text)
Override this method to format selected text before it is shown in 'Evaluate' dialog
|
EvaluationMode |
getEvaluationMode(java.lang.String text,
int startOffset,
int endOffset,
PsiFile psiFile)
Returns mode which should be used to evaluate the text
|
ExpressionInfo |
getExpressionInfoAtOffset(Project project,
Document document,
int offset,
boolean sideEffectsAllowed) |
Promise<ExpressionInfo> |
getExpressionInfoAtOffsetAsync(Project project,
Document document,
int offset,
boolean sideEffectsAllowed)
Async version of
getExpressionInfoAtOffset(Project, Document, int, boolean) . |
TextRange |
getExpressionRangeAtOffset(Project project,
Document document,
int offset,
boolean sideEffectsAllowed)
Return text range of expression which can be evaluated.
|
<T> Promise<T> |
getWhenDataIsReady(Editor editor,
T data) |
boolean |
isCodeFragmentEvaluationSupported()
If this method returns
true 'Code Fragment Mode' button will be shown in 'Evaluate' dialog allowing user to execute a set of
statements |
public abstract void evaluate(java.lang.String expression, XDebuggerEvaluator.XEvaluationCallback callback, XSourcePosition expressionPosition)
expression
- expression to evaluatecallback
- used to notify that the expression has been evaluated or an error occurspublic void evaluate(XExpression expression, XDebuggerEvaluator.XEvaluationCallback callback, XSourcePosition expressionPosition)
expression
- expression to evaluatecallback
- used to notify that the expression has been evaluated or an error occursexpressionPosition
- position where this expression should be evaluatedpublic boolean isCodeFragmentEvaluationSupported()
true
'Code Fragment Mode' button will be shown in 'Evaluate' dialog allowing user to execute a set of
statementstrue
if debugger supports evaluation of code fragments (statements)public TextRange getExpressionRangeAtOffset(Project project, Document document, int offset, boolean sideEffectsAllowed)
project
- projectdocument
- documentoffset
- offsetsideEffectsAllowed
- if this parameter is false, the expression should not have any side effects when evaluated
(such expressions are evaluated in quick popups)public ExpressionInfo getExpressionInfoAtOffset(Project project, Document document, int offset, boolean sideEffectsAllowed)
project
- projectdocument
- documentoffset
- offsetsideEffectsAllowed
- if this parameter is false, the expression should not have any side effects when evaluated
(such expressions are evaluated in quick popups)ExpressionInfo
of expression which can be evaluatedpublic Promise<ExpressionInfo> getExpressionInfoAtOffsetAsync(Project project, Document document, int offset, boolean sideEffectsAllowed)
getExpressionInfoAtOffset(Project, Document, int, boolean)
. Overload this method if you cannot evaluate ExpressionInfo in sync way.
The value of the resulting Promise can be nullpublic java.lang.String formatTextForEvaluation(java.lang.String text)
public EvaluationMode getEvaluationMode(java.lang.String text, int startOffset, int endOffset, PsiFile psiFile)