类org.eclipse.jface.text.source.ImageUtilities源码实例Demo

下面列出了怎么用org.eclipse.jface.text.source.ImageUtilities的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: xds-ide   文件: ModulaEditor.java
@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;
 	}
 
源代码2 项目: APICloud-Studio   文件: ProblemAnnotation.java
public void paint(GC gc, Canvas canvas, Rectangle r)
{
	initializeImage();
	if (fImage != null)
	{
		ImageUtilities.drawImage(fImage, gc, canvas, r, SWT.CENTER, SWT.TOP);
	}
}
 
源代码3 项目: xtext-eclipse   文件: XtextAnnotation.java
@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);
}
 
public void paint(GC gc, Canvas canvas, Rectangle r) {
	initializeImage();
	if (fImage != null)
		ImageUtilities.drawImage(fImage, gc, canvas, r, SWT.CENTER, SWT.TOP);
}
 
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);
}
 
public void paint(GC gc, Canvas canvas, Rectangle r) {
	ImageUtilities.drawImage(getImage(), gc, canvas, r, SWT.CENTER, SWT.TOP);
}
 
 类所在包
 类方法
 同包方法