Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fluegge2010-04-25 11:24:26 -0400
committerMartin Fluegge2010-04-25 11:24:26 -0400
commit218c27bba509c704a74a59ad8a5bbe11d1cbb7ff (patch)
tree1cd951639360101f375b506668b9c7d54335c423
parent0c5f6faab32a69b80d930c28e246d4822bf7ac8d (diff)
downloadcdo-218c27bba509c704a74a59ad8a5bbe11d1cbb7ff.tar.gz
cdo-218c27bba509c704a74a59ad8a5bbe11d1cbb7ff.tar.xz
cdo-218c27bba509c704a74a59ad8a5bbe11d1cbb7ff.zip
[308232] [Dawn] Develop collaborative support for GMF on CDO
https://bugs.eclipse.org/bugs/show_bug.cgi?id=308232
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.ui/.options5
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.ui/build.properties3
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/internal/ui/bundle/OM.java27
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/views/DawnExplorer.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.util/.options5
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.util/build.properties3
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/internal/util/bundle/OM.java23
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/util/DawnDiagramUpdater.java25
8 files changed, 89 insertions, 13 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn.ui/.options b/plugins/org.eclipse.emf.cdo.dawn.ui/.options
new file mode 100644
index 0000000000..ebf7ddf920
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.ui/.options
@@ -0,0 +1,5 @@
+# Debugging and tracing options
+
+org.eclipse.emf.cdo.dawn.ui/debug = true
+
+org.eclipse.emf.cdo.dawn.ui/debug.object = true
diff --git a/plugins/org.eclipse.emf.cdo.dawn.ui/build.properties b/plugins/org.eclipse.emf.cdo.dawn.ui/build.properties
index e9863e281e..060a9e9fdd 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.ui/build.properties
+++ b/plugins/org.eclipse.emf.cdo.dawn.ui/build.properties
@@ -2,4 +2,5 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
- plugin.xml
+ plugin.xml,\
+ .options
diff --git a/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/internal/ui/bundle/OM.java b/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/internal/ui/bundle/OM.java
new file mode 100644
index 0000000000..40771eb441
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/internal/ui/bundle/OM.java
@@ -0,0 +1,27 @@
+
+package org.eclipse.emf.cdo.dawn.internal.ui.bundle;
+
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.view.CDOView;
+
+import org.eclipse.net4j.util.om.OMBundle;
+import org.eclipse.net4j.util.om.OMPlatform;
+import org.eclipse.net4j.util.om.log.OMLogger;
+import org.eclipse.net4j.util.om.pref.OMPreference;
+import org.eclipse.net4j.util.om.pref.OMPreferences;
+import org.eclipse.net4j.util.om.trace.OMTracer;
+
+public abstract class OM
+{
+ public static final String BUNDLE_ID = "org.eclipse.emf.cdo.dawn.ui"; //$NON-NLS-1$
+
+ public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
+
+ public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
+
+ public static final OMTracer DEBUG_OBJECT = DEBUG.tracer("object"); //$NON-NLS-1$
+
+ public static final OMLogger LOG = BUNDLE.logger();
+
+ public static final OMPreferences PREFS = BUNDLE.preferences();
+ }
diff --git a/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/views/DawnExplorer.java b/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/views/DawnExplorer.java
index 9a8a1d8db4..f711e31a30 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/views/DawnExplorer.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/views/DawnExplorer.java
@@ -10,6 +10,7 @@
******************************************************************************/
package org.eclipse.emf.cdo.dawn.ui.views;
+import org.eclipse.emf.cdo.dawn.internal.ui.bundle.OM;
import org.eclipse.emf.cdo.dawn.runtime.preferences.PreferenceConstants;
import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
import org.eclipse.emf.cdo.dawn.ui.helper.EditorDescriptionHelper;
@@ -26,6 +27,7 @@ import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.net4j.util.container.IContainer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.ui.views.ContainerItemProvider;
import org.eclipse.net4j.util.ui.views.IElementFilter;
import org.eclipse.ui.PartInitException;
@@ -35,6 +37,9 @@ import org.eclipse.ui.PartInitException;
*/
public class DawnExplorer extends CDOSessionsView
{
+
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, DawnExplorer.class);
+
/**
* The ID of the view as specified by the extension.
*/
@@ -90,12 +95,16 @@ public class DawnExplorer extends CDOSessionsView
if (obj instanceof CDOResource)
{
CDOResource resource = (CDOResource)obj;
+
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Opening CDOResource {0} ", resource); //$NON-NLS-1$
+ }
String editorID = EditorDescriptionHelper.getEditorIdForDawnEditor(resource.getName());
if (editorID != null && !editorID.equals(""))
{
-
try
{
DawnEditorInput editorInput = new DawnEditorInput(resource.getURI());
diff --git a/plugins/org.eclipse.emf.cdo.dawn.util/.options b/plugins/org.eclipse.emf.cdo.dawn.util/.options
new file mode 100644
index 0000000000..d30c61dacd
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.util/.options
@@ -0,0 +1,5 @@
+# Debugging and tracing options
+
+org.eclipse.emf.cdo.dawn.util/debug = true
+
+org.eclipse.emf.cdo.dawn.util/debug.object = true
diff --git a/plugins/org.eclipse.emf.cdo.dawn.util/build.properties b/plugins/org.eclipse.emf.cdo.dawn.util/build.properties
index 34d2e4d2da..8951ab621e 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.util/build.properties
+++ b/plugins/org.eclipse.emf.cdo.dawn.util/build.properties
@@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ .options
diff --git a/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/internal/util/bundle/OM.java b/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/internal/util/bundle/OM.java
new file mode 100644
index 0000000000..aecad7d909
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/internal/util/bundle/OM.java
@@ -0,0 +1,23 @@
+
+package org.eclipse.emf.cdo.dawn.internal.util.bundle;
+
+import org.eclipse.net4j.util.om.OMBundle;
+import org.eclipse.net4j.util.om.OMPlatform;
+import org.eclipse.net4j.util.om.log.OMLogger;
+import org.eclipse.net4j.util.om.pref.OMPreferences;
+import org.eclipse.net4j.util.om.trace.OMTracer;
+
+public abstract class OM
+{
+ public static final String BUNDLE_ID = "org.eclipse.emf.cdo.dawn.util"; //$NON-NLS-1$
+
+ public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
+
+ public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
+
+ public static final OMTracer DEBUG_OBJECT = DEBUG.tracer("object"); //$NON-NLS-1$
+
+ public static final OMLogger LOG = BUNDLE.logger();
+
+ public static final OMPreferences PREFS = BUNDLE.preferences();
+ }
diff --git a/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/util/DawnDiagramUpdater.java b/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/util/DawnDiagramUpdater.java
index d14ef6737f..e328440c74 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/util/DawnDiagramUpdater.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/util/DawnDiagramUpdater.java
@@ -13,7 +13,7 @@ package org.eclipse.emf.cdo.dawn.util;
import java.util.Iterator;
import java.util.List;
-import org.eclipse.emf.cdo.dawn.logging.logger.LOG;
+import org.eclipse.emf.cdo.dawn.internal.util.bundle.OM;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
@@ -28,6 +28,7 @@ import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.ui.PlatformUI;
/**
@@ -35,7 +36,7 @@ import org.eclipse.ui.PlatformUI;
*/
public class DawnDiagramUpdater
{
-
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, DawnDiagramUpdater.class);
public static void refreshEditPart(EditPart editPart)
{
refeshEditpartInternal(editPart);
@@ -50,7 +51,6 @@ public class DawnDiagramUpdater
DawnDiagramUpdater.refreshEditPart(editPart);
}
});
-
}
public static void refreshEditCurrentSelected(TransactionalEditingDomain editingDomain)
@@ -81,7 +81,6 @@ public class DawnDiagramUpdater
CanonicalEditPolicy nextEditPolicy = (CanonicalEditPolicy)it.next();
nextEditPolicy.refresh();
}
-
}
}
}
@@ -116,7 +115,6 @@ public class DawnDiagramUpdater
{
if (childEditPart instanceof EditPart)
{
- System.out.println("--connection---");
refeshEditpartInternal((EditPart)childEditPart);
}
}
@@ -128,13 +126,11 @@ public class DawnDiagramUpdater
refeshEditpartInternal((EditPart)childEditPart);
}
}
-
}
else
{
System.err.println("EDITPART is null");
}
-
}
public static View findView(EObject element)
@@ -166,7 +162,10 @@ public class DawnDiagramUpdater
{
if (e instanceof View && ((View)e).getElement().equals(object))
{
- LOG.info("FOUND View: " + e + " for view obj: " + object);
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("FOUND View: {0} for view obj: {1} ", e,object); //$NON-NLS-1$
+ }
return (View)e;
}
}
@@ -189,12 +188,18 @@ public class DawnDiagramUpdater
{
if (editPart == null) // does not exist?
{
- LOG.info("Editpart does not exist for view " + view);
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("EditPart does not exist for view {0} ", view); //$NON-NLS-1$
+ }
editPart = EditPartService.getInstance().createGraphicEditPart(view);
setParentEditPart(editor, view, editPart);
}
}
- LOG.info("found EditPart: " + editPart);
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Found EditPart: {0} ", editPart); //$NON-NLS-1$
+ }
return editPart;
}

Back to the top