Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2020-06-15 14:23:31 +0000
committerEike Stepper2020-06-15 14:23:31 +0000
commit312603b5a8aaead3e750419c0a16e50f434eefb3 (patch)
treeea20c81376a28c6ef68c463e35d946063d867165
parentc1f77186ad65be25c70fbb19a96e54a56b1d641c (diff)
downloadcdo-312603b5a8aaead3e750419c0a16e50f434eefb3.tar.gz
cdo-312603b5a8aaead3e750419c0a16e50f434eefb3.tar.xz
cdo-312603b5a8aaead3e750419c0a16e50f434eefb3.zip
[564301] CDOModelEditorInput.getObjectID() does not work
https://bugs.eclipse.org/bugs/show_bug.cgi?id=564301
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/META-INF/MANIFEST.MF24
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/pom.xml2
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOModelEditorInput.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF36
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/pom.xml2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java18
6 files changed, 52 insertions, 38 deletions
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.explorer.ui/META-INF/MANIFEST.MF
index 362ab39966..bc32b34b09 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.explorer.ui;singleton:=true
-Bundle-Version: 4.6.0.qualifier
+Bundle-Version: 4.6.1.qualifier
Bundle-Activator: org.eclipse.emf.cdo.explorer.ui.bundle.OM$Activator
Bundle-Vendor: %providerName
Bundle-ClassPath: .
@@ -24,16 +24,16 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.cdo.ui.shared;bundle-version="[4.0.0,5.0.0)",
org.eclipse.emf.cdo.ui.compare;bundle-version="[4.0.0,5.0.0)";resolution:=optional,
org.eclipse.emf.cdo.ui.team;bundle-version="[4.0.0,5.0.0)";resolution:=optional
-Export-Package: org.eclipse.emf.cdo.explorer.ui;version="4.6.0";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.actions;version="4.6.0";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.application;version="4.6.0";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.bundle;version="4.6.0";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.checkouts;version="4.6.0";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.checkouts.actions;version="4.6.0";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.checkouts.wizards;version="4.6.0";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.handlers;version="4.6.0";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.properties;version="4.6.0";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.repositories;version="4.6.0";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.repositories.wizards;version="4.6.0";x-internal:=true
+Export-Package: org.eclipse.emf.cdo.explorer.ui;version="4.6.1";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.actions;version="4.6.1";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.application;version="4.6.1";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.bundle;version="4.6.1";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.checkouts;version="4.6.1";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.checkouts.actions;version="4.6.1";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.checkouts.wizards;version="4.6.1";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.handlers;version="4.6.1";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.properties;version="4.6.1";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.repositories;version="4.6.1";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.repositories.wizards;version="4.6.1";x-internal:=true
Eclipse-BuddyPolicy: registered
Automatic-Module-Name: org.eclipse.emf.cdo.explorer.ui
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/pom.xml b/plugins/org.eclipse.emf.cdo.explorer.ui/pom.xml
index 0e227dd789..53970bdb48 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/pom.xml
@@ -25,7 +25,7 @@
<groupId>org.eclipse.emf.cdo</groupId>
<artifactId>org.eclipse.emf.cdo.explorer.ui</artifactId>
- <version>4.6.0-SNAPSHOT</version>
+ <version>4.6.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOModelEditorInput.java b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOModelEditorInput.java
index 6f9fd79697..8f6f9199af 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOModelEditorInput.java
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOModelEditorInput.java
@@ -30,6 +30,8 @@ import org.eclipse.net4j.util.om.monitor.OMMonitor;
import org.eclipse.net4j.util.om.monitor.OMMonitor.Async;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -159,7 +161,11 @@ public class CDOModelEditorInput extends PlatformObject implements CDOEditorInpu
if (uri.hasFragment())
{
- CDOObject cdoObject = CDOUtil.getCDOObject(getView().getResourceSet().getEObject(uri, true));
+ CDOView view = getView();
+ ResourceSet resourceSet = view.getResourceSet();
+ EObject eObject = resourceSet.getEObject(uri, true);
+
+ CDOObject cdoObject = CDOUtil.getCDOObject(eObject);
if (cdoObject != null)
{
objectID = cdoObject.cdoID();
diff --git a/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
index 7c17287423..abe50731c0 100644
--- a/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.ui;singleton:=true
-Bundle-Version: 4.8.0.qualifier
+Bundle-Version: 4.8.1.qualifier
Bundle-Activator: org.eclipse.emf.cdo.internal.ui.bundle.OM$Activator
Bundle-Vendor: %providerName
Bundle-ClassPath: .
@@ -27,7 +27,7 @@ Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)";reso
org.eclipse.emf.ecp.edit;bundle-version="[1.5.0,2.0.0)";resolution:=optional,
org.eclipse.emf.ecp.edit.swt;bundle-version="[1.5.0,2.0.0)";resolution:=optional,
org.eclipse.emf.ecp.ui.view.swt;bundle-version="[1.5.0,2.0.0)";resolution:=optional
-Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.0";
+Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.1";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -36,7 +36,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.0";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.actions;version="4.8.0";
+ org.eclipse.emf.cdo.internal.ui.actions;version="4.8.1";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -45,7 +45,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.0";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.handlers;version="4.8.0";
+ org.eclipse.emf.cdo.internal.ui.handlers;version="4.8.1";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -54,9 +54,9 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.0";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.actions.delegates;version="4.8.0";x-internal:=true,
- org.eclipse.emf.cdo.internal.ui.bundle;version="4.8.0";x-internal:=true,
- org.eclipse.emf.cdo.internal.ui.dialogs;version="4.8.0";
+ org.eclipse.emf.cdo.internal.ui.actions.delegates;version="4.8.1";x-internal:=true,
+ org.eclipse.emf.cdo.internal.ui.bundle;version="4.8.1";x-internal:=true,
+ org.eclipse.emf.cdo.internal.ui.dialogs;version="4.8.1";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -65,7 +65,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.0";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.dnd;version="4.8.0";
+ org.eclipse.emf.cdo.internal.ui.dnd;version="4.8.1";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -74,7 +74,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.0";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.editor;version="4.8.0";
+ org.eclipse.emf.cdo.internal.ui.editor;version="4.8.1";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -83,7 +83,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.0";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.filters;version="4.8.0";
+ org.eclipse.emf.cdo.internal.ui.filters;version="4.8.1";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -92,7 +92,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.0";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.history;version="4.8.0";
+ org.eclipse.emf.cdo.internal.ui.history;version="4.8.1";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -101,7 +101,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.0";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.messages;version="4.8.0";
+ org.eclipse.emf.cdo.internal.ui.messages;version="4.8.1";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -110,7 +110,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.0";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.perspectives;version="4.8.0";
+ org.eclipse.emf.cdo.internal.ui.perspectives;version="4.8.1";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -119,7 +119,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.0";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.preferences;version="4.8.0";
+ org.eclipse.emf.cdo.internal.ui.preferences;version="4.8.1";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -128,7 +128,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.0";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.transfer;version="4.8.0";
+ org.eclipse.emf.cdo.internal.ui.transfer;version="4.8.1";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -137,7 +137,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.0";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.views;version="4.8.0";
+ org.eclipse.emf.cdo.internal.ui.views;version="4.8.1";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -146,6 +146,6 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.8.0";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.ui;version="4.8.0",
- org.eclipse.emf.cdo.ui.widgets;version="4.8.0"
+ org.eclipse.emf.cdo.ui;version="4.8.1",
+ org.eclipse.emf.cdo.ui.widgets;version="4.8.1"
Automatic-Module-Name: org.eclipse.emf.cdo.ui
diff --git a/plugins/org.eclipse.emf.cdo.ui/pom.xml b/plugins/org.eclipse.emf.cdo.ui/pom.xml
index b6763e2b00..1bf199fc83 100644
--- a/plugins/org.eclipse.emf.cdo.ui/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.ui/pom.xml
@@ -25,7 +25,7 @@
<groupId>org.eclipse.emf.cdo</groupId>
<artifactId>org.eclipse.emf.cdo.ui</artifactId>
- <version>4.8.0-SNAPSHOT</version>
+ <version>4.8.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
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 828e555bad..bdb0534314 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
@@ -50,6 +50,7 @@ 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.StringUtil;
+import org.eclipse.net4j.util.om.OMPlatform;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.ui.actions.LongRunningAction;
import org.eclipse.net4j.util.ui.actions.SafeAction;
@@ -230,6 +231,8 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
private static final Field CONTENT_OUTLINE_PAGE_VIEWER_FIELD = getContentOutlinePageViewerField();
+ private static final boolean SHOW_BULK_ADD_ACTION = OMPlatform.INSTANCE.isProperty("org.eclipse.emf.cdo.ui.editor.SHOW_BULK_ADD_ACTION");
+
/**
* @ADDED
*/
@@ -1113,11 +1116,11 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
CDOView view = editorInput.getView();
String resourcePath = editorInput.getResourcePath();
- CDOID objectID = editorInput instanceof CDOEditorInput2 ? ((CDOEditorInput2)editorInput).getObjectID() : null;
IEditingDomainProvider domainProvider = AdapterUtil.adapt(editorInput, IEditingDomainProvider.class);
if (view != null)
{
+ CDOID objectID = editorInput instanceof CDOEditorInput2 ? ((CDOEditorInput2)editorInput).getObjectID() : null;
createPages(view, resourcePath, objectID, domainProvider);
}
else if (editorInput instanceof CDOEditorInput3)
@@ -1165,6 +1168,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
removePage(0);
showTabs();
+ CDOID objectID = editorInput instanceof CDOEditorInput2 ? ((CDOEditorInput2)editorInput).getObjectID() : null;
createPages(view, resourcePath, objectID, domainProvider);
handleActivate();
@@ -1297,7 +1301,6 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
}
else
{
-
if (CDOIDUtil.isNull(objectID))
{
URI resourceURI = CDOURIUtil.createResourceURI(view, resourcePath);
@@ -1315,6 +1318,11 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
}
}
+ if (true)
+ {
+ viewerInput = resourceSet;
+ }
+
Tree tree = new Tree(getContainer(), SWT.MULTI);
selectionViewer = new SafeTreeViewer(tree);
setCurrentViewer(selectionViewer);
@@ -2162,7 +2170,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
if (resource instanceof CDOResource)
{
CDOView resourceView = ((CDOResource)resource).cdoView();
- if (resourceView == view)
+ if (resourceView == view || resourceView.isReadOnly())
{
continue;
}
@@ -2584,7 +2592,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
}
}
- if (!features.isEmpty())
+ if (SHOW_BULK_ADD_ACTION && !features.isEmpty())
{
menuManager.insertBefore("edit", //$NON-NLS-1$
new LongRunningAction(page, Messages.getString("CDOEditor.26") + SafeAction.INTERACTIVE) //$NON-NLS-1$
@@ -2705,7 +2713,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
invalidRootAgent = null;
}
- if (!view.isClosed())
+ if (view != null && !view.isClosed())
{
try
{

Back to the top