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 /plugins/org.eclipse.emf.cdo.explorer
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
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.explorer')
-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
2 files changed, 66 insertions, 0 deletions
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);
+ }
+ }
+}

Back to the top