Examples of ISharedImages


Examples of org.eclipse.ui.ISharedImages

     * @param window the workbench window this action applies to
     * @param forward if this action should move history forward of backward
     */
    public NavigationHistoryAction(IWorkbenchWindow window, boolean forward) {
        super("", window); //$NON-NLS-1$
        ISharedImages sharedImages = window.getWorkbench().getSharedImages();
        if (forward) {
            setText(WorkbenchMessages.NavigationHistoryAction_forward_text);
            setToolTipText(WorkbenchMessages.NavigationHistoryAction_forward_toolTip);
            // @issue missing action id
            window.getWorkbench().getHelpSystem().setHelp(this,
          IWorkbenchHelpContextIds.NAVIGATION_HISTORY_FORWARD);
            setImageDescriptor(sharedImages
                    .getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD));
            setDisabledImageDescriptor(sharedImages
                    .getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD_DISABLED));
            setActionDefinitionId("org.eclipse.ui.navigate.forwardHistory"); //$NON-NLS-1$
        } else {
            setText(WorkbenchMessages.NavigationHistoryAction_backward_text);
            setToolTipText(WorkbenchMessages.NavigationHistoryAction_backward_toolTip);
            // @issue missing action id
            window.getWorkbench().getHelpSystem().setHelp(this,
          IWorkbenchHelpContextIds.NAVIGATION_HISTORY_BACKWARD);
            setImageDescriptor(sharedImages
                    .getImageDescriptor(ISharedImages.IMG_TOOL_BACK));
            setDisabledImageDescriptor(sharedImages
                    .getImageDescriptor(ISharedImages.IMG_TOOL_BACK_DISABLED));
            setActionDefinitionId("org.eclipse.ui.navigate.backwardHistory"); //$NON-NLS-1$
        }
        // WorkbenchHelp.setHelp(this, IHelpContextIds.CLOSE_ALL_PAGES_ACTION);
        setEnabled(false);
View Full Code Here

Examples of org.eclipse.ui.ISharedImages

        registry.put(annotationType, descriptor);
        image= registry.get(annotationType);
      } else {
        String key= translateSymbolicImageName(preference.getSymbolicImageName());
        if (key != null) {
          ISharedImages sharedImages= PlatformUI.getWorkbench().getSharedImages();
          image= sharedImages.getImage(key);
        }
      }
    }
    return image;
  }
View Full Code Here

Examples of org.eclipse.ui.ISharedImages

        registry.put(annotationType, descriptor);
        image= registry.get(annotationType);
      } else {
        String key= translateSymbolicImageName(preference.getSymbolicImageName());
        if (key != null) {
          ISharedImages sharedImages= PlatformUI.getWorkbench().getSharedImages();
          image= sharedImages.getImage(key);
        }
      }
    }

    if (image == null)
View Full Code Here

Examples of org.eclipse.ui.ISharedImages

    return new Object[] {};
  }

  public ImageDescriptor getImageDescriptor(Object object) {

    ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
    return sharedImages.getImageDescriptor(ISharedImages.IMG_OBJ_FILE);
  }
View Full Code Here

Examples of org.eclipse.ui.ISharedImages

      return null;
    }
  }

  public ImageDescriptor getImageDescriptor(Object object) {
    ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
    return sharedImages.getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
  }
View Full Code Here

Examples of org.eclipse.ui.ISharedImages

    URL zookeeperNodeUrl = FileLocator.find(bundle, new Path("/icons/zookeeper_node.png"), null);
    URL hadoopUrl = FileLocator.find(bundle, new Path("/icons/hadoop-logo-16x16.png"), null);
    URL offlineUrl = FileLocator.find(bundle, new Path("/icons/ovr/offline.png"), null);
    URL onlineUrl = FileLocator.find(bundle, new Path("/icons/ovr/online.png"), null);
   
    ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
    IMAGE_REMOTE_OVR = sharedImages.getImageDescriptor(org.eclipse.team.ui.ISharedImages.IMG_CHECKEDIN_OVR);
    IMAGE_LOCAL_OVR = ImageDescriptor.createFromURL(localFileUrl);
    IMAGE_INCOMING_OVR = ImageDescriptor.createFromURL(incomingUrl);
    IMAGE_OUTGOING_OVR = ImageDescriptor.createFromURL(outgoingUrl);
    IMAGE_SYNC_OVR = sharedImages.getImageDescriptor(org.eclipse.team.ui.ISharedImages.IMG_HOURGLASS_OVR);
    IMAGE_HDFS = ImageDescriptor.createFromURL(hdfsUrl).createImage();
    IMAGE_HADOOP = ImageDescriptor.createFromURL(hadoopUrl);
    IMAGE_READONLY_OVR = sharedImages.getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT_DISABLED);
    IMAGE_OFFLINE_OVR = ImageDescriptor.createFromURL(offlineUrl);
    IMAGE_ONLINE_OVR = ImageDescriptor.createFromURL(onlineUrl);
    IMAGE_ZOOKEEPER = ImageDescriptor.createFromURL(zookeeperUrl).createImage();
    IMAGE_ZOOKEEPER_NODE = ImageDescriptor.createFromURL(zookeeperNodeUrl).createImage();
    IMAGE_ZOOKEEPER_EPHERMERAL =  sharedImages.getImageDescriptor(org.eclipse.team.ui.ISharedImages.IMG_HOURGLASS_OVR);
  }
View Full Code Here

Examples of org.eclipse.ui.ISharedImages

  }

  @Override
  protected void init() {
    super.init();
    ISharedImages sharedImages = PlatformUI.getWorkbench()
        .getSharedImages();
    setText("Copy");
    setId(ActionFactory.COPY.getId());
    setHoverImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
    setImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
    setDisabledImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
    setEnabled(false);
  }
View Full Code Here

Examples of org.eclipse.ui.ISharedImages

  }

  @Override
  protected void init() {
    super.init();
    ISharedImages sharedImages = PlatformUI.getWorkbench()
        .getSharedImages();
    setText("Paste");
    setId(ActionFactory.PASTE.getId());
    setHoverImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
    setImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
    setDisabledImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED));
    setEnabled(false);
  }
View Full Code Here

Examples of org.eclipse.ui.ISharedImages

   * @see org.eclipse.gef.ui.parts.GraphicalEditor#createActions()
   */
  protected void createActions() {
    super.createActions();
    ActionRegistry registry = getActionRegistry();
    ISharedImages sharedImages = PlatformUI.getWorkbench()
        .getSharedImages();

    IAction action;

    action = new DesignerUndoRedoAction(true, this);
    action.setImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_UNDO));
    action.setDisabledImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_UNDO_DISABLED));
    action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_UNDO);
    action.setId(IWorkbenchCommandConstants.EDIT_UNDO);
    getSite().getKeyBindingService().registerAction(action);
    registry.registerAction(action);

    action = new DesignerUndoRedoAction(false, this);
    action.setImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_REDO));
    action.setDisabledImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_REDO_DISABLED));
    action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_REDO);
    action.setId(IWorkbenchCommandConstants.EDIT_REDO);
    getSite().getKeyBindingService().registerAction(action);
    registry.registerAction(action);

    action = new DeleteAction(this);
    action.setImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
    action.setDisabledImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
    action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_DELETE);
    action.setId(IWorkbenchCommandConstants.EDIT_DELETE);
    getSite().getKeyBindingService().registerAction(action);
    this.getSelectionActions().add(action.getId());
    registry.registerAction(action);

    action = new CopyAction(this);
    action.setImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
    action.setDisabledImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
    action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_COPY);
    action.setId(IWorkbenchCommandConstants.EDIT_COPY);
    getSite().getKeyBindingService().registerAction(action);
    this.getSelectionActions().add(action.getId());
    registry.registerAction(action);

    action = new CutAction(this);
    action.setImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_CUT));
    action.setDisabledImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_CUT_DISABLED));
    action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_CUT);
    action.setId(IWorkbenchCommandConstants.EDIT_CUT);
    getSite().getKeyBindingService().registerAction(action);
    this.getSelectionActions().add(action.getId());
    registry.registerAction(action);

    action = new PasteAction(this);
    action.setImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
    action.setDisabledImageDescriptor(sharedImages
        .getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED));
    action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_PASTE);
    action.setId(IWorkbenchCommandConstants.EDIT_PASTE);
    getSite().getKeyBindingService().registerAction(action);
    this.getSelectionActions().add(action.getId());
View Full Code Here

Examples of org.eclipse.ui.ISharedImages

        }
      };
      selectAllAction.setText("Select all");
      selectAllAction.setToolTipText("Select all");
      selectAllAction.setEnabled(true);
      ISharedImages workbenchImages = JavaPlugin.getDefault().getWorkbench().getSharedImages();
      selectAllAction.setImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
    }
    log("Done making actions. Adding them to the bars.");
   
    contributeToActionBars();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.