Package org.eclipse.ui.internal

Examples of org.eclipse.ui.internal.ActionExpression$CompositeExpression


    // Get enablement block.
    IConfigurationElement[] children = config
        .getChildren(IWorkbenchRegistryConstants.TAG_ENABLEMENT);
    if (children.length > 0) {
      enablementExpression = new ActionExpression(children[0]);
      return;
    }

    // Get selection block.
    children = config
View Full Code Here


    protected void initializeEnablement() {
        IConfigurationElement[] elements = definingElement.getChildren(CHILD_ENABLEMENT);
        if (elements.length == 0) {
            String className = definingElement.getAttribute(ATT_OBJECT_CLASS);
            if (className != null) {
        enablement = new ActionExpression(ATT_OBJECT_CLASS,
                        className);
      }
        } else {
      enablement = new ActionExpression(elements[0]);
    }
    }
View Full Code Here

     * @param element the element to be decorated
     * @return whether the decorator w=should be applied to the element
     */
    public boolean isEnabledFor(Object element) {
      if(isEnabled()){
        ActionExpression expression =  getEnablement();
        if(expression != null) {
        return expression.isEnabledFor(element);
      }
        return true;//Always on if no expression
      }
      return false;
      
View Full Code Here

   *
   * @see org.eclipse.ui.internal.decorators.DecoratorDefinition#initializeEnablement()
   */
  protected void initializeEnablement() {
    super.initializeEnablement();
    ActionExpression expression = getEnablement();
    if (expression != null) {
      objectClasses = expression.extractObjectClasses();
    }

    // If the class is null set it to Object
    if (objectClasses == null) {
      objectClasses = new String[] {Object.class.getName()};
View Full Code Here

          "There can only be one visibility element", parentElement, //$NON-NLS-1$
          parentId);
    }

    final IConfigurationElement visibilityElement = visibilityElements[0];
    final ActionExpression visibilityActionExpression = new ActionExpression(
        visibilityElement);
    final LegacyActionExpressionWrapper wrapper = new LegacyActionExpressionWrapper(
        visibilityActionExpression, null);
    return wrapper;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.ActionExpression$CompositeExpression

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.