Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikaël Barbero2013-08-14 12:54:51 +0000
committerMikaël Barbero2013-08-19 12:28:55 +0000
commit5eedf34d1f1de1dd193a24b029b469aa1953166b (patch)
tree5c2ca4a2151cf8b6ea7100b06c80fb6f801b5654
parent65210cb384ba27e492d9bf594576c502a76888d8 (diff)
downloadorg.eclipse.emf.compare-5eedf34d1f1de1dd193a24b029b469aa1953166b.tar.gz
org.eclipse.emf.compare-5eedf34d1f1de1dd193a24b029b469aa1953166b.tar.xz
org.eclipse.emf.compare-5eedf34d1f1de1dd193a24b029b469aa1953166b.zip
Do not contribute more than one content merge viewer for Diagrams.
(cherry picked from commit e731fc2b441f5616e7025c3082b1b4d66c680465) Conflicts: plugins/org.eclipse.emf.compare.diagram.ide.ui/plugin.xml
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.xml19
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/internal/DiagramContentMergeViewerCreator.java41
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/internal/EcoreToolsIDEUICompare.java53
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/META-INF/MANIFEST.MF28
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.xml15
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/DiContentDescriptor.java193
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/PapyrusIDEUICompare.java49
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/plugin.xml10
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/DiagramContentMergeViewerCreator.java (renamed from plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/DiagramContentMergeViewerCreator.java)77
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramContentMergeViewer.properties2
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/plugin.xml6
12 files changed, 59 insertions, 452 deletions
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF
index ec2f1c71a..ed07aaef0 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF
@@ -1,20 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.compare.diagram.ide.ui.ecoretools;singleton:=true
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
Bundle-Version: 2.2.0.qualifier
-Bundle-Activator: org.eclipse.emf.compare.diagram.ide.ui.ecoretools.internal.EcoreToolsIDEUICompare
Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.compare,
- org.eclipse.emf.compare.diagram.ide.ui;bundle-version="2.0.0",
- org.eclipse.emf.compare;bundle-version="3.0.0",
- org.eclipse.jface;bundle-version="3.5.0",
- org.eclipse.emf.compare.ide.ui;bundle-version="2.1.0",
- org.eclipse.emf.edit;bundle-version="2.5.0",
- org.eclipse.emf.edit.ui;bundle-version="2.5.0",
- org.eclipse.emf.compare.rcp.ui;bundle-version="2.1.0",
- org.eclipse.gef;bundle-version="3.5.1",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.3.0"
+Require-Bundle: org.eclipse.emf.compare.diagram.ide.ui;bundle-version="3.0.0",
+ org.eclipse.emf.ecoretools.diagram;bundle-version="1.2.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Vendor: %providerName
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.xml b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.xml
index a598b5f07..0cdd5af31 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.xml
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.xml
@@ -14,25 +14,6 @@
<plugin>
<extension
- point="org.eclipse.compare.contentMergeViewers">
- <viewer
- class="org.eclipse.emf.compare.diagram.ide.ui.ecoretools.internal.DiagramContentMergeViewerCreator"
- extensions="diagramcompare_match, ecorediag"
- id="org.eclipse.emf.compare.ide.ui.internal.ViewContentMergeViewer"
- label="Ecoretools Content Merge Viewer">
- </viewer>
- <contentTypeBinding
- contentMergeViewerId="org.eclipse.emf.compare.ide.ui.internal.ViewContentMergeViewer"
- contentTypeId="org.eclipse.emf.compare.content.type">
- </contentTypeBinding>
- <viewer
- class="org.eclipse.emf.compare.diagram.ide.ui.ecoretools.internal.DiagramContentMergeViewerCreator"
- extensions="diagramcompare_diff, ecorediag"
- id="org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.ViewListContentMergeViewer"
- label="Ecoretools Content Merge Viewer">
- </viewer>
- </extension>
- <extension
point="org.eclipse.core.contenttype.contentTypes">
<file-association
content-type="org.eclipse.emf.compare.content.type"
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/internal/DiagramContentMergeViewerCreator.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/internal/DiagramContentMergeViewerCreator.java
deleted file mode 100644
index 91ce11208..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/internal/DiagramContentMergeViewerCreator.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.ecoretools.internal;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.IViewerCreator;
-import org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * A {@link IViewerCreator} that creates {@link DiagramContentMergeViewer}.
- *
- * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
- */
-public class DiagramContentMergeViewerCreator implements IViewerCreator {
-
- /**
- * ID of the contribution to the org.eclipse.compare.contentMergeViewers extension point.
- */
- public static final String EOBJECT_CONTENT_MERGE_VIEWER_ID = "org.eclipse.emf.compare.ide.ui.internal.ViewContentMergeViewer"; //$NON-NLS-1$
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.compare.IViewerCreator#createViewer(org.eclipse.swt.widgets.Composite,
- * org.eclipse.compare.CompareConfiguration)
- */
- public Viewer createViewer(Composite parent, CompareConfiguration config) {
- return new DiagramContentMergeViewer(parent, config);
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/internal/EcoreToolsIDEUICompare.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/internal/EcoreToolsIDEUICompare.java
deleted file mode 100644
index 2e18e07c8..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/internal/EcoreToolsIDEUICompare.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.ecoretools.internal;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * Activator.
- *
- * @author Cedric Notot <a href="mailto:cedric.notot@obeo.fr">cedric.notot@obeo.fr</a>
- */
-public class EcoreToolsIDEUICompare extends Plugin {
-
- /** The plug-in ID. */
- public static final String PLUGIN_ID = "org.eclipse.emf.compare.diagram.ide.ui.ecoretools"; //$NON-NLS-1$
-
- /**
- * Context.
- */
- private static EcoreToolsIDEUICompare plugin;
-
- /**
- * {@inheritDoc}
- *
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext bundleContext) throws Exception {
- plugin = this;
- super.start(bundleContext);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext bundleContext) throws Exception {
- super.stop(bundleContext);
- plugin = null;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/META-INF/MANIFEST.MF
index df070b60c..ef9889648 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/META-INF/MANIFEST.MF
@@ -1,31 +1,13 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.compare.diagram.ide.ui.papyrus;singleton:=true
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
Bundle-Version: 2.2.0.qualifier
-Bundle-Activator: org.eclipse.emf.compare.diagram.ide.ui.papyrus.internal.PapyrusIDEUICompare
Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.compare,
- org.eclipse.emf.compare.diagram,
- org.eclipse.emf.compare.diagram.ide.ui,
- org.eclipse.emf.compare.ide.ui,
- org.eclipse.gmf.runtime.notation,
- org.eclipse.papyrus.uml.diagram.activity,
- org.eclipse.papyrus.uml.diagram.clazz,
- org.eclipse.papyrus.uml.diagram.communication,
- org.eclipse.papyrus.uml.diagram.component,
- org.eclipse.papyrus.uml.diagram.composite,
- org.eclipse.papyrus.uml.diagram.deployment,
- org.eclipse.papyrus.uml.diagram.profile,
- org.eclipse.papyrus.uml.diagram.sequence,
- org.eclipse.papyrus.uml.diagram.statemachine,
- org.eclipse.papyrus.uml.diagram.usecase,
- org.eclipse.gmf.runtime.diagram.ui,
- org.eclipse.papyrus.uml.diagram.common,
- org.eclipse.papyrus.infra.emf.diagram.common;bundle-version="0.9.1",
+Require-Bundle: org.eclipse.emf.compare.diagram.ide.ui;bundle-version="3.0.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="0.9.1",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="0.9.1",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="0.9.1",
org.eclipse.papyrus.infra.core;bundle-version="0.9.1"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.emf.compare.diagram.ide.ui.papyrus.internal;x-internal:=true
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.xml b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.xml
index c3eac3f84..0e83a5e14 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.xml
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.xml
@@ -14,22 +14,9 @@
<plugin>
<extension
- point="org.eclipse.compare.contentMergeViewers">
- <viewer
- class="org.eclipse.emf.compare.diagram.ide.ui.papyrus.internal.DiagramContentMergeViewerCreator"
- extensions="diagramcompare_match, diagramcompare_diff, di, notation"
- id="org.eclipse.emf.compare.ui.papyrus.contentviewer"
- label="Papyrus Content Merge Viewer">
- </viewer>
- <contentTypeBinding
- contentMergeViewerId="org.eclipse.emf.compare.ui.papyrus.contentviewer"
- contentTypeId="org.eclipse.emf.compare.content.type">
- </contentTypeBinding>
- </extension>
- <extension
point="org.eclipse.core.contenttype.contentTypes">
<file-association
content-type="org.eclipse.emf.compare.content.type"
- file-extensions="di"/>
+ file-extensions="di,notation"/>
</extension>
</plugin>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/DiContentDescriptor.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/DiContentDescriptor.java
deleted file mode 100644
index 93b9c2953..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/DiContentDescriptor.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.papyrus.internal;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.XMLContentDescriber;
-import org.eclipse.papyrus.infra.core.sashwindows.di.DiPackage;
-
-/**
- * Content XML for Papyrus diagrams.
- *
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
-@SuppressWarnings("restriction")
-public class DiContentDescriptor extends XMLContentDescriber {
-
- /**
- * MAX_CHAR_READ.
- */
- private static final int MAX_CHAR_READ = 200;
-
- /**
- * SASH_WINDOWS_MNGR.
- */
- private static final String SASH_WINDOWS_MNGR = DiPackage.Literals.SASH_WINDOWS_MNGR.getName();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.content.XMLContentDescriber#describe(java.io.Reader,
- * org.eclipse.core.runtime.content.IContentDescription)
- */
- @Override
- public int describe(Reader input, IContentDescription description) throws IOException {
- final int describe = super.describe(input, description);
- if (describe == VALID && hasSashWindowsMngrDecl(input)) {
- return VALID;
- }
- return describe;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.content.XMLContentDescriber#describe(java.io.InputStream,
- * org.eclipse.core.runtime.content.IContentDescription)
- */
- @Override
- public int describe(InputStream input, IContentDescription description) throws IOException {
- final int describe = super.describe(input, description);
- if (describe == VALID && hasSashWindowsMngrDecl(input, getEncoding(input))) {
- return VALID;
- }
- return describe;
- }
-
- /**
- * Check if the input contains a Sash Window manager.
- *
- * @param input
- * The input.
- * @return True if it contains the sash window manager.
- * @throws IOException
- * exception.
- */
- private boolean hasSashWindowsMngrDecl(Reader input) throws IOException {
- final BufferedReader reader = new BufferedReader(input);
- String xmlDecl = new String();
- String line = reader.readLine();
-
- while (xmlDecl.length() < MAX_CHAR_READ && line != null) {
- xmlDecl = xmlDecl + line;
- if (line.indexOf(SASH_WINDOWS_MNGR) != -1) {
- return true;
- }
- line = reader.readLine();
- }
- return false;
- }
-
- /**
- * Check if the input contains a Sash Window manager.
- *
- * @param input
- * The input.
- * @param encoding
- * The encoding.
- * @return True if it contains the sash window manager.
- * @throws IOException
- * exception.
- */
- private boolean hasSashWindowsMngrDecl(InputStream input, String encoding) throws IOException {
- final byte[] sashWindowsMngtBytes = SASH_WINDOWS_MNGR.getBytes(encoding);
-
- int c = input.read();
- final int read = 0;
-
- // count is incremented when subsequent read characters match the xmlDeclEnd bytes,
- // the end of xmlDecl is reached, when count equals the xmlDeclEnd length
- int count = 0;
-
- while (read < MAX_CHAR_READ && c != -1) {
- if (c == sashWindowsMngtBytes[count]) {
- count++;
- } else {
- count = 0;
- }
- if (count == sashWindowsMngtBytes.length) {
- return true;
- }
- c = input.read();
- }
- return false;
- }
-
- /**
- * Get the encoding of the input.
- *
- * @param input
- * the input.
- * @return The string encoding.
- * @throws IOException
- * exception.
- */
- private String getEncoding(InputStream input) throws IOException {
- final byte[] bom = getByteOrderMark(input);
- String xmlDeclEncoding = "UTF-8"; //$NON-NLS-1$
- input.reset();
- if (bom != null) {
- if (bom == IContentDescription.BOM_UTF_16BE) {
- xmlDeclEncoding = "UTF-16BE"; //$NON-NLS-1$
- } else if (bom == IContentDescription.BOM_UTF_16LE) {
- xmlDeclEncoding = "UTF-16LE"; //$NON-NLS-1$
- }
- // skip BOM to make comparison simpler
- input.skip(bom.length);
- }
-
- return xmlDeclEncoding;
- }
-
- /**
- * Reads bom from the stream. Note that the stream will not be repositioned when the method returns.
- *
- * @param input
- * The stream from which to read a BOM.
- * @return the stream's BOM.
- * @throws IOException
- * Thrown if we cannot read from the given stream.
- */
- public static byte[] getByteOrderMark(InputStream input) throws IOException {
- final int bomUTF8First = 0xEF;
- final int bomUTF8Second = 0xBB;
- final int bomUTF8Third = 0xBF;
- final int bomUTF16First = 0xFE;
- final int bomUTF16Second = 0xFF;
-
- final int first = input.read();
- byte[] bom = null;
- if (first == bomUTF8First) {
- // look for the UTF-8 Byte Order Mark (BOM)
- final int second = input.read();
- final int third = input.read();
- if (second == bomUTF8Second && third == bomUTF8Third) {
- bom = IContentDescription.BOM_UTF_8;
- }
- } else if (first == bomUTF16First) {
- // look for the UTF-16 BOM
- if (input.read() == bomUTF16Second) {
- bom = IContentDescription.BOM_UTF_16BE;
- }
- } else if (first == bomUTF16Second) {
- if (input.read() == bomUTF16First) {
- bom = IContentDescription.BOM_UTF_16LE;
- }
- }
-
- return bom;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/PapyrusIDEUICompare.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/PapyrusIDEUICompare.java
deleted file mode 100644
index c645648df..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/PapyrusIDEUICompare.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.papyrus.internal;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * Activator.
- * @author Mickael Barbero <a href="mailto:mickael.barbero@obeo.fr">mickael.barbero@obeo.fr</a>
- */
-public class PapyrusIDEUICompare implements BundleActivator {
-
- /**
- * The bundle context.
- */
- private static BundleContext context;
-
- static BundleContext getContext() {
- return context;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext bundleContext) throws Exception {
- PapyrusIDEUICompare.context = bundleContext;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext bundleContext) throws Exception {
- PapyrusIDEUICompare.context = null;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/plugin.xml b/plugins/org.eclipse.emf.compare.diagram.ide.ui/plugin.xml
index 2c601bef9..b9f9ce025 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/plugin.xml
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/plugin.xml
@@ -43,5 +43,13 @@
label="Diagram Refined elements">
</filter>
</extension>
-
+ <extension
+ point="org.eclipse.compare.contentMergeViewers">
+ <viewer
+ class="org.eclipse.emf.compare.diagram.ide.ui.internal.DiagramContentMergeViewerCreator"
+ extensions="diagramcompare_match, diagramcompare_diff"
+ id="org.eclipse.emf.compare.ui.diagram.contentviewer"
+ label="Model Compare (Diagram)">
+ </viewer>
+ </extension>
</plugin>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/DiagramContentMergeViewerCreator.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/DiagramContentMergeViewerCreator.java
index f3d3a91aa..57c26dcc1 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/DiagramContentMergeViewerCreator.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/DiagramContentMergeViewerCreator.java
@@ -1,41 +1,36 @@
-/*******************************************************************************
- * Copyright (c) 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.papyrus.internal;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.IViewerCreator;
-import org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * A {@link IViewerCreator} that creates {@link DiagramContentMergeViewer}.
- *
- * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
- */
-public class DiagramContentMergeViewerCreator implements IViewerCreator {
-
- /**
- * ID of the contribution to the org.eclipse.compare.contentMergeViewers extension point.
- */
- public static final String EOBJECT_CONTENT_MERGE_VIEWER_ID = "org.eclipse.emf.compare.ide.ui.internal.ViewContentMergeViewer"; //$NON-NLS-1$
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.compare.IViewerCreator#createViewer(org.eclipse.swt.widgets.Composite,
- * org.eclipse.compare.CompareConfiguration)
- */
- public Viewer createViewer(Composite parent, CompareConfiguration config) {
- return new DiagramContentMergeViewer(parent, config);
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2013 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.diagram.ide.ui.internal;
+
+import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.IViewerCreator;
+import org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * A {@link IViewerCreator} that creates {@link DiagramContentMergeViewer}.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public class DiagramContentMergeViewerCreator implements IViewerCreator {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.compare.IViewerCreator#createViewer(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.compare.CompareConfiguration)
+ */
+ public Viewer createViewer(Composite parent, CompareConfiguration config) {
+ return new DiagramContentMergeViewer(parent, config);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramContentMergeViewer.properties b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramContentMergeViewer.properties
index f97173367..9d35e7be4 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramContentMergeViewer.properties
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramContentMergeViewer.properties
@@ -9,7 +9,7 @@
# Obeo - initial API and implementation
###############################################################################
-title= EMF Model Compare
+title= Model Compare (Diagram)
saveDialog.title= Save Resource
saveDialog.message= Resource has been modified. Save changes?
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/plugin.xml b/plugins/org.eclipse.emf.compare.ide.ui/plugin.xml
index 0d9988c9e..e3bfcbe67 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/plugin.xml
+++ b/plugins/org.eclipse.emf.compare.ide.ui/plugin.xml
@@ -37,19 +37,19 @@
class="org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.tree.TreeContentMergeViewerCreator"
extensions="org.eclipse.emf.compare.rcp.ui.eTreeDiff,org.eclipse.emf.compare.rcp.ui.eMatch,org.eclipse.emf.compare.rcp.ui.eResourceDiff"
id="org.eclipse.emf.compare.ide.ui.internal.EObjectContentMergeViewer"
- label="EMFCompare Content Merge Viewer">
+ label="Model Compare (Containment Features)">
</viewer>
<viewer
class="org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.table.TableContentMergeViewerCreator"
extensions="org.eclipse.emf.compare.rcp.ui.eListDiff"
id="org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EObjectListContentMergeViewer"
- label="EMFCompare Content Merge Viewer">
+ label="Model Compare (Non Containment Feature)">
</viewer>
<viewer
class="org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.text.EMFCompareTextMergeViewerCreator"
extensions="org.eclipse.emf.compare.rcp.ui.eTextDiff"
id="org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.text.EMFCompareTextContentMergeViewer"
- label="EMFCompare Text Merge Viewer">
+ label="Model Compare (Text Feature)">
</viewer>
<contentTypeBinding
contentTypeId="org.eclipse.emf.ecore.xmi"

Back to the top