summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-11-07 06:44:57 (EST)
committerEike Stepper2007-11-07 06:44:57 (EST)
commit2dc319a39d530bab406ee3a3e3e386b81f216698 (patch)
tree5649f89a0711768de7b51f56cc2c37d8335fbabf
parentffd31784f53135d2749ef253e5d13741228c0f44 (diff)
downloadcdo-2dc319a39d530bab406ee3a3e3e386b81f216698.zip
cdo-2dc319a39d530bab406ee3a3e3e386b81f216698.tar.gz
cdo-2dc319a39d530bab406ee3a3e3e386b81f216698.tar.bz2
[209003] Add Introspector action to look at IPluginContainer.INSTANCE
https://bugs.eclipse.org/bugs/show_bug.cgi?id=209003
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/SharedIcons.java8
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java23
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerView.java6
3 files changed, 30 insertions, 7 deletions
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
index 0b18dec1..0186e77 100644
--- 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
@@ -25,7 +25,7 @@ public class SharedIcons
{
private static final ImageRegistry REGISTRY = new ImageRegistry(getDisplay());
- private static final String ETOOL = "etool16/";
+ private static final String TOOL = "etool16/";
private static final String OBJ = "obj16/";
@@ -41,11 +41,11 @@ public class SharedIcons
public static final String VIEW_CONTAINER = VIEW + "container";
- public static final String ETOOL_ADD = ETOOL + "add";
+ public static final String TOOL_ADD = TOOL + "add";
- public static final String ETOOL_DELETE = ETOOL + "delete";
+ public static final String TOOL_DELETE = TOOL + "delete";
- public static final String ETOOL_REFRESH = ETOOL + "refresh";
+ public static final String TOOL_REFRESH = TOOL + "refresh";
public static Image getImage(String key)
{
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 a5bc989..c012660 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
@@ -12,9 +12,11 @@ package org.eclipse.net4j.util.internal.ui.views;
import org.eclipse.net4j.util.ReflectUtil;
import org.eclipse.net4j.util.collection.Pair;
+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.ui.UIUtil;
@@ -76,6 +78,8 @@ public class Net4jIntrospectorView extends ViewPart implements ISelectionListene
private IAction backAction = new BackAction();
+ private IAction containerAction = new ContainerAction();
+
private StackLayout stackLayout;
private Composite stacked;
@@ -360,6 +364,7 @@ public class Net4jIntrospectorView extends ViewPart implements ISelectionListene
private void fillLocalToolBar(IToolBarManager manager)
{
manager.add(backAction);
+ manager.add(containerAction);
}
/**
@@ -392,6 +397,24 @@ public class Net4jIntrospectorView extends ViewPart implements ISelectionListene
/**
* @author Eike Stepper
*/
+ class ContainerAction extends Action
+ {
+ private ContainerAction()
+ {
+ super("Container");
+ setImageDescriptor(SharedIcons.getDescriptor(SharedIcons.VIEW_CONTAINER));
+ }
+
+ @Override
+ public void run()
+ {
+ setObject(IPluginContainer.INSTANCE);
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
abstract class AbstractContentProvider implements IStructuredContentProvider
{
public void inputChanged(Viewer v, Object oldInput, Object newInput)
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 8699560..7e0cd1e 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
@@ -398,17 +398,17 @@ public abstract class ContainerView extends ViewPart implements ISetSelectionTar
public static ImageDescriptor getAddImageDescriptor()
{
- return SharedIcons.getDescriptor(SharedIcons.ETOOL_ADD);
+ return SharedIcons.getDescriptor(SharedIcons.TOOL_ADD);
}
public static ImageDescriptor getDeleteImageDescriptor()
{
- return SharedIcons.getDescriptor(SharedIcons.ETOOL_DELETE);
+ return SharedIcons.getDescriptor(SharedIcons.TOOL_DELETE);
}
public static ImageDescriptor getRefreshImageDescriptor()
{
- return SharedIcons.getDescriptor(SharedIcons.ETOOL_REFRESH);
+ return SharedIcons.getDescriptor(SharedIcons.TOOL_REFRESH);
}
protected static enum MessageType