org.eclipse.jface.text.source.ImageUtilities Java Examples
The following examples show how to use
org.eclipse.jface.text.source.ImageUtilities.
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: ModulaEditor.java From xds-ide with Eclipse Public License 1.0 | 5 votes |
@Override public boolean paint(SourceCodeTextEditor editor, MarkerAnnotation annotation, GC gc, Canvas canvas, Rectangle bounds) { IMarker marker = annotation.getMarker(); try { if (marker.exists() && XdsMarkerConstants.PARSER_PROBLEM.equals(marker.getType())) { boolean isInCompilationSet = CompilationSetManager.getInstance().isInCompilationSet((IFile)marker.getResource()); if (!isInCompilationSet) { int actualSeverity = marker.getAttribute(XdsMarkerConstants.PARSER_PROBLEM_SEVERITY_ATTRIBUTE, -1); if (actualSeverity > -1) { Image image = null; switch (actualSeverity) { case IMarker.SEVERITY_ERROR: image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK); break; case IMarker.SEVERITY_WARNING: image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK); break; default: break; } if (image != null) { ImageUtilities.drawImage(image, gc, canvas, bounds, SWT.CENTER, SWT.TOP); return true; } return false; } } } } catch (CoreException e) { LogHelper.logError(e); } return false; }
Example #2
Source File: ProblemAnnotation.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
public void paint(GC gc, Canvas canvas, Rectangle r) { initializeImage(); if (fImage != null) { ImageUtilities.drawImage(fImage, gc, canvas, r, SWT.CENTER, SWT.TOP); } }
Example #3
Source File: XtextAnnotation.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
@Override public void paint(GC gc, Canvas canvas, Rectangle bounds) { Image image = getImages().get(getType()); if(image != null) ImageUtilities.drawImage(image, gc, canvas, bounds, SWT.CENTER, SWT.TOP); }
Example #4
Source File: CompilationUnitDocumentProvider.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public void paint(GC gc, Canvas canvas, Rectangle r) { initializeImage(); if (fImage != null) ImageUtilities.drawImage(fImage, gc, canvas, r, SWT.CENTER, SWT.TOP); }
Example #5
Source File: JavaExpandHover.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public void paint(GC gc, Canvas canvas, Rectangle bounds) { // draw affordance so the user know she can click here to get a breakpoint Image fImage= JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PUBLIC); ImageUtilities.drawImage(fImage, gc, canvas, bounds, SWT.CENTER); }
Example #6
Source File: QuickAssistLightBulbUpdater.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public void paint(GC gc, Canvas canvas, Rectangle r) { ImageUtilities.drawImage(getImage(), gc, canvas, r, SWT.CENTER, SWT.TOP); }