Java Code Examples for org.eclipse.jdt.internal.ui.JavaPluginImages#DESC_OBJS_GHOST

The following examples show how to use org.eclipse.jdt.internal.ui.JavaPluginImages#DESC_OBJS_GHOST . 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: JavaElementImageProvider.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Returns an image descriptor for a java element. The descriptor includes overlays, if specified.
 * @param element the Java element
 * @param flags the image flags
 * @return returns the image descriptor
 */
public ImageDescriptor getJavaImageDescriptor(IJavaElement element, int flags) {
	Point size= useSmallSize(flags) ? SMALL_SIZE : BIG_SIZE;

	ImageDescriptor baseDesc= getBaseImageDescriptor(element, flags);
	if (baseDesc != null) {
		int adornmentFlags= computeJavaAdornmentFlags(element, flags);
		return new JavaElementImageDescriptor(baseDesc, adornmentFlags, size);
	}
	return new JavaElementImageDescriptor(JavaPluginImages.DESC_OBJS_GHOST, 0, size);
}
 
Example 2
Source File: JavaCompareUtilities.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
static ImageDescriptor getImageDescriptor(IMember element) {
	int t= element.getElementType();
	if (t == IJavaElement.TYPE) {
		IType type= (IType) element;
		try {
			return getTypeImageDescriptor(type.isClass());
		} catch (CoreException e) {
			JavaPlugin.log(e);
			return JavaPluginImages.DESC_OBJS_GHOST;
		}
	}
	return getImageDescriptor(t);
}