Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fluegge2010-11-13 16:06:27 +0000
committerMartin Fluegge2010-11-13 16:06:27 +0000
commit1de458e14d3cc89ef59052ba01175e7d20e03497 (patch)
tree36f0bb1eec63e9e6f1f42ebc3325353a3179fa4c /plugins/org.eclipse.net4j.util.ui
parentfde61f3b0bb830b38e16fafa7a3f89e3e54d3235 (diff)
downloadcdo-1de458e14d3cc89ef59052ba01175e7d20e03497.tar.gz
cdo-1de458e14d3cc89ef59052ba01175e7d20e03497.tar.xz
cdo-1de458e14d3cc89ef59052ba01175e7d20e03497.zip
[329632] Create common access mechanism for SharedIcons
https://bugs.eclipse.org/bugs/show_bug.cgi?id=329632
Diffstat (limited to 'plugins/org.eclipse.net4j.util.ui')
-rw-r--r--plugins/org.eclipse.net4j.util.ui/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.net4j.util.ui/build.properties1
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/.cvsignore1
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/.cvsignore1
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/etool16/.cvsignore1
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/etool16/add.gifbin318 -> 0 bytes
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/etool16/delete.gifbin351 -> 0 bytes
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/etool16/refresh.gifbin330 -> 0 bytes
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/obj16/.cvsignore1
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/obj16/adapter.gifbin196 -> 0 bytes
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/obj16/error.gifbin353 -> 0 bytes
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/obj16/factory.gifbin211 -> 0 bytes
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/obj16/folder.gifbin219 -> 0 bytes
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/obj16/javabean.gifbin310 -> 0 bytes
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/obj16/pending.gifbin643 -> 0 bytes
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/view16/.cvsignore1
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/view16/container.gifbin202 -> 0 bytes
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/view16/javabean.gifbin159 -> 0 bytes
-rw-r--r--plugins/org.eclipse.net4j.util.ui/icons/full/view16/javabean_light.gifbin310 -> 0 bytes
-rw-r--r--plugins/org.eclipse.net4j.util.ui/plugin.xml4
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/SharedIcons.java110
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jContainerItemProvider.java2
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java2
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java2
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerView.java2
25 files changed, 8 insertions, 123 deletions
diff --git a/plugins/org.eclipse.net4j.util.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.util.ui/META-INF/MANIFEST.MF
index 1eafefe205..e5f40bdccb 100644
--- a/plugins/org.eclipse.net4j.util.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.util.ui/META-INF/MANIFEST.MF
@@ -11,7 +11,8 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.4.0,4.0.0)";visibility:=reexport,
- org.eclipse.net4j.util;bundle-version="[3.0.0,4.0.0)";visibility:=reexport
+ org.eclipse.net4j.util;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.net4j.ui.shared;bundle-version="[4.0.0,5.0.0)"
Export-Package: org.eclipse.net4j.util.internal.ui;version="3.1.0";x-internal:=true,
org.eclipse.net4j.util.internal.ui.actions;version="3.1.0";x-internal:=true,
org.eclipse.net4j.util.internal.ui.bundle;version="3.1.0";x-internal:=true,
diff --git a/plugins/org.eclipse.net4j.util.ui/build.properties b/plugins/org.eclipse.net4j.util.ui/build.properties
index 89485309a9..34fa3a83e3 100644
--- a/plugins/org.eclipse.net4j.util.ui/build.properties
+++ b/plugins/org.eclipse.net4j.util.ui/build.properties
@@ -16,7 +16,6 @@ bin.includes = META-INF/,\
.options,\
about.html,\
copyright.txt,\
- icons/,\
plugin.properties,\
plugin.xml
src.includes = about.html,\
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/.cvsignore b/plugins/org.eclipse.net4j.util.ui/icons/.cvsignore
deleted file mode 100644
index 085e8baf0c..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Thumbs.db
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/.cvsignore b/plugins/org.eclipse.net4j.util.ui/icons/full/.cvsignore
deleted file mode 100644
index 085e8baf0c..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Thumbs.db
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/etool16/.cvsignore b/plugins/org.eclipse.net4j.util.ui/icons/full/etool16/.cvsignore
deleted file mode 100644
index 085e8baf0c..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/etool16/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Thumbs.db
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/etool16/add.gif b/plugins/org.eclipse.net4j.util.ui/icons/full/etool16/add.gif
deleted file mode 100644
index 252d7ebcb8..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/etool16/add.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/etool16/delete.gif b/plugins/org.eclipse.net4j.util.ui/icons/full/etool16/delete.gif
deleted file mode 100644
index b6922ac11c..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/etool16/delete.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/etool16/refresh.gif b/plugins/org.eclipse.net4j.util.ui/icons/full/etool16/refresh.gif
deleted file mode 100644
index e3831471a6..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/etool16/refresh.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/.cvsignore b/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/.cvsignore
deleted file mode 100644
index 085e8baf0c..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Thumbs.db
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/adapter.gif b/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/adapter.gif
deleted file mode 100644
index e8c1e6ff7e..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/adapter.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/error.gif b/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/error.gif
deleted file mode 100644
index 9b048d6053..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/error.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/factory.gif b/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/factory.gif
deleted file mode 100644
index 955d5e87a5..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/factory.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/folder.gif b/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/folder.gif
deleted file mode 100644
index 42e027c933..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/folder.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/javabean.gif b/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/javabean.gif
deleted file mode 100644
index d9bfbd0541..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/javabean.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/pending.gif b/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/pending.gif
deleted file mode 100644
index 0cb9751233..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/obj16/pending.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/view16/.cvsignore b/plugins/org.eclipse.net4j.util.ui/icons/full/view16/.cvsignore
deleted file mode 100644
index 085e8baf0c..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/view16/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Thumbs.db
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/view16/container.gif b/plugins/org.eclipse.net4j.util.ui/icons/full/view16/container.gif
deleted file mode 100644
index 6a2267e6cc..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/view16/container.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/view16/javabean.gif b/plugins/org.eclipse.net4j.util.ui/icons/full/view16/javabean.gif
deleted file mode 100644
index 854e13912e..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/view16/javabean.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.net4j.util.ui/icons/full/view16/javabean_light.gif b/plugins/org.eclipse.net4j.util.ui/icons/full/view16/javabean_light.gif
deleted file mode 100644
index d9bfbd0541..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/icons/full/view16/javabean_light.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.net4j.util.ui/plugin.xml b/plugins/org.eclipse.net4j.util.ui/plugin.xml
index fdda8a0fcd..e68217f9e1 100644
--- a/plugins/org.eclipse.net4j.util.ui/plugin.xml
+++ b/plugins/org.eclipse.net4j.util.ui/plugin.xml
@@ -24,13 +24,13 @@
id="org.eclipse.net4j.util.Net4jContainerView"
class="org.eclipse.net4j.util.internal.ui.views.Net4jContainerView"
name="%view.name"
- icon="icons/full/view16/container.gif"/>
+ icon="platform:/plugin/org.eclipse.net4j.ui.shared/icons/full/view16/container.gif"/>
<view
category="org.eclipse.net4j.debug"
id="org.eclipse.net4j.util.Net4jIntrospectorView"
class="org.eclipse.net4j.util.internal.ui.views.Net4jIntrospectorView"
name="%view.name.0"
- icon="icons/full/view16/javabean.gif"/>
+ icon="platform:/plugin/org.eclipse.net4j.ui.shared/icons/full/view16/javabean.gif"/>
</extension>
<extension
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/SharedIcons.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/SharedIcons.java
deleted file mode 100644
index 204ced5afd..0000000000
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/SharedIcons.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.util.internal.ui;
-
-import org.eclipse.net4j.util.internal.ui.bundle.OM;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-/**
- * @author Eike Stepper
- */
-public class SharedIcons
-{
- private static final ImageRegistry REGISTRY = new ImageRegistry(getDisplay());
-
- private static final String TOOL = "etool16/"; //$NON-NLS-1$
-
- private static final String OBJ = "obj16/"; //$NON-NLS-1$
-
- private static final String VIEW = "view16/"; //$NON-NLS-1$
-
- public static final String OBJ_ADAPTER = OBJ + "adapter"; //$NON-NLS-1$
-
- public static final String OBJ_FACTORY = OBJ + "factory"; //$NON-NLS-1$
-
- public static final String OBJ_FOLDER = OBJ + "folder"; //$NON-NLS-1$
-
- public static final String OBJ_BEAN = OBJ + "javabean"; //$NON-NLS-1$
-
- public static final String OBJ_ERROR = OBJ + "error"; //$NON-NLS-1$
-
- public static final String OBJ_PENDING = OBJ + "pending"; //$NON-NLS-1$
-
- public static final String VIEW_CONTAINER = VIEW + "container"; //$NON-NLS-1$
-
- public static final String TOOL_ADD = TOOL + "add"; //$NON-NLS-1$
-
- public static final String TOOL_DELETE = TOOL + "delete"; //$NON-NLS-1$
-
- public static final String TOOL_REFRESH = TOOL + "refresh"; //$NON-NLS-1$
-
- public static Image getImage(String key)
- {
- key = mangleKey(key);
- Image image = REGISTRY.get(key);
- if (image == null)
- {
- createDescriptor(key);
- image = REGISTRY.get(key);
- }
-
- return image;
- }
-
- public static ImageDescriptor getDescriptor(String key)
- {
- key = mangleKey(key);
- ImageDescriptor descriptor = REGISTRY.getDescriptor(key);
- if (descriptor == null)
- {
- descriptor = createDescriptor(key);
- }
-
- return descriptor;
- }
-
- private static ImageDescriptor createDescriptor(String key)
- {
- ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(OM.BUNDLE_ID, key);
- if (descriptor != null)
- {
- REGISTRY.put(key, descriptor);
- }
-
- return descriptor;
- }
-
- private static Display getDisplay()
- {
- Display display = Display.getCurrent();
- if (display == null)
- {
- display = Display.getDefault();
- }
-
- if (display == null)
- {
- throw new IllegalStateException("display == null"); //$NON-NLS-1$
- }
-
- return display;
- }
-
- private static String mangleKey(String key)
- {
- return "icons/full/" + key + ".gif"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jContainerItemProvider.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jContainerItemProvider.java
index 019880f23e..64cd8d334b 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jContainerItemProvider.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jContainerItemProvider.java
@@ -10,8 +10,8 @@
*/
package org.eclipse.net4j.util.internal.ui.views;
+import org.eclipse.net4j.ui.internal.icons.SharedIcons;
import org.eclipse.net4j.util.container.IContainer;
-import org.eclipse.net4j.util.internal.ui.SharedIcons;
import org.eclipse.net4j.util.internal.ui.messages.Messages;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import org.eclipse.net4j.util.ui.actions.LongRunningAction;
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java
index 8c3621a559..dfced303e6 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java
@@ -10,6 +10,7 @@
*/
package org.eclipse.net4j.util.internal.ui.views;
+import org.eclipse.net4j.ui.internal.icons.SharedIcons;
import org.eclipse.net4j.util.ReflectUtil;
import org.eclipse.net4j.util.WrappedException;
import org.eclipse.net4j.util.collection.Pair;
@@ -17,7 +18,6 @@ import org.eclipse.net4j.util.container.IPluginContainer;
import org.eclipse.net4j.util.event.EventUtil;
import org.eclipse.net4j.util.event.IEvent;
import org.eclipse.net4j.util.event.IListener;
-import org.eclipse.net4j.util.internal.ui.SharedIcons;
import org.eclipse.net4j.util.internal.ui.bundle.OM;
import org.eclipse.net4j.util.internal.ui.messages.Messages;
import org.eclipse.net4j.util.ui.UIUtil;
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java
index 9797a733bc..482e114e1f 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java
@@ -11,13 +11,13 @@
package org.eclipse.net4j.util.ui.views;
import org.eclipse.net4j.internal.util.bundle.OM;
+import org.eclipse.net4j.ui.internal.icons.SharedIcons;
import org.eclipse.net4j.util.container.ContainerEventAdapter;
import org.eclipse.net4j.util.container.IContainer;
import org.eclipse.net4j.util.container.ISlow;
import org.eclipse.net4j.util.event.EventUtil;
import org.eclipse.net4j.util.event.IEvent;
import org.eclipse.net4j.util.event.IListener;
-import org.eclipse.net4j.util.internal.ui.SharedIcons;
import org.eclipse.net4j.util.lifecycle.LifecycleState;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import org.eclipse.net4j.util.ui.UIUtil;
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerView.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerView.java
index d8cca0525f..48f91393ed 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerView.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerView.java
@@ -10,9 +10,9 @@
*/
package org.eclipse.net4j.util.ui.views;
+import org.eclipse.net4j.ui.internal.icons.SharedIcons;
import org.eclipse.net4j.util.container.IContainer;
import org.eclipse.net4j.util.event.IListener;
-import org.eclipse.net4j.util.internal.ui.SharedIcons;
import org.eclipse.net4j.util.internal.ui.actions.IntrospectAction;
import org.eclipse.net4j.util.internal.ui.bundle.OM;
import org.eclipse.net4j.util.internal.ui.messages.Messages;

Back to the top