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

The following examples show how to use org.eclipse.jdt.internal.ui.JavaPluginImages#DESC_FIELD_DEFAULT . 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: BindingLabelProvider.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private static ImageDescriptor getFieldImageDescriptor(IVariableBinding binding) {
	final int modifiers= binding.getModifiers();
	if (Modifier.isPublic(modifiers) || binding.isEnumConstant())
		return JavaPluginImages.DESC_FIELD_PUBLIC;
	if (Modifier.isProtected(modifiers))
		return JavaPluginImages.DESC_FIELD_PROTECTED;
	if (Modifier.isPrivate(modifiers))
		return JavaPluginImages.DESC_FIELD_PRIVATE;

	return JavaPluginImages.DESC_FIELD_DEFAULT;
}
 
Example 2
Source File: JavaElementImageProvider.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public static ImageDescriptor getFieldImageDescriptor(boolean isInInterfaceOrAnnotation, int flags) {
	if (Flags.isPublic(flags) || isInInterfaceOrAnnotation || Flags.isEnum(flags))
		return JavaPluginImages.DESC_FIELD_PUBLIC;
	if (Flags.isProtected(flags))
		return JavaPluginImages.DESC_FIELD_PROTECTED;
	if (Flags.isPrivate(flags))
		return JavaPluginImages.DESC_FIELD_PRIVATE;

	return JavaPluginImages.DESC_FIELD_DEFAULT;
}
 
Example 3
Source File: HistoryDropDownAction.java    From lapse-plus with GNU General Public License v3.0 4 votes vote down vote up
private ImageDescriptor getImageDescriptor(HistoryDefinitionLocation elem) {
	JavaElementImageProvider imageProvider= new JavaElementImageProvider();
	ImageDescriptor desc = JavaPluginImages.DESC_FIELD_DEFAULT;
	imageProvider.dispose();
	return desc;
}