Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Wouters2014-04-04 14:08:04 +0000
committerLaurent Wouters2014-04-04 14:08:04 +0000
commit610461c61a3339911872bce4d16666a6e2f5d03e (patch)
tree2db7658775d62b58734b291cc372f7be87be38aa
parentd60dbb567fdf7a02c140e978b4f1af693f35e9b9 (diff)
downloadorg.eclipse.papyrus-610461c61a3339911872bce4d16666a6e2f5d03e.tar.gz
org.eclipse.papyrus-610461c61a3339911872bce4d16666a6e2f5d03e.tar.xz
org.eclipse.papyrus-610461c61a3339911872bce4d16666a6e2f5d03e.zip
[clean] Retiring org.eclipse.papyrus.adaptor.modiscolast/org.eclipse.papyrus.adaptor.modisco
Signed-off-by: Laurent Wouters <laurent.wouters@cea.fr>
-rw-r--r--deprecated/org.eclipse.papyrus.adaptor.modisco/.classpath7
-rw-r--r--deprecated/org.eclipse.papyrus.adaptor.modisco/.project28
-rw-r--r--deprecated/org.eclipse.papyrus.adaptor.modisco/META-INF/MANIFEST.MF13
-rw-r--r--deprecated/org.eclipse.papyrus.adaptor.modisco/build.properties5
-rw-r--r--deprecated/org.eclipse.papyrus.adaptor.modisco/icons/full/logoMoDiscoMini.gifbin1078 -> 0 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.adaptor.modisco/plugin.xml61
-rw-r--r--deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/Activator.java50
-rw-r--r--deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/CreateModiscoBrowserHandler.java32
-rw-r--r--deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditor.java123
-rw-r--r--deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditorFactory.java197
10 files changed, 0 insertions, 516 deletions
diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/.classpath b/deprecated/org.eclipse.papyrus.adaptor.modisco/.classpath
deleted file mode 100644
index 2d1a4302f04..00000000000
--- a/deprecated/org.eclipse.papyrus.adaptor.modisco/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/.project b/deprecated/org.eclipse.papyrus.adaptor.modisco/.project
deleted file mode 100644
index 12cd199fb89..00000000000
--- a/deprecated/org.eclipse.papyrus.adaptor.modisco/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.adaptor.modisco</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.adaptor.modisco/META-INF/MANIFEST.MF
deleted file mode 100644
index 2b559853ded..00000000000
--- a/deprecated/org.eclipse.papyrus.adaptor.modisco/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Modisco
-Bundle-SymbolicName: org.eclipse.papyrus.adaptor.modisco;singleton:=true
-Bundle-Version: 0.7.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.adapters.modisco.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.core;bundle-version="0.7.0",
- org.eclipse.gmt.modisco.infra.browser;bundle-version="0.8.1",
- org.eclipse.papyrus.core.adaptor.emf;bundle-version="0.7.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/build.properties b/deprecated/org.eclipse.papyrus.adaptor.modisco/build.properties
deleted file mode 100644
index 6f20375d6c7..00000000000
--- a/deprecated/org.eclipse.papyrus.adaptor.modisco/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml
diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/icons/full/logoMoDiscoMini.gif b/deprecated/org.eclipse.papyrus.adaptor.modisco/icons/full/logoMoDiscoMini.gif
deleted file mode 100644
index 19c468b1c61..00000000000
--- a/deprecated/org.eclipse.papyrus.adaptor.modisco/icons/full/logoMoDiscoMini.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/plugin.xml b/deprecated/org.eclipse.papyrus.adaptor.modisco/plugin.xml
deleted file mode 100644
index d7529c833c3..00000000000
--- a/deprecated/org.eclipse.papyrus.adaptor.modisco/plugin.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu
- id="org.eclipse.papyrus.diagram.ui.menu"
- label="Papyrus II">
- <command
- commandId="org.eclipse.papyrus.adaptor.modisco.command.createBrowser"
- icon="icons/full/logoMoDiscoMini.gif"
- label="Create a new Modisco Browser"
- style="push"
- tooltip="Create a new Modisco Browser">
- </command>
- </menu>
- </menuContribution>
- <menuContribution
- locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar
- id="org.eclipse.papyrus.diagram.ui.toolbar">
- <command
- commandId="org.eclipse.papyrus.adaptor.modisco.command.createBrowser"
- icon="icons/full/logoMoDiscoMini.gif"
- label="Create a new Modisco Browser"
- style="push"
- tooltip="Create a new Modisco Browser">
- </command>
- </toolbar>
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- description="Create a new Modisco Browser"
- id="org.eclipse.papyrus.adaptor.modisco.command.createBrowser"
- name="Create Modisco Browser">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.adapters.modisco.CreateModiscoBrowserHandler"
- commandId="org.eclipse.papyrus.adaptor.modisco.command.createBrowser">
- </handler>
- </extension>
- <extension
- point="org.eclipse.papyrus.core.papyrusDiagram">
- <editorDiagram
- actionBarContributorId="org.eclipse.papyrus.adaptor.modisco.actionBarContributor"
- factoryClass="org.eclipse.papyrus.adapters.modisco.ModiscoBrowserEditorFactory">
- </editorDiagram>
- <actionBarContributor
- id="org.eclipse.papyrus.adaptor.modisco.actionBarContributor"
- implementingClass="org.eclipse.gmt.modisco.infra.browser.editors.BrowserActionBarContributor">
- </actionBarContributor>
- </extension>
-
-</plugin>
diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/Activator.java b/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/Activator.java
deleted file mode 100644
index 77dee147dc0..00000000000
--- a/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/Activator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.papyrus.adapters.modisco;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.adapters.modisco";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/CreateModiscoBrowserHandler.java b/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/CreateModiscoBrowserHandler.java
deleted file mode 100644
index 8c7d7b56a3f..00000000000
--- a/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/CreateModiscoBrowserHandler.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.adapters.modisco;
-
-import org.eclipse.papyrus.core.adaptor.emf.CreateDiagramHandler;
-
-/**
- * Eclipse handler to create a Modisco Browser Editor.
- * @todo Let it extends a class that is not emf related.
- *
- * @author cedric dumoulin
- *
- */
-public class CreateModiscoBrowserHandler extends CreateDiagramHandler {
-
- @Override
- protected void addNewDiagram() {
- addNewDiagram("Modisco Browser", ModiscoBrowserEditorFactory.MODISCO_EDITOR_TYPE, null);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditor.java b/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditor.java
deleted file mode 100644
index 2cc203c331d..00000000000
--- a/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditor.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- *
- */
-package org.eclipse.papyrus.adapters.modisco;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.NotificationFilter;
-import org.eclipse.emf.transaction.ResourceSetChangeEvent;
-import org.eclipse.emf.transaction.ResourceSetListener;
-import org.eclipse.emf.transaction.RollbackException;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmt.modisco.infra.browser.editors.EcoreBrowser;
-import org.eclipse.papyrus.core.editor.BackboneException;
-import org.eclipse.papyrus.core.services.ServiceException;
-import org.eclipse.papyrus.core.services.ServicesRegistry;
-import org.eclipse.papyrus.core.utils.DiResourceSet;
-import org.eclipse.ui.IEditorPart;
-
-
-/**
- * @author dumoulin
- *
- */
-public class ModiscoBrowserEditor extends EcoreBrowser {
-
- /**
- * ResourceSet shared by Papyrus.
- */
- private ResourceSet resourceSet;
-
- private Resource modelResource;
-
- private ServicesRegistry servicesRegistry;
-
- /**
- * Listen to model changes
- */
- private final ResourceSetListener resourceSetListener = new ResourceSetListener() {
-
- public NotificationFilter getFilter() {
- return null;
- }
-
- public boolean isAggregatePrecommitListener() {
- return false;
- }
-
- public boolean isPostcommitOnly() {
- return true;
- }
-
- public boolean isPrecommitOnly() {
- return false;
- }
-
- public void resourceSetChanged(ResourceSetChangeEvent event) {
- if(event.getTransaction() != null && event.getTransaction().getStatus().isOK()) {
- getSite().getShell().getDisplay().asyncExec(new Runnable() {
-
- public void run() {
- reloadModel();
- }
- });
- }
- }
-
- public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException {
- return null;
- }
-
- };
-
-
- /**
- * Constructor.
- * @param servicesRegistry Service Registry used to retrieve service needed by this editor.
- *
- */
- public ModiscoBrowserEditor(ServicesRegistry servicesRegistry) throws ServiceException, BackboneException {
-
-
- this.servicesRegistry = servicesRegistry;
-
- // Share the same editing provider
- TransactionalEditingDomain editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class);
-
- this.resourceSet = editingDomain.getResourceSet();
-
- // Get the model
- DiResourceSet resourceMngr = servicesRegistry.getService(DiResourceSet.class);
- modelResource = resourceMngr.getModelResource();
-
- // Let's listen to the resource set change
- editingDomain.addResourceSetListener(resourceSetListener);
-
- }
-
- /**
- * @see org.eclipse.gmt.modisco.infra.browser.editors.EcoreBrowser#createModel()
- *
- * @return
- */
- @Override
- protected Resource createModel() {
-
-// return super.createModel();
- return modelResource;
- }
-
- /**
- *
- * @see org.eclipse.gmt.modisco.infra.browser.editors.EcoreBrowser#createResourceSet()
- *
- */
- @Override
- protected ResourceSet createResourceSet() {
- return resourceSet;
- }
-
-
-}
diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditorFactory.java b/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditorFactory.java
deleted file mode 100644
index 4e8aebe7ea9..00000000000
--- a/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditorFactory.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * 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:
- * Cedric Dumoulin Cedric.Dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.adapters.modisco;
-
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.core.editor.BackboneException;
-import org.eclipse.papyrus.core.extension.diagrameditor.AbstractEditorFactory;
-import org.eclipse.papyrus.core.multidiagram.actionbarcontributor.ActionBarContributorRegistry;
-import org.eclipse.papyrus.core.services.ServiceException;
-import org.eclipse.papyrus.core.services.ServicesRegistry;
-import org.eclipse.papyrus.sasheditor.contentprovider.IEditorModel;
-import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.EditorActionBarContributor;
-
-/**
- * @author cedric dumoulin
- *
- */
-public class ModiscoBrowserEditorFactory extends AbstractEditorFactory {
-
- /** name of the emf diagram in Di2 type diagram
- * TODO Use something else than a Diagram to mark the editor. Add a class in sashdi.
- */
- public static final String MODISCO_EDITOR_TYPE = "modiscoBrowser";
-
- /**
- * @param diagramClass
- * @param expectedType
- */
- public ModiscoBrowserEditorFactory() {
- // TODO remove next once the unused methods will be removed
- super(null, null);
- }
-
-
- /**
- * TODO Implements next methods
- *
- * @see org.eclipse.papyrus.core.extension.diagrameditor.IPluggableEditorFactory#createIPageModel(java.lang.Object)
- * @param pageIdentifier
- * @return
- *
- */
- public IPageModel createIPageModel(Object pageIdentifier) {
- return new ModiscoBrowserPageModel((Diagram)pageIdentifier, getServiceRegistry());
- }
-
- /**
- *
- * @see org.eclipse.papyrus.core.extension.diagrameditor.IPluggableEditorFactory#isPageModelFactoryFor(java.lang.Object)
- * @param pageIdentifier
- * @return
- *
- */
- public boolean isPageModelFactoryFor(Object pageIdentifier) {
- if(pageIdentifier instanceof Diagram) {
- Diagram diagram = (Diagram)pageIdentifier;
-
- if(MODISCO_EDITOR_TYPE.equals(diagram.getType())) {
- return true;
- }
- }
- // no
- return false;
- }
-
-
- /**
- * Inner class.
- * A model representing the modisco browser in the sasheditor provider.
- * @author dumoulin
- *
- */
- public class ModiscoBrowserPageModel implements IEditorModel {
-
- /**
- * The object used as page identifier and rawModel.
- */
- private Diagram pageIdentifier;
-
- private ServicesRegistry servicesRegistry;
-
- /**
- *
- * Constructor.
- *
- * @param pageIdentifier
- * @param servicesRegistry
- */
- public ModiscoBrowserPageModel(Diagram pageIdentifier, ServicesRegistry servicesRegistry) {
- this.pageIdentifier = pageIdentifier;
- this.servicesRegistry = servicesRegistry;
- }
-
- /**
- * Create the instance of the editor.
- *
- * @see org.eclipse.papyrus.sasheditor.contentprovider.IEditorModel#createIEditorPart()
- * @return
- * @throws PartInitException
- *
- */
- public IEditorPart createIEditorPart() throws PartInitException {
- try {
- return new ModiscoBrowserEditor(servicesRegistry);
- } catch (ServiceException e) {
- throw new PartInitException("Can't create ModiscoEditor.", e);
- } catch (BackboneException e) {
- throw new PartInitException("Can't create ModiscoEditor.", e);
- }
- }
-
- public EditorActionBarContributor getActionBarContributor() {
-
- String actionBarId = editorDescriptor.getActionBarContributorId();
-
- // Do nothing if no EditorActionBarContributor is specify.
- if(actionBarId == null || actionBarId.length() == 0) {
- return null;
- }
-
- // Try to get it.
-
- // Get ServiceRegistry
- ActionBarContributorRegistry registry;
- try {
- registry = (ActionBarContributorRegistry)servicesRegistry
- .getService(ActionBarContributorRegistry.class);
- } catch (ServiceException e) {
- // Service not found
- // TODO Log the error
- e.printStackTrace();
- return null;
- }
-
- try {
- return registry.getActionBarContributor(actionBarId);
- } catch (BackboneException e) {
- // TODO Log the error and throw an exception instead
- e.printStackTrace();
- return null;
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getRawModel()
- * @return
- *
- */
- public Object getRawModel() {
- return pageIdentifier;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getTabIcon()
- * @return
- *
- */
- public Image getTabIcon() {
- ImageDescriptor imageDescriptor = editorDescriptor.getIcon();
- if(imageDescriptor == null)
- return null;
-
- return imageDescriptor.createImage();
- }
-
- /**
- *
- * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getTabTitle()
- * @return
- *
- */
- public String getTabTitle() {
- return "Modisco";
- }
-
-
- }
-}

Back to the top