1 11 package org.eclipse.core.internal.expressions; 12 13 import org.w3c.dom.Element ; 14 15 import org.eclipse.core.runtime.CoreException; 16 import org.eclipse.core.runtime.IConfigurationElement; 17 18 import org.eclipse.core.expressions.EvaluationResult; 19 import org.eclipse.core.expressions.IEvaluationContext; 20 21 public class EnablementExpression extends CompositeExpression { 22 23 public EnablementExpression(IConfigurationElement configElement) { 24 } 26 27 public EnablementExpression(Element element) { 28 } 30 31 public boolean equals(final Object object) { 32 if (!(object instanceof EnablementExpression)) 33 return false; 34 35 final EnablementExpression that= (EnablementExpression)object; 36 return equals(this.fExpressions, that.fExpressions); 37 } 38 39 public EvaluationResult evaluate(IEvaluationContext context) throws CoreException { 40 long start= 0; 41 if (Expressions.TRACING) 42 start= System.currentTimeMillis(); 43 EvaluationResult result= evaluateAnd(context); 44 if (Expressions.TRACING) { 45 System.out.println("[Enablement Expression] - evaluation time: " + (System.currentTimeMillis() - start) + " ms."); } 48 return result; 49 } 50 } 51 | Popular Tags |