Package org.eclipse.ui

Examples of org.eclipse.ui.IActionFilter


        return doGetAdapter(adapter);
  }
 
  private Object doGetAdapter(Class adapter) {
    if (adapter==IActionFilter.class) {
      return new IActionFilter() {
       
        @Override
        public boolean testAttribute(Object target, String name, String value) {
          if (!(target instanceof JcrNode)) {
            return false;
View Full Code Here


    }

    private boolean preciselyMatches(Object object) {
      // Get the action filter.
      IActionFilter filter = getActionFilter(object);
      if (filter == null) {
        return false;
      }

      // Run the action filter.
      return filter.testAttribute(object, name, value);
    }
View Full Code Here

    }

    // Test custom filter
    if (getFilterProperties() == null)
      return true;
    IActionFilter filter = null;

    // Do the free IResource adapting
    Object adaptedObject = LegacyResourceSupport.getAdaptedResource(object);
    if (adaptedObject != null) {
      object = adaptedObject;
View Full Code Here

    /**
     * Returns whether the object filter correctly matches a given object.
     */
    private boolean preciselyMatches(Object object) {
        // Get the action filter.
        IActionFilter filter = (IActionFilter)Util.getAdapter(object, IActionFilter.class);
        if (filter == null) {
      return false;
    }

        // Run the action filter.
        Iterator iter = filterElements.keySet().iterator();
        while (iter.hasNext()) {
            String name = (String) iter.next();
            String value = (String) filterElements.get(name);
            if (!filter.testAttribute(object, name, value)) {
        return false;
      }
        }
        return true;
    }
View Full Code Here

        return (IResource) getActualObject();
    }

    public Object getAdapter(Class adapter) {
        if (adapter == IActionFilter.class) {
            IActionFilter platformActionFilter = (IActionFilter) this.getActualObject().getAdapter(adapter);
            return new PythonSourceFolderActionFilter(platformActionFilter);
        }
        if (adapter == IContributorResourceAdapter.class) {
            return this;
        }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IActionFilter

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.