summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Wouters2014-04-04 10:17:55 (EDT)
committerLaurent Wouters2014-04-04 10:17:55 (EDT)
commit492eb2ed128a225648ea1b12461d3ee8165f2248 (patch)
tree8b94d3545a417219f9cd5f78c611ce771500a0f3
parent4acd5dc91381ff7c03f48424562aed503f866dfd (diff)
downloadorg.eclipse.papyrus-492eb2ed128a225648ea1b12461d3ee8165f2248.zip
org.eclipse.papyrus-492eb2ed128a225648ea1b12461d3ee8165f2248.tar.gz
org.eclipse.papyrus-492eb2ed128a225648ea1b12461d3ee8165f2248.tar.bz2
[clean] Retiring org.eclipse.papyrus.views.documentation.view.papyruslast/org.eclipse.papyrus.views.documentation.view.papyrus
Signed-off-by: Laurent Wouters <laurent.wouters@cea.fr>
-rw-r--r--deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/.classpath7
-rw-r--r--deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/.project28
-rw-r--r--deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/META-INF/MANIFEST.MF19
-rw-r--r--deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/about.html28
-rw-r--r--deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/build.properties7
-rw-r--r--deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/plugin.properties12
-rw-r--r--deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/plugin.xml11
-rw-r--r--deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/src/org/eclipse/papyrus/views/documentation/view/papyrus/PapyrusDocumentationPartHandler.java201
-rw-r--r--deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/src/org/eclipse/papyrus/views/documentation/view/papyrus/TransactionalUncheckedCommandProxy.java93
9 files changed, 0 insertions, 406 deletions
diff --git a/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/.classpath b/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/.classpath
deleted file mode 100644
index 9d5026e..0000000
--- a/deprecated/org.eclipse.papyrus.views.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/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/.project b/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/.project
deleted file mode 100644
index 72e3c5a..0000000
--- a/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.views.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/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/META-INF/MANIFEST.MF
deleted file mode 100644
index d1fc893..0000000
--- a/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.papyrus.views.documentation.view;bundle-version="0.10.1",
- org.eclipse.papyrus.views.modelexplorer;bundle-version="0.10.1",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="0.10.1",
- org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.1.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
- org.eclipse.papyrus.infra.emf;bundle-version="0.10.1",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="0.10.1",
- org.eclipse.papyrus.infra.core;bundle-version="0.10.1",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="0.10.1"
-Bundle-Vendor: %providerName
-Bundle-Version: 0.10.1.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.views.documentation.view.papy
- rus;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/about.html b/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/about.html
deleted file mode 100644
index 82d49bf..0000000
--- a/deprecated/org.eclipse.papyrus.views.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/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/build.properties b/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/build.properties
deleted file mode 100644
index 972de33..0000000
--- a/deprecated/org.eclipse.papyrus.views.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
-source..=src/
-bin..=bin/
diff --git a/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/plugin.properties b/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/plugin.properties
deleted file mode 100644
index ef2d995..0000000
--- a/deprecated/org.eclipse.papyrus.views.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/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/plugin.xml b/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/plugin.xml
deleted file mode 100644
index 0afe5f0..0000000
--- a/deprecated/org.eclipse.papyrus.views.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.views.documentation.view.documentationPartHandler">
- <documentationPartHandler
- documentationPartHandler="org.eclipse.papyrus.views.documentation.view.papyrus.PapyrusDocumentationPartHandler">
- </documentationPartHandler>
- </extension>
-
-</plugin>
diff --git a/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/src/org/eclipse/papyrus/views/documentation/view/papyrus/PapyrusDocumentationPartHandler.java b/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/src/org/eclipse/papyrus/views/documentation/view/papyrus/PapyrusDocumentationPartHandler.java
deleted file mode 100644
index c2a60bf..0000000
--- a/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/src/org/eclipse/papyrus/views/documentation/view/papyrus/PapyrusDocumentationPartHandler.java
+++ /dev/null
@@ -1,201 +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.views.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.RecordingCommand;
-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.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.papyrus.infra.core.editor.CoreMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-import org.eclipse.papyrus.infra.emf.providers.MoDiscoContentProvider;
-import org.eclipse.papyrus.infra.gmfdiag.common.DiagramsUtil;
-import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
-import org.eclipse.papyrus.views.documentation.DocumentationManager;
-import org.eclipse.papyrus.views.documentation.IDocumentationManager;
-import org.eclipse.papyrus.views.documentation.view.IDocumentationPartHandler;
-import org.eclipse.papyrus.views.documentation.view.SelectResourceDialog;
-import org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView;
-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) {
- ServicesRegistry registry = getServicesRegistry(part);
- if(registry != null && cmd != null) {
- try {
- TransactionalEditingDomain domain = ServiceUtils.getInstance().getTransactionalEditingDomain(registry);
- domain.getCommandStack().execute(cmd);
- } catch (ServiceException ex) {
- ex.printStackTrace(System.err);
- }
- }
- }
-
- 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 {
- ServicesRegistry registry = getServicesRegistry(part);
- if(registry != null) {
- EditingDomain ed = ServiceUtils.getInstance().getTransactionalEditingDomain(registry);
- if(ed != null) {
- EObject eObject = ed.getResourceSet().getEObject(elementUri, false);
- final Diagram diagram;
- if(eObject instanceof Diagram) {
- diagram = (Diagram)eObject;
- } else {
- List<Diagram> diagrams = DiagramsUtil.getAssociatedDiagrams(eObject, null);
- if(diagrams.isEmpty()) {
- return;
- } else {
- diagram = diagrams.get(0);
- }
- }
-
- if(diagram != null) {
- final IPageManager pageMngr = ServiceUtils.getInstance().getIPageManager(registry);
- if(pageMngr != null) {
- if(pageMngr.isOpen(diagram)) {
- pageMngr.selectPage(diagram);
- } else {
- TransactionalEditingDomain editingDomain = ServiceUtils.getInstance().getTransactionalEditingDomain(registry);
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain, "Open diagram") {
-
- @Override
- public void doExecute() {
- pageMngr.openPage(diagram);
- }
- });
- }
- }
- }
- }
- }
- } catch (Exception e) {
- }
- }
-
- public EObject openElementSelectionDialog(IWorkbenchPart part) {
- Object selectedElement = null;
- ServicesRegistry registry = getServicesRegistry(part);
- if(registry != 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);
- }
- };
-
- ILabelProvider labelProvider;
- try {
- labelProvider = registry.getService(LabelProviderService.class).getLabelProvider();
- } catch (ServiceException ex) {
- ex.printStackTrace(System.out);
- labelProvider = new LabelProvider();
- }
-
- selectedElement = SelectResourceDialog.openElementSelection(registry, labelProvider, new MoDiscoContentProvider(), validator, null, true);
- }
- return adapt(selectedElement);
- }
-
- public boolean isReadOnly(IWorkbenchPart part, EObject eObject) {
- ServicesRegistry registry = getServicesRegistry(part);
- if(registry != null && eObject != null) {
- try {
- TransactionalEditingDomain domain = ServiceUtils.getInstance().getTransactionalEditingDomain(registry);
- return domain.isReadOnly(eObject.eResource());
- } catch (ServiceException ex) {
- ex.printStackTrace(System.out);
- }
- }
- 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 ServicesRegistry getServicesRegistry(IWorkbenchPart part) {
- if(part instanceof IMultiDiagramEditor) {
- return ((IMultiDiagramEditor)part).getServicesRegistry();
- }
- IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- if(activeEditor instanceof IMultiDiagramEditor) {
- return ((IMultiDiagramEditor)activeEditor).getServicesRegistry();
- }
- return null;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/src/org/eclipse/papyrus/views/documentation/view/papyrus/TransactionalUncheckedCommandProxy.java b/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/src/org/eclipse/papyrus/views/documentation/view/papyrus/TransactionalUncheckedCommandProxy.java
deleted file mode 100644
index 01603c1..0000000
--- a/deprecated/org.eclipse.papyrus.views.documentation.view.papyrus/src/org/eclipse/papyrus/views/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.views.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();
- }
-}