Author: dazarov
Date: 2011-12-30 14:55:40 -0500 (Fri, 30 Dec 2011)
New Revision: 37598
Added:
trunk/common/plugins/org.jboss.tools.common.ui/icons/add_annotation.png
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java
Log:
Better icon for CDI Tools
https://issues.jboss.org/browse/JBIDE-10575
Added: trunk/common/plugins/org.jboss.tools.common.ui/icons/add_annotation.png
===================================================================
(Binary files differ)
Property changes on:
trunk/common/plugins/org.jboss.tools.common.ui/icons/add_annotation.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java 2011-12-30
19:30:21 UTC (rev 37597)
+++
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java 2011-12-30
19:55:40 UTC (rev 37598)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.common.ui.marker;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.util.Set;
import org.eclipse.core.resources.IFile;
@@ -33,9 +35,9 @@
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
import org.eclipse.jdt.internal.core.JavaElement;
-import org.eclipse.jdt.internal.ui.JavaPlugin;
-import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jpt.common.core.internal.utility.jdt.ASTTools;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Image;
@@ -233,7 +235,20 @@
@Override
public Image getImage() {
- return
JavaPlugin.getImageDescriptorRegistry().get(JavaPluginImages.DESC_OBJS_ANNOTATION);
+ String key = "ADD_ANNOTATION";
+ ImageRegistry registry = CommonUIPlugin.getDefault().getImageRegistry();
+ Image image = registry.get(key);
+ if (image == null) {
+ try {
+ image = ImageDescriptor.createFromURL(
+ new URL(CommonUIPlugin.getDefault().getBundle()
+ .getEntry("/"), "icons/add_annotation.png")).createImage();
+ registry.put(key, image);
+ } catch (MalformedURLException e) {
+ CommonUIPlugin.getDefault().logError(e);
+ }
+ }
+ return image;
}
private CompilationUnitChange updateAnnotation(String name, String parameter,
ICompilationUnit compilationUnit, IAnnotation annotation) throws JavaModelException{