Search in sources :

Example 16 with CountExpression

use of org.eclipse.core.internal.expressions.CountExpression in project eclipse.platform.runtime by eclipse.

the class ExpressionInfoTests method testAndExpression.

public void testAndExpression() throws Exception {
    AndExpression and = new AndExpression();
    assertNoAccess(and.computeExpressionInfo());
    and.add(new CountExpression("10"));
    assertDefaultAccessOnly(and.computeExpressionInfo());
}
Also used : AndExpression(org.eclipse.core.internal.expressions.AndExpression) CountExpression(org.eclipse.core.internal.expressions.CountExpression)

Example 17 with CountExpression

use of org.eclipse.core.internal.expressions.CountExpression in project eclipse.platform.runtime by eclipse.

the class ExpressionInfoTests method testWithExpression.

public void testWithExpression() {
    WithExpression with = new WithExpression("variable");
    assertNoAccess(with.computeExpressionInfo());
    with.add(new CountExpression("10"));
    assertVariableAccess(with.computeExpressionInfo(), "variable");
}
Also used : CountExpression(org.eclipse.core.internal.expressions.CountExpression) WithExpression(org.eclipse.core.internal.expressions.WithExpression)

Example 18 with CountExpression

use of org.eclipse.core.internal.expressions.CountExpression in project eclipse.platform.runtime by eclipse.

the class ExpressionInfoTests method testResolveExpression.

public void testResolveExpression() {
    ResolveExpression resolve = new ResolveExpression("variable", null);
    assertNoAccess(resolve.computeExpressionInfo());
    resolve.add(new CountExpression("10"));
    assertVariableAccess(resolve.computeExpressionInfo(), "variable");
}
Also used : ResolveExpression(org.eclipse.core.internal.expressions.ResolveExpression) CountExpression(org.eclipse.core.internal.expressions.CountExpression)

Aggregations

CountExpression (org.eclipse.core.internal.expressions.CountExpression)18 EvaluationContext (org.eclipse.core.expressions.EvaluationContext)7 IEvaluationContext (org.eclipse.core.expressions.IEvaluationContext)7 ArrayList (java.util.ArrayList)6 EvaluationResult (org.eclipse.core.expressions.EvaluationResult)1 AndExpression (org.eclipse.core.internal.expressions.AndExpression)1 ResolveExpression (org.eclipse.core.internal.expressions.ResolveExpression)1 WithExpression (org.eclipse.core.internal.expressions.WithExpression)1 CoreException (org.eclipse.core.runtime.CoreException)1