Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fluegge2010-09-27 11:31:53 +0000
committerMartin Fluegge2010-09-27 11:31:53 +0000
commit6c3f8ee24eafc7d556e6f495820c86fe6e48217c (patch)
tree3b24765a454d04c5f0c916c14a866910214c8079 /plugins/org.eclipse.emf.cdo.dawn.examples.acore.editor.dawn
parenteeffbdd4e4ccfbb8e59fa3864080700fde50b9ce (diff)
downloadcdo-6c3f8ee24eafc7d556e6f495820c86fe6e48217c.tar.gz
cdo-6c3f8ee24eafc7d556e6f495820c86fe6e48217c.tar.xz
cdo-6c3f8ee24eafc7d556e6f495820c86fe6e48217c.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.examples.acore.editor.dawn')
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.editor.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/presentation/DawnAcoreEditor.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.editor.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/presentation/DawnAcoreEditor.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.editor.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/presentation/DawnAcoreEditor.java
index 0346d00808..0990ce0b97 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.editor.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/presentation/DawnAcoreEditor.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.editor.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/presentation/DawnAcoreEditor.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.cdo.dawn.editors.IDawnEditorSupport;
import org.eclipse.emf.cdo.dawn.editors.impl.DawnEMFEditorSupport;
import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
import org.eclipse.emf.cdo.dawn.ui.DawnLabelProvider;
+import org.eclipse.emf.cdo.dawn.ui.DawnSelectionViewerAdapterFactoryContentProvider;
import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -89,6 +90,9 @@ public class DawnAcoreEditor extends AcoreEditor implements IDawnEditor
public void createPages()
{
super.createPages();
+
+ selectionViewer.setContentProvider(new DawnSelectionViewerAdapterFactoryContentProvider(adapterFactory,
+ ((DawnEditorInput)getEditorInput()).getResource()));
selectionViewer
.setLabelProvider(new DawnLabelProvider(adapterFactory, dawnEditorSupport.getView(), selectionViewer));
parentViewer.setLabelProvider(new DawnLabelProvider(adapterFactory, dawnEditorSupport.getView(), selectionViewer));
@@ -99,8 +103,12 @@ public class DawnAcoreEditor extends AcoreEditor implements IDawnEditor
selectionViewer));
CDOResource resource = ((DawnEditorInput)getEditorInput()).getResource();
- selectionViewer.setInput(resource);
+
+ selectionViewer.setInput(resource.getResourceSet());
selectionViewer.setSelection(new StructuredSelection(resource), true);
+
+ parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
+
}
@Override
@@ -159,4 +167,9 @@ public class DawnAcoreEditor extends AcoreEditor implements IDawnEditor
{
return null;
}
+
+ public IDawnEditorSupport getDawnEditorSupport()
+ {
+ return dawnEditorSupport;
+ }
}

Back to the top