Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fluegge2010-09-25 17:28:21 +0000
committerMartin Fluegge2010-09-25 17:28:21 +0000
commiteeffbdd4e4ccfbb8e59fa3864080700fde50b9ce (patch)
tree07e837db0bce945f4bec5337dfd67a2a28e49ae3 /plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn
parentda752af3819f46bc14e9c24761d571ccd3ef00ba (diff)
downloadcdo-eeffbdd4e4ccfbb8e59fa3864080700fde50b9ce.tar.gz
cdo-eeffbdd4e4ccfbb8e59fa3864080700fde50b9ce.tar.xz
cdo-eeffbdd4e4ccfbb8e59fa3864080700fde50b9ce.zip
[323828] [Dawn] Provide collaborative EMF editors on CDO
https://bugs.eclipse.org/bugs/show_bug.cgi?id=323828
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn')
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/editors/IDawnEditor.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/editors/impl/DawnEMFEditorSupport.java43
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/notifications/DawnTransactionHandler.java1
3 files changed, 46 insertions, 3 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/editors/IDawnEditor.java b/plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/editors/IDawnEditor.java
index 22edd2d7f8..0eb8b2c3e3 100644
--- a/plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/editors/IDawnEditor.java
+++ b/plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/editors/IDawnEditor.java
@@ -12,12 +12,13 @@ package org.eclipse.emf.cdo.dawn.editors;
import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.ui.IEditorPart;
+
/**
* @author Martin Fluegge
*/
-public interface IDawnEditor
+public interface IDawnEditor extends IEditorPart
{
-
public String getContributorID();
public CDOView getView();
diff --git a/plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/editors/impl/DawnEMFEditorSupport.java b/plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/editors/impl/DawnEMFEditorSupport.java
new file mode 100644
index 0000000000..baa7272c6c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/editors/impl/DawnEMFEditorSupport.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) 2004 - 2010 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:
+ * Martin Fluegge - initial API and implementation
+ */
+package org.eclipse.emf.cdo.dawn.editors.impl;
+
+import org.eclipse.emf.cdo.dawn.editors.IDawnEditor;
+import org.eclipse.emf.cdo.dawn.notifications.DawnNotificationUtil;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.view.CDOView;
+
+/**
+ * @author Martin Fluegge
+ * @since 1.0
+ */
+public class DawnEMFEditorSupport extends DawnAbstractEditorSupport
+{
+ public DawnEMFEditorSupport(IDawnEditor editor)
+ {
+ super(editor);
+ }
+
+ public void close()
+ {
+ CDOView view = getView();
+ if (view != null && !view.isClosed())
+ {
+ view.close();
+ }
+ }
+
+ public void registerListeners()
+ {
+ // DawnNotificationUtil.registerTransactionListeners((CDOTransaction)getView(), getEditor());
+ DawnNotificationUtil.setChangeSubscriptionPolicy((CDOTransaction)getView());
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/notifications/DawnTransactionHandler.java b/plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/notifications/DawnTransactionHandler.java
index 390f7cdb74..f1493c8a62 100644
--- a/plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/notifications/DawnTransactionHandler.java
+++ b/plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/notifications/DawnTransactionHandler.java
@@ -52,7 +52,6 @@ public class DawnTransactionHandler implements CDOTransactionHandler
}
refresh(object);
editor.setDirty();
-
}
public void detachingObject(CDOTransaction transaction, CDOObject object)

Back to the top