/** * Answer the appropriate base image to use for the passed resource, optionally * considering the passed open status as well iff appropriate for the type of * passed resource */ @Override protected ImageDescriptor getBaseImage(IResource resource) { return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor( ISharedImages.IMG_OBJ_FOLDER); }
@Override public ImageDescriptor getImageDescriptor(Object o) { if (o instanceof LocalFileStorage || o instanceof ZipEntryStorage) { return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE); } return null; } /* (non-Javadoc)
public BackAction(BrowserInformationControl infoControl) { fInfoControl= infoControl; setText(JavaHoverMessages.JavadocHover_back); ISharedImages images= PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_BACK)); setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_BACK_DISABLED)); update(); }
public ForthAction() { setText(InfoViewMessages.JavadocView_action_forward_name); ISharedImages images= PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD)); setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD_DISABLED)); update(); }
public ForwardAction(BrowserInformationControl infoControl) { fInfoControl= infoControl; setText(JavaHoverMessages.JavadocHover_forward); ISharedImages images= PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD)); setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD_DISABLED)); update(); }
public ForwardAction(IXtextBrowserInformationControl infoControl) { fInfoControl = infoControl; setText(XtextUIMessages.XtextBrowserInformationControlInput_Forward); ISharedImages images = PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD)); setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD_DISABLED)); update(); }
public ForthAction() { setText(InfoViewMessages.JavadocView_action_forward_name); ISharedImages images= PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD)); setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD_DISABLED)); update(); }
private Action createCopyAction() { Action action = new Action(PDERuntimeMessages.LogView_copy) { public void run() { copyToClipboard(fTreeViewer.getSelection()); } }; action.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages() .getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); return action; }
public CopyToClipboardAction(IWorkbenchSite site, Clipboard clipboard) { super(site); setText(ReorgMessages.CopyToClipboardAction_text); setDescription(ReorgMessages.CopyToClipboardAction_description); fClipboard= clipboard; ISharedImages workbenchImages= getWorkbenchSharedImages(); setDisabledImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED)); setImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); setHoverImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); update(getSelection()); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.COPY_ACTION); }
public DeleteAction(IWorkbenchSite site) { super(site); setText(ReorgMessages.DeleteAction_3); setDescription(ReorgMessages.DeleteAction_4); ISharedImages workbenchImages= JavaPlugin.getDefault().getWorkbench().getSharedImages(); setDisabledImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED)); setImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE)); setHoverImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE)); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.DELETE_ACTION); }
public CutAction(IWorkbenchSite site) { super(site); setText(ReorgMessages.CutAction_text); fCopyToClipboardAction= new CopyToClipboardAction(site); ISharedImages workbenchImages= JavaPlugin.getDefault().getWorkbench().getSharedImages(); setDisabledImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT_DISABLED)); setImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT)); setHoverImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT)); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CUT_ACTION); }
public PasteAction() { super(ActionFactory.PASTE.getId()); setText(PDEUIMessages.EditorActions_paste); setImageDescriptor(getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_PASTE)); setDisabledImageDescriptor(getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED)); setActionDefinitionId(ActionFactory.PASTE.getCommandId()); }
public CollapseAllAction(TreeViewer viewer) { setText(ActionMessages.CollapseAllAction_label); setToolTipText(ActionMessages.CollapseAllAction_tooltip); ImageDescriptor enabledImageDescriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_COLLAPSEALL); setImageDescriptor(enabledImageDescriptor); ImageDescriptor disabledImageDescriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_COLLAPSEALL_DISABLED); setDisabledImageDescriptor(disabledImageDescriptor); fViewer = viewer; }
public RemoveAllSessionsAction() { setText(ActionMessages.RemoveAllSessionsAction_label); setToolTipText(ActionMessages.RemoveAllSessionsAction_tooltip); ImageDescriptor enabledImageDescriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_REMOVEALL); setImageDescriptor(enabledImageDescriptor); ImageDescriptor disabledImageDescriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_REMOVEALL_DISABLED); setDisabledImageDescriptor(disabledImageDescriptor); }
public CopyAction() { super(ActionFactory.COPY.getId()); setText(PDEUIMessages.EditorActions_copy); setImageDescriptor(getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); setDisabledImageDescriptor(getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED)); setActionDefinitionId(ActionFactory.COPY.getCommandId()); }
public RemoveAllSessionsAction() { setText(ActionMessages.RemoveAllSessionsAction_label); setToolTipText(ActionMessages.RemoveAllSessionsAction_tooltip); ImageDescriptor enabledImageDescriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_REMOVEALL); setImageDescriptor(enabledImageDescriptor); ImageDescriptor disabledImageDescriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_REMOVEALL_DISABLED); setDisabledImageDescriptor(disabledImageDescriptor); }
public CopyToClipboardAction(IWorkbenchSite site) { super(site); setText(InfoViewMessages.CopyAction_label); setToolTipText(InfoViewMessages.CopyAction_tooltip); setDescription(InfoViewMessages.CopyAction_description); ISharedImages workbenchImages= PlatformUI.getWorkbench().getSharedImages(); setDisabledImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED)); setImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); setHoverImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IAbstractTextEditorHelpContextIds.COPY_ACTION); update(getSelection()); }
public ImageDescriptor getImageDescriptor(Object object) { String name = new org.eclipse.core.runtime.Path(path).lastSegment(); if (name != null) { return PlatformUI.getWorkbench().getEditorRegistry() .getImageDescriptor(name); } else return PlatformUI.getWorkbench().getSharedImages() .getImageDescriptor(ISharedImages.IMG_OBJ_FILE); }
private void createActions() { sampleAction = new Action() { public void run() { MessageDialog.openInformation(null, "aQute Bnd PRO", "Sample Action Executed"); } }; sampleAction.setText("Sample Action"); sampleAction.setToolTipText("Sample Action tool tip"); sampleAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages(). getImageDescriptor(IDE.SharedImages.IMG_OBJS_TASK_TSK)); } public void contributeToMenu(IMenuManager manager) {
public RemoveActiveSessionAction() { setText(ActionMessages.RemoveActiveSessionAction_label); setToolTipText(ActionMessages.RemoveActiveSessionAction_tooltip); ImageDescriptor enabledImageDescriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_REMOVE); setImageDescriptor(enabledImageDescriptor); ImageDescriptor disabledImageDescriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_REMOVE_DISABLED); setDisabledImageDescriptor(disabledImageDescriptor); setActionDefinitionId(ActionFactory.DELETE.getCommandId()); }