private Image getDefaultImage() { if (fDefaultImage == null) fDefaultImage= PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE); return fDefaultImage; } }
private Image findImage(IStatus status) { if (status.isOK()) { return null; } else if (status.matches(IStatus.ERROR)) { return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK); } else if (status.matches(IStatus.WARNING)) { return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK); } else if (status.matches(IStatus.INFO)) { return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK); } return null; }
private static void addRemoveProposal(IInvocationContext context, ASTRewrite rewrite, String label, Collection<ICommandAccess> proposals) { Image image= JavaPlugin.getDefault().getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_DELETE); ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 10, image); proposals.add(proposal); }
private static void addProposal(IInvocationContext context, Collection proposals, final UnusedCodeFix fix) { if (fix != null) { Image image= JavaPlugin.getDefault().getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_DELETE); FixCorrectionProposal proposal= new FixCorrectionProposal(fix, fix.getCleanUp(), 10, image, context); proposals.add(proposal); } }
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 Image getImage(Object element) { if(element instanceof ParentHierarchyEntry) { ParentHierarchyEntry project = (ParentHierarchyEntry) element; if(project.getFacade() == null) { // This project is not in the workspace return MavenImages.getOverlayImage(MavenImages.PATH_JAR, MavenImages.PATH_LOCK, IDecoration.BOTTOM_LEFT); } return PlatformUI.getWorkbench().getSharedImages().getImage(IDE.SharedImages.IMG_OBJ_PROJECT); } return null; } }
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 static void getUnnecessaryNLSTagProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) throws CoreException { IFix fix= StringFix.createFix(context.getASTRoot(), problem, true, false); if (fix != null) { Image image= JavaPlugin.getDefault().getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_DELETE); Map options= new Hashtable(); options.put(CleanUpConstants.REMOVE_UNNECESSARY_NLS_TAGS, CleanUpConstants.TRUE); FixCorrectionProposal proposal= new FixCorrectionProposal(fix, new StringCleanUp(options), 6, image, context); proposal.setCommandId(REMOVE_UNNECESSARY_NLS_TAG_ID); proposals.add(proposal); } }
private void updateProjectTreeItem(TreeItem item, IProject project) { item.setImage(0, PlatformUI.getWorkbench().getSharedImages() .getImage(SharedImages.IMG_OBJ_PROJECT)); item.setText(0, project.getName()); }
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 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 CPVariableElementLabelProvider(boolean highlightReadOnly) { ImageRegistry reg= JavaPlugin.getDefault().getImageRegistry(); fJARImage= reg.get(JavaPluginImages.IMG_OBJS_EXTJAR); fFolderImage= PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER); fDeprecatedJARImage= new DecorationOverlayIcon(fJARImage, JavaPluginImages.DESC_OVR_DEPRECATED, IDecoration.TOP_LEFT).createImage(); fDeprecatedFolderImage= new DecorationOverlayIcon(fFolderImage, JavaPluginImages.DESC_OVR_DEPRECATED, IDecoration.TOP_LEFT).createImage(); fHighlightReadOnly= highlightReadOnly; }
public CPVariableElementLabelProvider(boolean highlightReadOnly) { ImageRegistry reg= JavaPlugin.getDefault().getImageRegistry(); fJARImage= reg.get(JavaPluginImages.IMG_OBJS_EXTJAR); fFolderImage= PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER); fDeprecatedJARImage= new DecorationOverlayIcon(fJARImage, JavaPluginImages.DESC_OVR_DEPRECATED, IDecoration.TOP_LEFT).createImage(); fDeprecatedFolderImage= new DecorationOverlayIcon(fFolderImage, JavaPluginImages.DESC_OVR_DEPRECATED, IDecoration.TOP_LEFT).createImage(); fHighlightReadOnly= highlightReadOnly; }
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(IWorkbenchSite site, Clipboard clipboard) { super(site); fClipboard= clipboard; setId(ID); setText(ReorgMessages.PasteAction_4); setDescription(ReorgMessages.PasteAction_5); ISharedImages workbenchImages= JavaPlugin.getDefault().getWorkbench().getSharedImages(); setDisabledImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED)); setImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE)); setHoverImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE)); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.PASTE_ACTION); }
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 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()); }