Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fluegge2010-04-25 15:24:26 +0000
committerMartin Fluegge2010-04-25 15:24:26 +0000
commit218c27bba509c704a74a59ad8a5bbe11d1cbb7ff (patch)
tree1cd951639360101f375b506668b9c7d54335c423 /plugins/org.eclipse.emf.cdo.dawn.ui
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
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.dawn.ui')
-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
4 files changed, 44 insertions, 2 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());

Back to the top