Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2014-12-07 09:20:42 +0000
committerEsteban Dugueperoux2014-12-08 07:59:10 +0000
commitc34e3388b9035981bceb658b5682a64070de0edc (patch)
tree1c535fd4d4b3ae4f4266be51e12dd65a9552cd80 /plugins
parent6ef8eb3c8a00a3410e2bcbce25d6cd1218f3fabf (diff)
downloadcdo-c34e3388b9035981bceb658b5682a64070de0edc.tar.gz
cdo-c34e3388b9035981bceb658b5682a64070de0edc.tar.xz
cdo-c34e3388b9035981bceb658b5682a64070de0edc.zip
[453211] CDO 4.3/4.4 not compatible with Juno
Change-Id: I85abde151647b48d9303a13e93ed19268070120f Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=453211
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.security.ui/META-INF/MANIFEST.MF20
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java58
2 files changed, 64 insertions, 14 deletions
diff --git a/plugins/org.eclipse.emf.cdo.security.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.security.ui/META-INF/MANIFEST.MF
index b729a3a9d6..1c0a772c43 100644
--- a/plugins/org.eclipse.emf.cdo.security.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.security.ui/META-INF/MANIFEST.MF
@@ -1,27 +1,27 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.security.ui;singleton:=true
-Bundle-Version: 4.3.0.qualifier
+Bundle-Version: 4.3.100.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-ClassPath: .
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.emf.cdo.security.internal.ui.bundle;version="4.3.0";x-internal:=true,
- org.eclipse.emf.cdo.security.internal.ui.dialogs;version="4.3.0";x-internal:=true,
- org.eclipse.emf.cdo.security.internal.ui.editor;version="4.3.0";x-internal:=true,
- org.eclipse.emf.cdo.security.internal.ui.handlers;version="4.3.0";x-internal:=true,
- org.eclipse.emf.cdo.security.internal.ui.messages;version="4.3.0";x-internal:=true,
- org.eclipse.emf.cdo.security.internal.ui.util;version="4.3.0";x-internal:=true,
- org.eclipse.emf.cdo.security.ui;version="4.3.0"
+Export-Package: org.eclipse.emf.cdo.security.internal.ui.bundle;version="4.3.100";x-internal:=true,
+ org.eclipse.emf.cdo.security.internal.ui.dialogs;version="4.3.100";x-internal:=true,
+ org.eclipse.emf.cdo.security.internal.ui.editor;version="4.3.100";x-internal:=true,
+ org.eclipse.emf.cdo.security.internal.ui.handlers;version="4.3.100";x-internal:=true,
+ org.eclipse.emf.cdo.security.internal.ui.messages;version="4.3.100";x-internal:=true,
+ org.eclipse.emf.cdo.security.internal.ui.util;version="4.3.100";x-internal:=true,
+ org.eclipse.emf.cdo.security.ui;version="4.3.100"
Require-Bundle: org.eclipse.emf.cdo.security;bundle-version="[4.3.0,5.0.0)",
org.eclipse.emf.cdo.security.edit;bundle-version="[4.1.0,5.0.0)",
org.eclipse.emf.cdo.ui;bundle-version="[4.3.0,5.0.0)",
org.eclipse.emf.cdo.ui.shared;bundle-version="[4.2.0,5.0.0)",
org.eclipse.net4j.util.ui;bundle-version="[3.4.0,4.0.0)",
org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)";resolution:=optional,
- org.eclipse.ui.forms;bundle-version="[3.6.0,4.0.0)",
- org.eclipse.emf.databinding.edit;bundle-version="[1.3.0,2.0.0)",
+ org.eclipse.ui.forms;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.emf.databinding.edit;bundle-version="[1.2.0,2.0.0)",
org.eclipse.jface.databinding;bundle-version="[1.6.0,2.0.0)",
org.eclipse.core.databinding.beans;bundle-version="[1.2.0,2.0.0)",
org.eclipse.emf.cdo.admin;bundle-version="[4.1.0,5.0.0)"
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
index c1db9d5106..ac9ad827e8 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
@@ -39,6 +39,7 @@ import org.eclipse.emf.cdo.view.CDOViewTargetChangedEvent;
import org.eclipse.emf.internal.cdo.view.CDOStateMachine;
import org.eclipse.net4j.util.AdapterUtil;
+import org.eclipse.net4j.util.ReflectUtil;
import org.eclipse.net4j.util.event.IEvent;
import org.eclipse.net4j.util.event.IListener;
import org.eclipse.net4j.util.ui.UIUtil;
@@ -107,6 +108,7 @@ import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.IInputProvider;
import org.eclipse.jface.viewers.ILabelDecorator;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection;
@@ -161,6 +163,7 @@ import org.eclipse.ui.views.properties.PropertySheetSorter;
import java.io.IOException;
import java.io.InputStream;
+import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.text.MessageFormat;
import java.util.ArrayList;
@@ -211,6 +214,8 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
return Collections.unmodifiableList(result);
}
+ private static final Field VIEWER_FIELD = getViewerField();
+
/**
* @ADDED
*/
@@ -1329,11 +1334,44 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
for (PropertySheetPage propertySheetPage : propertySheetPages)
{
- if (propertySheetPage instanceof ExtendedPropertySheetPage)
+ List<?> objects = null;
+
+ try
+ {
+ // Bug 453211: ExtendedPropertySheetPage.getInput() is only available since EMF 2.9.
+ if (propertySheetPage instanceof ExtendedPropertySheetPage)
+ {
+ ExtendedPropertySheetPage page = (ExtendedPropertySheetPage)propertySheetPage;
+ objects = page.getInput();
+ }
+ }
+ catch (NoSuchMethodError ex)
{
- ExtendedPropertySheetPage page = (ExtendedPropertySheetPage)propertySheetPage;
- List<?> input = page.getInput();
- for (Object object : input)
+ if (VIEWER_FIELD == null)
+ {
+ throw ex;
+ }
+
+ //$FALL-THROUGH$
+ }
+
+ if (objects == null)
+ {
+ Object value = ReflectUtil.getValue(VIEWER_FIELD, propertySheetPage);
+ if (value instanceof IInputProvider)
+ {
+ IInputProvider inputProvider = (IInputProvider)value;
+ Object input = inputProvider.getInput();
+ if (input instanceof Object[])
+ {
+ objects = Arrays.asList((Object[])input);
+ }
+ }
+ }
+
+ if (objects != null)
+ {
+ for (Object object : objects)
{
if (object == cdoObject)
{
@@ -2638,6 +2676,18 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
}
}
+ private static Field getViewerField()
+ {
+ try
+ {
+ return ReflectUtil.getField(PropertySheetPage.class, "viewer");
+ }
+ catch (Throwable ex)
+ {
+ return null;
+ }
+ }
+
/**
* @author Eike Stepper
* @ADDED

Back to the top