Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2015-06-13 13:06:54 -0400
committerEike Stepper2015-06-13 13:06:54 -0400
commite1bafc08969ea122f9757f15729f7d5627c5755e (patch)
tree5d3aec135257dbf953c7a3d24dcd4194ab5a9b58
parentf29f3ef744ad710ee46db696b0d2dcf4ccfecd39 (diff)
downloadcdo-e1bafc08969ea122f9757f15729f7d5627c5755e.tar.gz
cdo-e1bafc08969ea122f9757f15729f7d5627c5755e.tar.xz
cdo-e1bafc08969ea122f9757f15729f7d5627c5755e.zip
[467754] Resource removal doesn't work with Mars M7
https://bugs.eclipse.org/bugs/show_bug.cgi?id=467754
-rw-r--r--features/org.eclipse.net4j-feature/feature.xml2
-rw-r--r--features/org.eclipse.net4j.defs-feature/feature.xml2
-rw-r--r--features/org.eclipse.net4j.sdk-feature/feature.xml2
-rw-r--r--features/org.eclipse.net4j.util.ui-feature/feature.xml2
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/plugin.xml8
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/ShowInActionProvider.java21
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/properties/ExplorerUIAdapterFactory.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/plugin.xml6
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutObjectProperties.java60
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch13
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/DeleteResourceAction.java149
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java33
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/messages/messages.properties5
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOSessionsView.java11
-rw-r--r--plugins/org.eclipse.net4j.util.ui/META-INF/MANIFEST.MF34
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ItemProvider.java5
17 files changed, 329 insertions, 39 deletions
diff --git a/features/org.eclipse.net4j-feature/feature.xml b/features/org.eclipse.net4j-feature/feature.xml
index f494be4c7e..d8dd78ecd0 100644
--- a/features/org.eclipse.net4j-feature/feature.xml
+++ b/features/org.eclipse.net4j-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.net4j"
label="%featureName"
- version="4.4.0.qualifier"
+ version="4.4.100.qualifier"
provider-name="%providerName"
image="eclipse_update_120.jpg"
license-feature="org.eclipse.emf.cdo.license"
diff --git a/features/org.eclipse.net4j.defs-feature/feature.xml b/features/org.eclipse.net4j.defs-feature/feature.xml
index 6f95e3ed9c..92838bcc12 100644
--- a/features/org.eclipse.net4j.defs-feature/feature.xml
+++ b/features/org.eclipse.net4j.defs-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.net4j.defs"
label="%featureName"
- version="4.4.0.qualifier"
+ version="4.4.100.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.cdo.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.net4j.sdk-feature/feature.xml b/features/org.eclipse.net4j.sdk-feature/feature.xml
index c456b2e67e..1aaaacab73 100644
--- a/features/org.eclipse.net4j.sdk-feature/feature.xml
+++ b/features/org.eclipse.net4j.sdk-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.net4j.sdk"
label="%featureName"
- version="4.4.0.qualifier"
+ version="4.4.100.qualifier"
provider-name="%providerName"
image="eclipse_update_120.jpg"
license-feature="org.eclipse.emf.cdo.license"
diff --git a/features/org.eclipse.net4j.util.ui-feature/feature.xml b/features/org.eclipse.net4j.util.ui-feature/feature.xml
index 3fbf235eda..62e0274206 100644
--- a/features/org.eclipse.net4j.util.ui-feature/feature.xml
+++ b/features/org.eclipse.net4j.util.ui-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.net4j.util.ui"
label="%featureName"
- version="4.4.0.qualifier"
+ version="4.4.100.qualifier"
provider-name="%providerName"
image="eclipse_update_120.jpg"
license-feature="org.eclipse.emf.cdo.license"
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/plugin.xml b/plugins/org.eclipse.emf.cdo.explorer.ui/plugin.xml
index 36d4cc683b..c5c845e65b 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/plugin.xml
@@ -483,7 +483,9 @@
<iterate ifEmpty="false" operator="and">
<or>
<adapt type="org.eclipse.emf.cdo.CDOElement"/>
- <adapt type="org.eclipse.emf.ecore.EObject"/>
+ <adapt type="org.eclipse.emf.ecore.EObject">
+ <test property="org.eclipse.emf.cdo.explorer.object.inCheckout" value="true"/>
+ </adapt>
</or>
</iterate>
</activeWhen>
@@ -623,7 +625,9 @@
<iterate ifEmpty="false">
<or>
<adapt type="org.eclipse.emf.cdo.CDOElement"/>
- <adapt type="org.eclipse.emf.ecore.EObject"/>
+ <adapt type="org.eclipse.emf.ecore.EObject">
+ <test property="org.eclipse.emf.cdo.explorer.object.inCheckout" value="true"/>
+ </adapt>
</or>
</iterate>
</with>
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/ShowInActionProvider.java b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/ShowInActionProvider.java
index 2cdeb541fc..b6261e1490 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/ShowInActionProvider.java
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/ShowInActionProvider.java
@@ -114,14 +114,7 @@ public class ShowInActionProvider extends AbstractActionProvider<Object>
if (selectedElement instanceof CDORepository)
{
- final CDORepository repository = (CDORepository)selectedElement;
-
- CDOCheckout[] checkouts = repository.getCheckouts();
- if (checkouts.length != 0)
- {
- filled |= addAction(menu, repository, new ShowInProjectExplorerAction(page, checkouts));
- }
-
+ CDORepository repository = (CDORepository)selectedElement;
if (repository.isConnected())
{
if (repository.isLocal())
@@ -136,6 +129,16 @@ public class ShowInActionProvider extends AbstractActionProvider<Object>
filled |= addAction(menu, repository, new ShowInSessionsViewAction(page, repository, null));
filled |= addAction(menu, repository.getSession(), new ShowInViewAction(page, HISTORY_VIEW_ID));
}
+ else
+ {
+ filled |= addAction(menu, repository, new ShowInSessionsViewAction(page, repository, null));
+ }
+
+ CDOCheckout[] checkouts = repository.getCheckouts();
+ if (checkouts.length != 0)
+ {
+ filled |= addAction(menu, repository, new ShowInProjectExplorerAction(page, checkouts));
+ }
}
if (selectedElement instanceof CDOBranch)
@@ -541,6 +544,8 @@ public class ShowInActionProvider extends AbstractActionProvider<Object>
private CDOSession getSession()
{
+ repository.connect();
+
String description = repository.getURI();
int lastSlash = description.lastIndexOf('/');
description = description.substring(0, lastSlash) + "?repositoryName=" + repository.getName()
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/properties/ExplorerUIAdapterFactory.java b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/properties/ExplorerUIAdapterFactory.java
index 28899bcd5a..1f8cf53f1f 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/properties/ExplorerUIAdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/properties/ExplorerUIAdapterFactory.java
@@ -193,8 +193,18 @@ public class ExplorerUIAdapterFactory implements IAdapterFactory
@Override
protected IStatus run(IProgressMonitor monitor)
{
+ CDOTransaction transaction;
+
CDOCheckout checkout = CDOExplorerUtil.getCheckout(resourceNode);
- CDOTransaction transaction = checkout.openTransaction();
+ if (checkout != null)
+ {
+ transaction = checkout.openTransaction();
+ }
+ else
+ {
+ CDOView view = resourceNode.cdoView();
+ transaction = view.getSession().openTransaction(view.getBranch());
+ }
CDOCommitInfo commitInfo = null;
@@ -214,7 +224,7 @@ public class ExplorerUIAdapterFactory implements IAdapterFactory
transaction.close();
}
- if (commitInfo != null)
+ if (commitInfo != null && checkout != null)
{
checkout.getView().waitForUpdate(commitInfo.getTimeStamp());
diff --git a/plugins/org.eclipse.emf.cdo.explorer/plugin.xml b/plugins/org.eclipse.emf.cdo.explorer/plugin.xml
index 6da5beeba0..5177eb8a6a 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.explorer/plugin.xml
@@ -40,6 +40,12 @@
namespace="org.eclipse.emf.cdo.explorer.checkout"
properties="state,open,type,id,label,folder,rootType,canContainResources,branchID,branch,timeStamp,readOnly,rootID,dirty,repositoryConnected,repositoryType,repositoryID,repositoryLabel,repositoryFolder,repositoryURI"
class="org.eclipse.emf.cdo.internal.explorer.checkouts.CDOCheckoutProperties$Tester"/>
+ <propertyTester
+ id="org.eclipse.emf.cdo.explorer.object.properties"
+ type="org.eclipse.emf.ecore.EObject"
+ namespace="org.eclipse.emf.cdo.explorer.object"
+ properties="inCheckout"
+ class="org.eclipse.emf.cdo.internal.explorer.checkouts.CDOCheckoutObjectProperties$Tester"/>
</extension>
<extension point="org.eclipse.emf.cdo.viewProviders">
diff --git a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutObjectProperties.java b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutObjectProperties.java
new file mode 100644
index 0000000000..3b0a81b3aa
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutObjectProperties.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2015 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.emf.cdo.internal.explorer.checkouts;
+
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+
+import org.eclipse.net4j.util.properties.DefaultPropertyTester;
+import org.eclipse.net4j.util.properties.IProperties;
+import org.eclipse.net4j.util.properties.Properties;
+import org.eclipse.net4j.util.properties.Property;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * @author Eike Stepper
+ */
+public class CDOCheckoutObjectProperties extends Properties<EObject>
+{
+ public static final IProperties<EObject> INSTANCE = new CDOCheckoutObjectProperties();
+
+ private CDOCheckoutObjectProperties()
+ {
+ super(EObject.class);
+
+ add(new Property<EObject>("inCheckout")
+ {
+ @Override
+ protected Object eval(EObject object)
+ {
+ return CDOExplorerUtil.getCheckout(object) != null;
+ }
+ });
+ }
+
+ public static void main(String[] args)
+ {
+ new Tester().dumpContributionMarkup();
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static final class Tester extends DefaultPropertyTester<EObject>
+ {
+ public static final String NAMESPACE = "org.eclipse.emf.cdo.explorer.object";
+
+ public Tester()
+ {
+ super(NAMESPACE, INSTANCE);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch b/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch
index 6d2960c051..0c756d6677 100644
--- a/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch
+++ b/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
<setAttribute key="additional_plugins">
-<setEntry value="javax.servlet:3.0.0.v201112011016:default:false"/>
<setEntry value="javax.servlet:3.1.0.v201410161800:default:false"/>
+<setEntry value="org.eclipse.emf.ecore.edit:2.9.0.v20150601-0402:default:true"/>
+<setEntry value="org.eclipse.emf.ecore.editor:2.11.0.v20150601-0402:default:true"/>
</setAttribute>
<booleanAttribute key="append.args" value="true"/>
<booleanAttribute key="askclear" value="true"/>
@@ -14,7 +15,7 @@
<booleanAttribute key="clearws" value="false"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/CDOClient1"/>
-<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="default" value="false"/>
<stringAttribute key="featureDefaultLocation" value="workspace"/>
<stringAttribute key="featurePluginResolution" value="workspace"/>
<booleanAttribute key="includeOptional" value="true"/>
@@ -31,7 +32,7 @@
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -nosplash&#13;&#10;-clean"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:MaxPermSize=512m&#13;&#10;-Xms40m&#13;&#10;-Xmx1g&#13;&#10;-Dosgi.console.enable.builtin=true&#13;&#10;-Dosgi.checkConfiguration=false"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:MaxPermSize=512m&#13;&#10;-Xms40m&#13;&#10;-Xmx2g&#13;&#10;-Dosgi.console.enable.builtin=true&#13;&#10;-Dosgi.checkConfiguration=false"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<setAttribute key="selected_features">
@@ -91,8 +92,8 @@
<setEntry value="org.eclipse.platform:default"/>
<setEntry value="org.eclipse.rcp:default"/>
</setAttribute>
-<stringAttribute key="selected_target_plugins" value="com.google.guava@default:default,com.ibm.icu@default:default,javax.servlet@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.apache.lucene.highlighter@default:default,org.apache.lucene.memory@default:default,org.apache.lucene.misc@default:default,org.apache.lucene.queries@default:default,org.apache.lucene.snowball@default:default,org.apache.lucene.spellchecker@default:default,org.apache.lucene@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.compare@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.trace@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.h2@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.admin@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.compare@default:default,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.examples.company.edit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.location@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.security.edit@default:default,org.eclipse.emf.cdo.security.editor@default:default,org.eclipse.emf.cdo.security@default:default,org.eclipse.emf.cdo.team@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.admin@default:default,org.eclipse.emf.cdo.ui.efs@default:default,org.eclipse.emf.cdo.ui.ide@default:default,org.eclipse.emf.cdo.ui.location@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.db.h2@default:default,org.eclipse.net4j.db@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.ui@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.google.guava@default:default,com.ibm.icu@default:default,javax.servlet@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.compare@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.trace@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.h2@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.admin@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.compare@default:default,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.examples.company.edit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.security.edit@default:default,org.eclipse.emf.cdo.security.editor@default:default,org.eclipse.emf.cdo.security@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.admin@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.db.h2@default:default,org.eclipse.net4j.db@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.ui@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
<booleanAttribute key="tracing" value="false"/>
@@ -738,7 +739,7 @@
<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
</mapAttribute>
-<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="true"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
<booleanAttribute key="useNamedJRE" value="true"/>
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 072ff46dfe..ccfba9a456 100644
--- a/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
@@ -18,6 +18,7 @@ Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)";reso
org.eclipse.emf.ecore.edit;bundle-version="[2.5.0,3.0.0)";visibility:=reexport,
org.eclipse.net4j;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.net4j.util.ui;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.net4j.ui.shared;bundle-version="[4.0.0,5.0.0)",
org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.edit;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.transfer.ui;bundle-version="[4.2.0,5.0.0)";visibility:=reexport,
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/DeleteResourceAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/DeleteResourceAction.java
new file mode 100644
index 0000000000..e49eeb3ad8
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/DeleteResourceAction.java
@@ -0,0 +1,149 @@
+/*
+ * Copyright (c) 2015 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.emf.cdo.internal.ui.actions;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.internal.ui.bundle.OM;
+import org.eclipse.emf.cdo.internal.ui.messages.Messages;
+import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+
+import org.eclipse.net4j.ui.shared.SharedIcons;
+import org.eclipse.net4j.util.ui.actions.SafeAction;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Eike Stepper
+ */
+public class DeleteResourceAction extends SafeAction
+{
+ private final Shell shell;
+
+ private final Set<CDOResourceNode> nodes;
+
+ public DeleteResourceAction(Shell shell, List<CDOResourceNode> nodes)
+ {
+ super(Messages.getString("DeleteResourceAction_1"), Messages.getString("DeleteResourceAction_5"),
+ SharedIcons.getDescriptor(SharedIcons.ETOOL_DELETE));
+ this.shell = shell;
+ this.nodes = new HashSet<CDOResourceNode>(nodes);
+ }
+
+ @Override
+ protected void safeRun() throws Exception
+ {
+ if (MessageDialog.openConfirm(shell, Messages.getString("DeleteResourceAction_1"), MessageFormat.format( //$NON-NLS-1$
+ Messages.getString("DeleteResourceAction_2"), nodes.size()))) //$NON-NLS-1$
+ {
+ Job job = new Job(Messages.getString("DeleteResourceAction_3")) //$NON-NLS-1$
+ {
+ @Override
+ protected IStatus run(IProgressMonitor monitor)
+ {
+ Set<CDOResourceNode> nestedNodes = new HashSet<CDOResourceNode>();
+ for (CDOResourceNode node : nodes)
+ {
+ if (isNested(node))
+ {
+ nestedNodes.add(node);
+ }
+ }
+
+ nodes.removeAll(nestedNodes);
+
+ Map<Integer, CDOTransaction> repositoryToTransaction = new HashMap<Integer, CDOTransaction>();
+ for (CDOResourceNode node : nodes)
+ {
+ CDOSession session = node.cdoView().getSession();
+ int sessionID = session.getSessionID();
+ CDOTransaction transaction = repositoryToTransaction.get(sessionID);
+ if (transaction == null)
+ {
+ transaction = OpenTransactionAction.openTransaction(session);
+ repositoryToTransaction.put(sessionID, transaction);
+ }
+
+ CDOObject writableNode = transaction.getObject(node.cdoID());
+ EObject container = writableNode.eContainer();
+ if (container == null)
+ {
+ container = (CDOResource)writableNode.eResource();
+ }
+
+ if (container instanceof CDOResource)
+ {
+ ((CDOResource)container).getContents().remove(writableNode);
+ }
+ else if (container instanceof CDOResourceFolder)
+ {
+ ((CDOResourceFolder)container).getNodes().remove(writableNode);
+ }
+ }
+
+ for (CDOTransaction transaction : repositoryToTransaction.values())
+ {
+ try
+ {
+ transaction.commit();
+ }
+ catch (Exception ex)
+ {
+ OM.LOG.error(MessageFormat.format(Messages.getString("DeleteResourceAction_4"), //$NON-NLS-1$
+ this.getClass().getName().toString()), ex);
+ }
+ finally
+ {
+ transaction.close();
+ }
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ private boolean isNested(CDOResourceNode node)
+ {
+ CDOResourceFolder folder = node.getFolder();
+ if (folder != null)
+ {
+ if (nodes.contains(folder))
+ {
+ return true;
+ }
+
+ return isNested(folder);
+ }
+
+ return false;
+ }
+ };
+
+ job.schedule();
+ }
+ }
+}
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 85e555424c..9228fff853 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
@@ -13,6 +13,7 @@
package org.eclipse.emf.cdo.internal.ui.editor;
import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.CDOState;
import org.eclipse.emf.cdo.common.model.CDOPackageInfo;
import org.eclipse.emf.cdo.common.model.CDOPackageRegistry;
import org.eclipse.emf.cdo.common.model.CDOPackageUnit;
@@ -32,6 +33,7 @@ import org.eclipse.emf.cdo.ui.shared.SharedIcons;
import org.eclipse.emf.cdo.util.CDOURIUtil;
import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.util.ValidationException;
+import org.eclipse.emf.cdo.view.CDOObjectHandler;
import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.emf.internal.cdo.view.CDOStateMachine;
@@ -225,6 +227,20 @@ public class CDOEditor extends MultiPageEditorPart
protected CDOEventHandler eventHandler;
/**
+ * @ADDED
+ */
+ protected CDOObjectHandler objectHandler = new CDOObjectHandler()
+ {
+ public void objectStateChanged(CDOView view, CDOObject object, CDOState oldState, CDOState newState)
+ {
+ if (object == viewerInput && newState == CDOState.INVALID)
+ {
+ closeEditor();
+ }
+ }
+ };
+
+ /**
* This keeps track of the editing domain that is used to track all changes to the model.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
@@ -1041,6 +1057,11 @@ public class CDOEditor extends MultiPageEditorPart
{
URI resourceURI = CDOURIUtil.createResourceURI(view, resourcePath);
viewerInput = resourceSet.getResource(resourceURI, true);
+
+ if (!view.isReadOnly())
+ {
+ view.addObjectHandler(objectHandler);
+ }
}
// resourceSet.eAdapters().add(problemIndicationAdapter);
@@ -2176,6 +2197,18 @@ public class CDOEditor extends MultiPageEditorPart
{
try
{
+ if (objectHandler != null)
+ {
+ view.removeObjectHandler(objectHandler);
+ }
+ }
+ catch (Exception ex)
+ {
+ OM.LOG.error(ex);
+ }
+
+ try
+ {
if (eventHandler != null)
{
eventHandler.dispose();
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/messages/messages.properties b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/messages/messages.properties
index 553c61d58f..c597a6b56f 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/messages/messages.properties
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/messages/messages.properties
@@ -188,6 +188,11 @@ RegisterPackagesAction.0=Failed to register package {0}
RegisterPackagesAction.1=\ {0} package has not been registered due to errors.\nSee the log for details.
RegisterPackagesAction.2=\ {0} packages have not been registered due to errors.\nSee the log for details.
RegisterSinglePackageAction.0=Register the package
+DeleteResourceAction_1=Delete...
+DeleteResourceAction_2=Are you sure you want to delete the selected {0} resource node(s)?
+DeleteResourceAction_3=Deleting resource node(s)
+DeleteResourceAction_4={0}: Cannot perform commit
+DeleteResourceAction_5=Delete the selected folders and resources
RemoveResourceAction_1=Delete Resource
RemoveResourceAction_2=Are you sure you want to delete the selected {0} item(s)?
RemoveResourceAction_3=Deleting CDOResource(s)
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOSessionsView.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOSessionsView.java
index a9cea2ed26..bcf543d1d2 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOSessionsView.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOSessionsView.java
@@ -11,6 +11,8 @@
package org.eclipse.emf.cdo.internal.ui.views;
import org.eclipse.emf.cdo.eresource.CDOResourceLeaf;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.internal.ui.actions.DeleteResourceAction;
import org.eclipse.emf.cdo.internal.ui.actions.OpenSessionAction;
import org.eclipse.emf.cdo.internal.ui.actions.OpenTransactionAction;
import org.eclipse.emf.cdo.internal.ui.transfer.RepositoryTransferDragListener;
@@ -22,6 +24,7 @@ import org.eclipse.emf.cdo.ui.CDOItemProvider;
import org.eclipse.net4j.util.container.IContainer;
import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.container.IPluginContainer;
+import org.eclipse.net4j.util.ui.UIUtil;
import org.eclipse.net4j.util.ui.views.ContainerItemProvider;
import org.eclipse.net4j.util.ui.views.ContainerView;
import org.eclipse.net4j.util.ui.views.IElementFilter;
@@ -40,6 +43,7 @@ import org.eclipse.ui.IWorkbenchPage;
import java.util.Collections;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
/**
@@ -108,6 +112,13 @@ public class CDOSessionsView extends ContainerView
manager.add(new Separator("group.open"));
manager.add(new GroupMarker("group.openWith"));
manager.add(new Separator("group.edit"));
+
+ List<CDOResourceNode> nodes = UIUtil.getElements(selection, CDOResourceNode.class);
+ if (nodes != null && !nodes.isEmpty())
+ {
+ manager.add(new DeleteResourceAction(getShell(), nodes));
+ }
+
manager.add(new GroupMarker("group.new.branch"));
manager.add(new Separator("group.port"));
manager.add(new Separator("group.build"));
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 a193aa6b16..30089a9ef3 100644
--- a/plugins/org.eclipse.net4j.util.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.util.ui/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.net4j.util.ui;singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.5.100.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
@@ -15,19 +15,19 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.5.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.5.0";x-internal:=true,
- org.eclipse.net4j.util.internal.ui.actions;version="3.5.0";x-internal:=true,
- org.eclipse.net4j.util.internal.ui.bundle;version="3.5.0";x-internal:=true,
- org.eclipse.net4j.util.internal.ui.messages;version="3.5.0";x-internal:=true,
- org.eclipse.net4j.util.internal.ui.views;version="3.5.0";x-internal:=true,
- org.eclipse.net4j.util.ui;version="3.5.0",
- org.eclipse.net4j.util.ui.actions;version="3.5.0",
- org.eclipse.net4j.util.ui.confirmation;version="3.5.0",
- org.eclipse.net4j.util.ui.container;version="3.5.0",
- org.eclipse.net4j.util.ui.dnd;version="3.5.0",
- org.eclipse.net4j.util.ui.handlers;version="3.5.0",
- org.eclipse.net4j.util.ui.prefs;version="3.5.0",
- org.eclipse.net4j.util.ui.proposals;version="3.5.0",
- org.eclipse.net4j.util.ui.security;version="3.5.0",
- org.eclipse.net4j.util.ui.views;version="3.5.0",
- org.eclipse.net4j.util.ui.widgets;version="3.5.0"
+Export-Package: org.eclipse.net4j.util.internal.ui;version="3.5.100";x-internal:=true,
+ org.eclipse.net4j.util.internal.ui.actions;version="3.5.100";x-internal:=true,
+ org.eclipse.net4j.util.internal.ui.bundle;version="3.5.100";x-internal:=true,
+ org.eclipse.net4j.util.internal.ui.messages;version="3.5.100";x-internal:=true,
+ org.eclipse.net4j.util.internal.ui.views;version="3.5.100";x-internal:=true,
+ org.eclipse.net4j.util.ui;version="3.5.100",
+ org.eclipse.net4j.util.ui.actions;version="3.5.100",
+ org.eclipse.net4j.util.ui.confirmation;version="3.5.100",
+ org.eclipse.net4j.util.ui.container;version="3.5.100",
+ org.eclipse.net4j.util.ui.dnd;version="3.5.100",
+ org.eclipse.net4j.util.ui.handlers;version="3.5.100",
+ org.eclipse.net4j.util.ui.prefs;version="3.5.100",
+ org.eclipse.net4j.util.ui.proposals;version="3.5.100",
+ org.eclipse.net4j.util.ui.security;version="3.5.100",
+ org.eclipse.net4j.util.ui.views;version="3.5.100",
+ org.eclipse.net4j.util.ui.widgets;version="3.5.100"
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 d261d81ffa..b4283ac357 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
@@ -61,6 +61,11 @@ public abstract class ItemProvider<INPUT> extends StructuredContentProvider<INPU
public StyledString getStyledText(Object obj)
{
String text = getText(obj);
+ if (text == null)
+ {
+ return new StyledString();
+ }
+
return new StyledString(text);
}

Back to the top