Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2011-10-25 12:12:04 +0000
committercletavernie2011-10-25 12:12:04 +0000
commit3731c06a8769e8c5a67b5c7015c05c98f51a549e (patch)
tree1695f2cc314ec0d19582c4770653eca3f949e5a1 /plugins/core
parentebc13f95fe03d4b7ce927ab377db8b85ba796a63 (diff)
downloadorg.eclipse.papyrus-3731c06a8769e8c5a67b5c7015c05c98f51a549e.tar.gz
org.eclipse.papyrus-3731c06a8769e8c5a67b5c7015c05c98f51a549e.tar.xz
org.eclipse.papyrus-3731c06a8769e8c5a67b5c7015c05c98f51a549e.zip
359057: [Architecture - SVN - Build] The Papyrus architecture should be refactored
https://bugs.eclipse.org/bugs/show_bug.cgi?id=359057
Diffstat (limited to 'plugins/core')
-rw-r--r--plugins/core/org.eclipse.papyrus.documentation.view.papyrus/.classpath7
-rw-r--r--plugins/core/org.eclipse.papyrus.documentation.view.papyrus/.project28
-rw-r--r--plugins/core/org.eclipse.papyrus.documentation.view.papyrus/META-INF/MANIFEST.MF12
-rw-r--r--plugins/core/org.eclipse.papyrus.documentation.view.papyrus/about.html28
-rw-r--r--plugins/core/org.eclipse.papyrus.documentation.view.papyrus/build.properties7
-rw-r--r--plugins/core/org.eclipse.papyrus.documentation.view.papyrus/plugin.properties12
-rw-r--r--plugins/core/org.eclipse.papyrus.documentation.view.papyrus/plugin.xml11
-rw-r--r--plugins/core/org.eclipse.papyrus.documentation.view.papyrus/src/org/eclipse/papyrus/documentation/view/papyrus/PapyrusDocumentationPartHandler.java166
-rw-r--r--plugins/core/org.eclipse.papyrus.documentation.view.papyrus/src/org/eclipse/papyrus/documentation/view/papyrus/TransactionalUncheckedCommandProxy.java93
9 files changed, 0 insertions, 364 deletions
diff --git a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/.classpath b/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/.classpath
deleted file mode 100644
index 9d5026e8ffd..00000000000
--- a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/.project b/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/.project
deleted file mode 100644
index 28756425437..00000000000
--- a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.documentation.view.papyrus</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/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/META-INF/MANIFEST.MF b/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/META-INF/MANIFEST.MF
deleted file mode 100644
index c16dadec4cf..00000000000
--- a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.papyrus.documentation.view.papyrus;singleton:=true
-Bundle-Version: 0.9.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.papyrus.documentation.view;bundle-version="0.7.3",
- org.eclipse.papyrus.modelexplorer;bundle-version="0.7.3",
- org.eclipse.papyrus.core.adaptor.gmf;bundle-version="0.7.3",
- org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.1.0"
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
diff --git a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/about.html b/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/about.html
deleted file mode 100644
index 82d49bf5f81..00000000000
--- a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/build.properties b/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/build.properties
deleted file mode 100644
index 4aee4b2146a..00000000000
--- a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-#Mon Sep 12 09:29:51 CEST 2011
-bin.includes=META-INF/,.,plugin.xml,about.html,plugin.properties
-output..=bin/
-src.includes=about.html,META-INF/,.,plugin.xml,plugin.properties
-source..=src/
-bin..=bin/
diff --git a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/plugin.properties b/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/plugin.properties
deleted file mode 100644
index ef2d995ea65..00000000000
--- a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#################################################################################
-# Copyright (c) 2010 Atos Origin.
-# 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:
-# Atos Origin - Initial API and Implementation
-##################################################################################
-pluginName=Papyrus integration of the documentation view (Incubation)
-providerName=Eclipse Modeling Project
diff --git a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/plugin.xml b/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/plugin.xml
deleted file mode 100644
index 14936603acd..00000000000
--- a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/plugin.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.papyrus.documentation.view.documentationPartHandler">
- <documentationPartHandler
- documentationPartHandler="org.eclipse.papyrus.documentation.view.papyrus.PapyrusDocumentationPartHandler">
- </documentationPartHandler>
- </extension>
-
-</plugin>
diff --git a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/src/org/eclipse/papyrus/documentation/view/papyrus/PapyrusDocumentationPartHandler.java b/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/src/org/eclipse/papyrus/documentation/view/papyrus/PapyrusDocumentationPartHandler.java
deleted file mode 100644
index ceb1f03dd50..00000000000
--- a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/src/org/eclipse/papyrus/documentation/view/papyrus/PapyrusDocumentationPartHandler.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.documentation.view.papyrus;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.core.adaptor.gmf.DiagramsUtil;
-import org.eclipse.papyrus.core.editor.CoreMultiDiagramEditor;
-import org.eclipse.papyrus.documentation.DocumentationManager;
-import org.eclipse.papyrus.documentation.IDocumentationManager;
-import org.eclipse.papyrus.documentation.view.IDocumentationPartHandler;
-import org.eclipse.papyrus.documentation.view.SelectResourceDialog;
-import org.eclipse.papyrus.modelexplorer.MoDiscoContentProvider;
-import org.eclipse.papyrus.modelexplorer.MoDiscoLabelProvider;
-import org.eclipse.papyrus.modelexplorer.ModelExplorerPageBookView;
-import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.ISelectionStatusValidator;
-
-
-public class PapyrusDocumentationPartHandler implements IDocumentationPartHandler {
-
- public boolean canHandlePart(IWorkbenchPart part) {
- return part instanceof CoreMultiDiagramEditor || part instanceof ModelExplorerPageBookView;
- }
-
- public IDocumentationManager getDocumentationManager() {
- return DocumentationManager.getInstance();
- }
-
- public void executeCommand(IWorkbenchPart part, Command cmd) {
- CoreMultiDiagramEditor editor = getPapyrusEditor(part);
- if(editor != null && cmd != null) {
- TransactionalEditingDomain domain = (TransactionalEditingDomain)editor.getEditingDomain();
- domain.getCommandStack().execute(cmd);
- }
- }
-
- public EObject getAssociatedDiagram(IWorkbenchPart part, EObject eObject) {
- if(eObject instanceof Diagram) {
- return null;
- }
-
- if(eObject != null) {
- if(part instanceof IDiagramWorkbenchPart) {
- Diagram currentDiagram = ((IDiagramWorkbenchPart)part).getDiagram();
- if(currentDiagram != null && eObject.equals(currentDiagram.getElement())) {
- return currentDiagram;
- }
- }
- }
-
- return null;
- }
-
- public void openElement(IWorkbenchPart part, URI elementUri) {
- try {
- CoreMultiDiagramEditor editor = getPapyrusEditor(part);
- if(editor != null) {
- EditingDomain ed = editor.getEditingDomain();
- if(ed != null) {
- EObject eObject = ed.getResourceSet().getEObject(elementUri, false);
- Diagram diagram = null;
- if(eObject instanceof Diagram) {
- diagram = (Diagram)eObject;
- } else {
- List<Diagram> diagrams = DiagramsUtil.getAssociatedDiagrams(eObject, null);
- if(!diagrams.isEmpty()) {
- diagram = diagrams.get(0);
- }
- }
- if(diagram != null) {
- IPageMngr pageMngr = (IPageMngr)editor.getAdapter(IPageMngr.class);
- if(pageMngr != null) {
- if(pageMngr.isOpen(diagram)) {
- pageMngr.closePage(diagram);
- }
- pageMngr.openPage(diagram);
- }
- }
- }
- }
- } catch (Exception e) {
- }
- }
-
- public EObject openElementSelectionDialog(IWorkbenchPart part) {
- Object selectedElement = null;
- CoreMultiDiagramEditor editor = getPapyrusEditor(part);
- if(editor != null) {
- ISelectionStatusValidator validator = new ISelectionStatusValidator() {
-
- public IStatus validate(Object[] selectedElements) {
- boolean enableOK = false;
- if(selectedElements.length == 1) {
- Object selectedElement = selectedElements[0];
- if(adapt(selectedElement) != null) {
- enableOK = true;
- }
- }
-
- String msg = "";
- if(enableOK == false) {
- msg = "Only one EObject can be selected";
- }
- return enableOK ? new Status(IStatus.OK, "org.eclipse.emf.common.ui", 0, msg, null) : new Status(IStatus.ERROR, "org.eclipse.emf.common.ui", 0, msg, null);
- }
- };
- selectedElement = SelectResourceDialog.openElementSelection(editor.getServicesRegistry(), new MoDiscoLabelProvider(), new MoDiscoContentProvider(), validator, null, true);
- }
- return adapt(selectedElement);
- }
-
- public boolean isReadOnly(IWorkbenchPart part, EObject eObject) {
- CoreMultiDiagramEditor editor = getPapyrusEditor(part);
- if(editor != null && eObject != null) {
- TransactionalEditingDomain domain = (TransactionalEditingDomain)editor.getEditingDomain();
- return domain.isReadOnly(eObject.eResource());
- }
- return false;
- }
-
- private static EObject adapt(Object obj) {
- if(obj instanceof EObject) {
- return (EObject)obj;
- } else if(obj instanceof IAdaptable) {
- EObject adapted = (EObject)((IAdaptable)obj).getAdapter(EObject.class);
- return adapted;
- }
- return null;
- }
-
- private static CoreMultiDiagramEditor getPapyrusEditor(IWorkbenchPart part) {
- if(part instanceof CoreMultiDiagramEditor) {
- return (CoreMultiDiagramEditor)part;
- }
- IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- if(activeEditor instanceof CoreMultiDiagramEditor) {
- return (CoreMultiDiagramEditor)activeEditor;
- }
- return null;
- }
-}
diff --git a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/src/org/eclipse/papyrus/documentation/view/papyrus/TransactionalUncheckedCommandProxy.java b/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/src/org/eclipse/papyrus/documentation/view/papyrus/TransactionalUncheckedCommandProxy.java
deleted file mode 100644
index 167ec8f1381..00000000000
--- a/plugins/core/org.eclipse.papyrus.documentation.view.papyrus/src/org/eclipse/papyrus/documentation/view/papyrus/TransactionalUncheckedCommandProxy.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.documentation.view.papyrus;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.util.StringStatics;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.EditingDomainUndoContext;
-
-
-public class TransactionalUncheckedCommandProxy extends AbstractTransactionalCommand {
-
- /** The wrapped command */
- private Command command;
-
- public TransactionalUncheckedCommandProxy(TransactionalEditingDomain editingDomain, Command command) {
- super(editingDomain, (command.getLabel() == null) ? StringStatics.BLANK : command.getLabel(), null);
- Assert.isNotNull(command);
- this.command = command;
- addContext(new EditingDomainUndoContext(editingDomain));
- }
-
- protected CommandResult doExecuteWithResult(
- IProgressMonitor progressMonitor, IAdaptable info)
- throws ExecutionException {
-
- command.execute();
- return CommandResult.newOKCommandResult();
- }
-
- protected IStatus doUndo(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
-
- command.undo();
- setResult(CommandResult.newOKCommandResult());
-
- return Status.OK_STATUS;
- }
-
- protected IStatus doRedo(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
-
- command.redo();
- setResult(CommandResult.newOKCommandResult());
-
- return Status.OK_STATUS;
- }
-
- /**
- * Returns the wrapped command.
- *
- * @return Command
- */
- public Command getCommand() {
- return command;
- }
-
- public boolean canUndo() {
- return command.canUndo();
- }
-
- public boolean canExecute() {
- return command.canExecute();
- }
-
- public boolean canRedo() {
- return canExecute() && canUndo();
- }
-
- public void dispose() {
- super.dispose();
- command.dispose();
- }
-}

Back to the top