Java Code Examples for org.eclipse.jdt.internal.ui.JavaPlugin#getImageDescriptorRegistry()

The following examples show how to use org.eclipse.jdt.internal.ui.JavaPlugin#getImageDescriptorRegistry() . 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: NameConventionConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
public Image getColumnImage(Object element, int columnIndex) {
	if (columnIndex != 0) {
		return null;
	}

	NameConventionEntry entry= (NameConventionEntry) element;
	ImageDescriptorRegistry registry= JavaPlugin.getImageDescriptorRegistry();
	switch (entry.kind) {
		case FIELD:
			return registry.get(JavaPluginImages.DESC_FIELD_PUBLIC);
		case STATIC:
			return registry.get(new JavaElementImageDescriptor(JavaPluginImages.DESC_FIELD_PUBLIC, JavaElementImageDescriptor.STATIC, JavaElementImageProvider.SMALL_SIZE));
		case STATIC_FINAL:
			return registry.get(new JavaElementImageDescriptor(JavaPluginImages.DESC_FIELD_PUBLIC, JavaElementImageDescriptor.STATIC | JavaElementImageDescriptor.FINAL, JavaElementImageProvider.SMALL_SIZE));
		case ARGUMENT:
			return registry.get(JavaPluginImages.DESC_OBJS_LOCAL_VARIABLE);
		default:
			return registry.get(JavaPluginImages.DESC_OBJS_LOCAL_VARIABLE);
	}
}
 
Example 2
Source File: MembersOrderPreferencePage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
@Override
public Image getImage(Object element) {
	//access to image registry
	ImageDescriptorRegistry registry= JavaPlugin.getImageDescriptorRegistry();
	ImageDescriptor descriptor= null;

	if (element instanceof String) {
		String s= (String) element;
		if (s.equals(PUBLIC)) {
			descriptor= JavaElementImageProvider.getMethodImageDescriptor(false, Flags.AccPublic);
		} else if (s.equals(PRIVATE)) {
			descriptor= JavaElementImageProvider.getMethodImageDescriptor(false, Flags.AccPrivate);
		} else if (s.equals(PROTECTED)) {
			descriptor= JavaElementImageProvider.getMethodImageDescriptor(false, Flags.AccProtected);
		} else if (s.equals(DEFAULT)) {
			descriptor= JavaElementImageProvider.getMethodImageDescriptor(false, Flags.AccDefault);
		}
		return registry.get(descriptor);
	}
	return null;
}
 
Example 3
Source File: VariableNamesProcessor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public VariableNamesProcessor(String[] tempNameProposals) {
	fTempNameProposals= tempNameProposals.clone();
	Arrays.sort(fTempNameProposals);
	fImageRegistry= JavaPlugin.getImageDescriptorRegistry();
	fProposalImageDescriptor= JavaPluginImages.DESC_OBJS_LOCAL_VARIABLE;

}
 
Example 4
Source File: CPListLabelProvider.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public CPListLabelProvider() {
	fNewLabel= NewWizardMessages.CPListLabelProvider_new;
	fClassLabel= NewWizardMessages.CPListLabelProvider_classcontainer;
	fMissing= NewWizardMessages.CPListLabelProvider_missing;
	fRegistry= JavaPlugin.getImageDescriptorRegistry();

	fSharedImages= JavaUI.getSharedImages();

	IWorkbench workbench= JavaPlugin.getDefault().getWorkbench();

	fProjectImage= workbench.getSharedImages().getImageDescriptor(IDE.SharedImages.IMG_OBJ_PROJECT);
	fAttributeDescriptors= JavaPlugin.getDefault().getClasspathAttributeConfigurationDescriptors();
}
 
Example 5
Source File: PackagesViewLabelProvider.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
PackagesViewLabelProvider(int state, long textFlags, int imageFlags) {
	super(textFlags, imageFlags);

	Assert.isTrue(isValidState(state));
	fViewState= state;
	fRegistry= JavaPlugin.getImageDescriptorRegistry();

	fDecorator= new TreeHierarchyLayoutProblemsDecorator(isFlatView());
	addLabelDecorator(fDecorator);
}
 
Example 6
Source File: WebappProjectPropertyPage.java    From gwt-eclipse-plugin with Eclipse Public License 1.0 4 votes vote down vote up
public ExcludedJarLabelProvider() {
  ImageDescriptorRegistry registry = JavaPlugin.getImageDescriptorRegistry();
  elementImage = registry.get(JavaPluginImages.DESC_OBJS_JAR);
}
 
Example 7
Source File: BuildpathJarSelectionDialog.java    From gwt-eclipse-plugin with Eclipse Public License 1.0 4 votes vote down vote up
public JarsLabelProvider() {
  ImageDescriptorRegistry registry = JavaPlugin.getImageDescriptorRegistry();
  elementImage = registry.get(JavaPluginImages.DESC_OBJS_JAR);
}
 
Example 8
Source File: ProblemsLabelDecorator.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private ImageDescriptorRegistry getRegistry() {
	if (fRegistry == null) {
		fRegistry= fUseNewRegistry ? new ImageDescriptorRegistry() : JavaPlugin.getImageDescriptorRegistry();
	}
	return fRegistry;
}
 
Example 9
Source File: OverrideIndicatorLabelDecorator.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private ImageDescriptorRegistry getRegistry() {
	if (fRegistry == null) {
		fRegistry= fUseNewRegistry ? new ImageDescriptorRegistry() : JavaPlugin.getImageDescriptorRegistry();
	}
	return fRegistry;
}
 
Example 10
Source File: BindingLabelProvider.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private ImageDescriptorRegistry getRegistry() {
	if (fRegistry == null)
		fRegistry= JavaPlugin.getImageDescriptorRegistry();
	return fRegistry;
}
 
Example 11
Source File: JavaElementImageProvider.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private ImageDescriptorRegistry getRegistry() {
	if (fRegistry == null) {
		fRegistry= JavaPlugin.getImageDescriptorRegistry();
	}
	return fRegistry;
}
 
Example 12
Source File: ExclusionInclusionDialog.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public ExclusionInclusionLabelProvider(ImageDescriptor descriptor) {
	ImageDescriptorRegistry registry= JavaPlugin.getImageDescriptorRegistry();
	fElementImage= registry.get(descriptor);
}
 
Example 13
Source File: SetFilterWizardPage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public ExclusionInclusionLabelProvider(ImageDescriptor descriptor) {
	ImageDescriptorRegistry registry= JavaPlugin.getImageDescriptorRegistry();
	fElementImage= registry.get(descriptor);
}