summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-09-26 03:49:17 (EDT)
committerEike Stepper2007-09-26 03:49:17 (EDT)
commit007f844cadee1edd4d17399ac7f6d9f8ab199453 (patch)
tree4f53af1c97cd3e76ef2fe9b0f243b829f6d89b33
parentc745909fc56ddbb028c7798f281321c9d6111f74 (diff)
downloadcdo-007f844cadee1edd4d17399ac7f6d9f8ab199453.zip
cdo-007f844cadee1edd4d17399ac7f6d9f8ab199453.tar.gz
cdo-007f844cadee1edd4d17399ac7f6d9f8ab199453.tar.bz2
[204545] Net4j Connectors view shows duplicate channels
https://bugs.eclipse.org/bugs/show_bug.cgi?id=204545
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ItemProvider.java14
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ReflectUtil.java3
2 files changed, 15 insertions, 2 deletions
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ItemProvider.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ItemProvider.java
index 85506f3..117cc4c 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ItemProvider.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ItemProvider.java
@@ -14,11 +14,13 @@ import org.eclipse.net4j.util.internal.ui.bundle.OM;
import org.eclipse.net4j.util.ui.StructuredContentProvider;
import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.ITreeSelection;
import org.eclipse.jface.viewers.LabelProviderChangedEvent;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
@@ -27,7 +29,7 @@ import java.util.ArrayList;
import java.util.List;
public abstract class ItemProvider<INPUT> extends StructuredContentProvider<INPUT> implements ITreeContentProvider,
- ILabelProvider
+ ILabelProvider, IColorProvider
{
public static final Object[] NO_ELEMENTS = {};
@@ -58,6 +60,16 @@ public abstract class ItemProvider<INPUT> extends StructuredContentProvider<INPU
return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
}
+ public Color getBackground(Object element)
+ {
+ return null;
+ }
+
+ public Color getForeground(Object element)
+ {
+ return null;
+ }
+
public boolean isLabelProperty(Object element, String property)
{
return true;
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ReflectUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ReflectUtil.java
index 37f459f..e8deeed 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ReflectUtil.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ReflectUtil.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.util;
import org.eclipse.net4j.internal.util.bundle.OM;
+import org.eclipse.net4j.internal.util.event.Notifier;
import org.eclipse.net4j.internal.util.lifecycle.Lifecycle;
import org.eclipse.net4j.util.collection.Pair;
import org.eclipse.net4j.util.io.IOUtil;
@@ -136,7 +137,7 @@ public final class ReflectUtil
public static void collectFields(Class<?> c, List<Field> fields)
{
- if (c == ROOT_CLASS || c == Lifecycle.class)
+ if (c == ROOT_CLASS || c == Notifier.class)
{
return;
}