Java Code Examples for org.eclipse.ui.ISharedImages#getImage()
The following examples show how to use
org.eclipse.ui.ISharedImages#getImage() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GraphStatsView.java From eclipse-cs with GNU Lesser General Public License v2.1 | 6 votes |
/** * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, * int) */ @Override public Image getColumnImage(Object obj, int index) { Image image = null; IMarker marker = (IMarker) obj; if (index == 0) { int severity = MarkerUtilities.getSeverity(marker); ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); if (IMarker.SEVERITY_ERROR == severity) { image = sharedImages.getImage(ISharedImages.IMG_OBJS_ERROR_TSK); } else if (IMarker.SEVERITY_WARNING == severity) { image = sharedImages.getImage(ISharedImages.IMG_OBJS_WARN_TSK); } else if (IMarker.SEVERITY_INFO == severity) { image = sharedImages.getImage(ISharedImages.IMG_OBJS_INFO_TSK); } } return image; }
Example 2
Source File: MarkerStatsView.java From eclipse-cs with GNU Lesser General Public License v2.1 | 6 votes |
@Override public Image getColumnImage(Object obj, int index) { Image image = null; MarkerStat stat = (MarkerStat) obj; if (index == 0) { int severity = stat.getMaxSeverity(); ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); if (IMarker.SEVERITY_ERROR == severity) { image = sharedImages.getImage(ISharedImages.IMG_OBJS_ERROR_TSK); } else if (IMarker.SEVERITY_WARNING == severity) { image = sharedImages.getImage(ISharedImages.IMG_OBJS_WARN_TSK); } else if (IMarker.SEVERITY_INFO == severity) { image = sharedImages.getImage(ISharedImages.IMG_OBJS_INFO_TSK); } } return image; }
Example 3
Source File: MarkerStatsView.java From eclipse-cs with GNU Lesser General Public License v2.1 | 6 votes |
@Override public Image getColumnImage(Object obj, int index) { Image image = null; IMarker marker = (IMarker) obj; if (index == 0) { int severity = MarkerUtilities.getSeverity(marker); ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); if (IMarker.SEVERITY_ERROR == severity) { image = sharedImages.getImage(ISharedImages.IMG_OBJS_ERROR_TSK); } else if (IMarker.SEVERITY_WARNING == severity) { image = sharedImages.getImage(ISharedImages.IMG_OBJS_WARN_TSK); } else if (IMarker.SEVERITY_INFO == severity) { image = sharedImages.getImage(ISharedImages.IMG_OBJS_INFO_TSK); } } return image; }
Example 4
Source File: XtextPluginImages.java From xtext-eclipse with Eclipse Public License 2.0 | 6 votes |
private static final void initializeImageMaps() { if(imagesInitialized) return; annotationImagesFixable.put(XtextEditor.ERROR_ANNOTATION_TYPE, get(OBJ_FIXABLE_ERROR)); annotationImagesFixable.put(XtextEditor.WARNING_ANNOTATION_TYPE, get(OBJ_FIXABLE_WARNING)); annotationImagesFixable.put(XtextEditor.INFO_ANNOTATION_TYPE, get(OBJ_FIXABLE_INFO)); ISharedImages sharedImages= PlatformUI.getWorkbench().getSharedImages(); Image error = sharedImages.getImage(ISharedImages.IMG_OBJS_ERROR_TSK); Image warning = sharedImages.getImage(ISharedImages.IMG_OBJS_WARN_TSK); Image info = sharedImages.getImage(ISharedImages.IMG_OBJS_INFO_TSK); annotationImagesNonFixable.put(XtextEditor.ERROR_ANNOTATION_TYPE, error); annotationImagesNonFixable.put(XtextEditor.WARNING_ANNOTATION_TYPE, warning); annotationImagesNonFixable.put(XtextEditor.INFO_ANNOTATION_TYPE, info); Display display = Display.getCurrent(); annotationImagesDeleted.put(XtextEditor.ERROR_ANNOTATION_TYPE, new Image(display, error, SWT.IMAGE_GRAY)); annotationImagesDeleted.put(XtextEditor.WARNING_ANNOTATION_TYPE, new Image(display, warning, SWT.IMAGE_GRAY)); annotationImagesDeleted.put(XtextEditor.INFO_ANNOTATION_TYPE, new Image(display, info, SWT.IMAGE_GRAY)); imagesInitialized = true; }
Example 5
Source File: BuilderPropertyPage.java From statecharts with Eclipse Public License 1.0 | 5 votes |
@Override public Image getImage(Object element) { ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); return element instanceof IFile ? sharedImages.getImage(ISharedImages.IMG_OBJ_FILE) : sharedImages.getImage(ISharedImages.IMG_OBJ_FOLDER); }
Example 6
Source File: ProblemAnnotation.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
private void initializeImages() { if (fgImagesInitialized) { return; } ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); fgTaskImage = sharedImages.getImage(SharedImages.IMG_OBJS_TASK_TSK); fgInfoImage = sharedImages.getImage(ISharedImages.IMG_OBJS_INFO_TSK); fgWarningImage = sharedImages.getImage(ISharedImages.IMG_OBJS_WARN_TSK); fgErrorImage = sharedImages.getImage(ISharedImages.IMG_OBJS_ERROR_TSK); fgImagesInitialized = true; }
Example 7
Source File: CompilationUnitDocumentProvider.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void initializeImages() { if (fgImagesInitialized) return; fgQuickFixImage= JavaPluginImages.get(JavaPluginImages.IMG_OBJS_FIXABLE_PROBLEM); fgQuickFixErrorImage= JavaPluginImages.get(JavaPluginImages.IMG_OBJS_FIXABLE_ERROR); ISharedImages sharedImages= PlatformUI.getWorkbench().getSharedImages(); fgTaskImage= sharedImages.getImage(SharedImages.IMG_OBJS_TASK_TSK); fgInfoImage= sharedImages.getImage(ISharedImages.IMG_OBJS_INFO_TSK); fgWarningImage= sharedImages.getImage(ISharedImages.IMG_OBJS_WARN_TSK); fgErrorImage= sharedImages.getImage(ISharedImages.IMG_OBJS_ERROR_TSK); fgImagesInitialized= true; }