Package org.eclipse.ui.internal.expressions

Examples of org.eclipse.ui.internal.expressions.AndExpression


  public final IHandlerActivation activateHandler(
      final IHandlerActivation childActivation) {
    final String commandId = childActivation.getCommandId();
    final IHandler handler = childActivation.getHandler();
    final Expression childExpression = childActivation.getExpression();
    final AndExpression expression;
    if (childExpression instanceof AndExpression) {
      expression = (AndExpression) childExpression;
    } else {
      expression = new AndExpression();
      if (childExpression != null) {
        expression.add(childExpression);
      }
    }
    if (defaultExpression != null) {
      expression.add(defaultExpression);
    }
    final int depth = childActivation.getDepth() + 1;
    final IHandlerActivation localActivation = new HandlerActivation(
        commandId, handler, expression, depth, this);
View Full Code Here


          commandId, handler, expression, global);
      parentActivations.add(activation);
      return activation;
    }

    final AndExpression andExpression;
    if (expression instanceof AndExpression) {
      andExpression = (AndExpression) expression;
    } else {
      andExpression = new AndExpression();
      if (expression != null) {
        andExpression.add(expression);
      }
    }
    if (defaultExpression != null) {
      andExpression.add(defaultExpression);
    }
    final IHandlerActivation localActivation = new HandlerActivation(
        commandId, handler, andExpression,
        IHandlerActivation.ROOT_DEPTH, this);
    return doActivation(localActivation);
View Full Code Here

      IContextActivation activation = fParentService.activateContext(
          contextId, expression, global);
      fParentActivations.add(activation);
      return activation;
    }
    AndExpression andExpression = null;
    if (expression instanceof AndExpression) {
      andExpression = (AndExpression) expression;
    } else {
      andExpression = new AndExpression();
      if (expression!=null) {
        andExpression.add(expression);
      }
    }
    if (fDefaultExpression!=null) {
      andExpression.add(fDefaultExpression);
    }
    ContextActivation activation = new ContextActivation(contextId,
        andExpression, this);
    return doActivateContext(activation);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.expressions.AndExpression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.