Search in sources :

Example 1 with EvaluationResult

use of flex.tools.debugger.cli.ExpressionCache.EvaluationResult in project intellij-plugins by JetBrains.

the class DebugCLI method shouldBreak.

/**
	 * Determines if the given BreakAction requests a halt given the file
	 * line and optionally a conditional to evaluate.'
	 */
boolean shouldBreak(BreakAction a, int fileId, int line) {
    boolean should = a.isEnabled();
    ValueExp exp = a.getCondition();
    if (// halt request fires true
    should && exp != null && !m_requestHalt) {
        // evaluate it then update our boolean
        try {
            EvaluationResult result = evalExpression(exp, false);
            if (result != null)
                should = ECMA.toBoolean(result.context.toValue(result.value));
        } catch (NullPointerException npe) {
        } catch (NumberFormatException nfe) {
        }
    }
    return should;
}
Also used : ValueExp(flash.tools.debugger.expression.ValueExp) EvaluationResult(flex.tools.debugger.cli.ExpressionCache.EvaluationResult)

Aggregations

ValueExp (flash.tools.debugger.expression.ValueExp)1 EvaluationResult (flex.tools.debugger.cli.ExpressionCache.EvaluationResult)1