Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2019-05-20 04:41:43 -0400
committerptessier2019-05-20 04:41:43 -0400
commit940e7bd48a4c9d9fbf0895cba04b7bdf6ca94d1d (patch)
tree18bcb707fa901e6bac158418f48c842a6cd8ef6f
parent1d02ae804467f31bd78f46eb5606bdbde847a421 (diff)
downloadorg.eclipse.papyrus-940e7bd48a4c9d9fbf0895cba04b7bdf6ca94d1d.tar.gz
org.eclipse.papyrus-940e7bd48a4c9d9fbf0895cba04b7bdf6ca94d1d.tar.xz
org.eclipse.papyrus-940e7bd48a4c9d9fbf0895cba04b7bdf6ca94d1d.zip
Revert "Bug 547253 - [papyrusCore] Add a better API linked to use case for the pluginorg.eclipse.papyrus.infra.core.sasheditor"
-rw-r--r--examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/factory/CommentEditorFactory.java3
-rw-r--r--plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/commands/RenameNestedEditorCommand.java19
-rw-r--r--plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/TraverseTabHandler.java18
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/commands/CloseDiagramCommand.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/commands/CloseOtherDiagramsCommand.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/PapyrusInfraCore.usecases22
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/EditorAccessFunction.java51
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/IEditorPartWrapper.java47
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/IPapyrusEditor.java46
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/IPapyrusEditorDeclaration.java27
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/ISWTCompositeWrapper.java38
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IEditorModel.java4
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageModel.java3
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/IMultiPageEditorPart.java3
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/IPage.java3
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/SashTabDecorationSynchronizer.java8
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/multipage/editor/MultiPageEditor.java7
18 files changed, 36 insertions, 270 deletions
diff --git a/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/factory/CommentEditorFactory.java b/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/factory/CommentEditorFactory.java
index ec1672614e0..9dc24f36e3d 100644
--- a/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/factory/CommentEditorFactory.java
+++ b/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/factory/CommentEditorFactory.java
@@ -22,7 +22,6 @@ import org.eclipse.papyrus.example.uml.comment.editor.newresource.editor.Papyrus
import org.eclipse.papyrus.infra.core.editor.BackboneException;
import org.eclipse.papyrus.infra.ui.extension.diagrameditor.AbstractEditorFactory;
import org.eclipse.papyrus.infra.ui.multidiagram.actionbarcontributor.ActionBarContributorRegistry;
-import org.eclipse.papyrus.infra.core.sasheditor.api.IEditorPartWrapper;
import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel;
import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel;
import org.eclipse.papyrus.infra.core.services.ServiceException;
@@ -80,7 +79,7 @@ public class CommentEditorFactory extends AbstractEditorFactory {
*
*
*/
- class TextEditorModel implements IEditorPartWrapper {
+ class TextEditorModel implements IEditorModel {
/**
diff --git a/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/commands/RenameNestedEditorCommand.java b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/commands/RenameNestedEditorCommand.java
index 4e5fad84b88..e836d0b45aa 100644
--- a/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/commands/RenameNestedEditorCommand.java
+++ b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/commands/RenameNestedEditorCommand.java
@@ -25,15 +25,18 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.papyrus.editor.Activator;
+import org.eclipse.papyrus.infra.core.sasheditor.internal.SashWindowsContainer;
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.internationalization.utils.utils.LabelInternationalization;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalizationUtils;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
/**
* A command to be used with the Eclipse Commands Framework.
+ * This command is to be used with {@link SashWindowsContainer} implemented with the Di model.
* This command allows to rename a nested editor.
*
* This command use a Transaction.
@@ -95,10 +98,10 @@ public class RenameNestedEditorCommand extends AbstractHandler {
TransactionalEditingDomain editingDomain = null;
if (editorPart instanceof IAdaptable) {
- ServicesRegistry registry = ((IAdaptable) editorPart).getAdapter(ServicesRegistry.class);
+ ServicesRegistry registry = (ServicesRegistry) ((IAdaptable) editorPart).getAdapter(ServicesRegistry.class);
if (registry == null) {
- editingDomain = ((IAdaptable) editorPart).getAdapter(TransactionalEditingDomain.class);
+ editingDomain = (TransactionalEditingDomain) ((IAdaptable) editorPart).getAdapter(TransactionalEditingDomain.class);
} else {
try {
editingDomain = ServiceUtils.getInstance().getTransactionalEditingDomain(registry);
@@ -111,27 +114,27 @@ public class RenameNestedEditorCommand extends AbstractHandler {
if (editingDomain != null) {
// If the diagram label is available, modify this one.
final String diagramLabel = LabelInternationalization.getInstance().getDiagramLabelWithoutName(diagram);
- if (null != diagramLabel) {
+ if(null != diagramLabel){
InputDialog dialog = new InputDialog(Display.getCurrent().getActiveShell(), "Rename diagram label", "New label:", diagramLabel, null); //$NON-NLS-1$ //$NON-NLS-2$
if (Window.OK == dialog.open()) {
final String label = dialog.getValue();
editingDomain.getCommandStack().execute(LabelInternationalization.getInstance().getSetDiagramLabelCommand(editingDomain, diagram, label, null));
}
- } else {
+ }else{
InputDialog dialog = new InputDialog(Display.getCurrent().getActiveShell(), "Rename an existing diagram", "New name:", diagram.getName(), null); //$NON-NLS-1$ //$NON-NLS-2$
if (dialog.open() == Window.OK) {
final String name = dialog.getValue();
if (name != null && name.length() > 0) {
-
+
Command command = new RecordingCommand(editingDomain) {
-
-
+
+
@Override
protected void doExecute() {
diagram.setName(name);
}
};
-
+
editingDomain.getCommandStack().execute(command);
}
}
diff --git a/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/TraverseTabHandler.java b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/TraverseTabHandler.java
index d3d50e4992f..15c4117a550 100644
--- a/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/TraverseTabHandler.java
+++ b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/TraverseTabHandler.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2015 CEA LIST and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
*
* Contributors:
* Shuai Li (CEA LIST) <shuai.li@cea.fr> - Initial API and implementation
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.editor.handlers;
@@ -28,27 +28,27 @@ import org.eclipse.ui.PlatformUI;
/**
* The handler for the next/previous tab commands that let the user navigate to
* the next/previous page of the active tab-folder with Ctrl+Shift/Ctrl+Shift+Tab
- *
+ *
* @author Shuai Li
*/
public abstract class TraverseTabHandler extends AbstractHandler {
private final boolean isPrevious;
-
+
public TraverseTabHandler() {
isPrevious = false;
}
-
+
public TraverseTabHandler(boolean isPrevious) {
this.isPrevious = isPrevious;
}
-
+
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-
+
if (activeWorkbenchWindow != null) {
IWorkbenchPart activePart = activeWorkbenchWindow.getActivePage().getActivePart();
-
+
if (activePart instanceof PapyrusMultiDiagramEditor) {
PapyrusMultiDiagramEditor papyrusEditor = (PapyrusMultiDiagramEditor) activePart;
try {
@@ -58,7 +58,7 @@ public abstract class TraverseTabHandler extends AbstractHandler {
} else {
nextPage = papyrusEditor.getISashWindowsContainer().getNextPage();
}
-
+
papyrusEditor.getISashWindowsContainer().selectPage(nextPage);
} catch (Exception e) {
Activator.log.error(e);
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/commands/CloseDiagramCommand.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/commands/CloseDiagramCommand.java
index 29964ee280e..52a2efbaf7e 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/commands/CloseDiagramCommand.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/commands/CloseDiagramCommand.java
@@ -4,9 +4,11 @@ import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.utils.IPageUtils;
+import org.eclipse.papyrus.infra.core.sasheditor.internal.SashWindowsContainer;
/**
* A command to be used with the Eclipse Commands Framework.
+ * This command is to be used with {@link SashWindowsContainer} implemented with the Di model.
* This command allows to close the currently openened diagram.
*
* @author cedric dumoulin
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/commands/CloseOtherDiagramsCommand.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/commands/CloseOtherDiagramsCommand.java
index 8816df28847..8871febfff4 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/commands/CloseOtherDiagramsCommand.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/commands/CloseOtherDiagramsCommand.java
@@ -3,9 +3,11 @@ package org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.commands;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.infra.core.sasheditor.internal.SashWindowsContainer;
/**
* A command to be used with the Eclipse Commands Framework.
+ * This command is to be used with {@link SashWindowsContainer} implemented with the Di model.
* This command allows to close all diagrams in the folder, except the currently openened one.
*
* @author cedric dumoulin
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/META-INF/MANIFEST.MF
index 7e99193a84d..779ecd47a72 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/META-INF/MANIFEST.MF
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/META-INF/MANIFEST.MF
@@ -1,11 +1,10 @@
Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.infra.core.sasheditor,
- org.eclipse.papyrus.infra.core.sasheditor.api,
org.eclipse.papyrus.infra.core.sasheditor.contentprovider,
org.eclipse.papyrus.infra.core.sasheditor.contentprovider.simple,
org.eclipse.papyrus.infra.core.sasheditor.editor,
org.eclipse.papyrus.infra.core.sasheditor.editor.actionbarcontributor,
- org.eclipse.papyrus.infra.core.sasheditor.internal;x-friends:="org.eclipse.papyrus.editor",
+ org.eclipse.papyrus.infra.core.sasheditor.internal;x-internal:=true,
org.eclipse.papyrus.infra.core.sasheditor.internal.eclipsecopy;x-internal:=true,
org.eclipse.papyrus.infra.core.sasheditor.multipage.editor,
org.eclipse.papyrus.infra.core.sasheditor.utils
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/PapyrusInfraCore.usecases b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/PapyrusInfraCore.usecases
deleted file mode 100644
index 11540c6d382..00000000000
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/PapyrusInfraCore.usecases
+++ /dev/null
@@ -1,22 +0,0 @@
-# Requirements defined for the papyrus infra Core sash Editor plug-in
-
-# General Requirements
-Requirement: Req_001: Papyrus shall provide to the developer, elements to install its own IEditorPart inside the sash editor.
-Code instruction:
-- the IEditorPart shall be integrated by using a class that implements org.eclipse.papyrus.infra.core.api.IEditorPartWrapper
-- this obtained class shall be provided by the factory from org.eclipse.papyrus.infra.ui.extension.diagrameditor.AbstractEditorFactory
-- the factory shall be referenced by the extension org.eclipse.papyrus.infra.ui.papyrusDiagram (not only diagram...)
-
-Requirement: Req_002: Papyrus shall provide to the developer, elements to display its own swt.composite as an editor ( cf req_001) as inside the sash editor.
-Code instruction:
-- editor shall be integrated by using a class that implements org.eclipse.papyrus.infra.core.sasheditor.api.ISWTCompositeWrapper
-- this class shall be provided by the factory from org.eclipse.papyrus.infra.ui.extension.diagrameditor.AbstractEditorFactory
-- the factory shall be reference by the extension org.eclipse.papyrus.infra.ui.papyrusDiagram
-
-Requirement: Req_003: Papyrus shall provide to the developer an access point to have access to open/ closed editor
-Code instruction:
-- to get the ISashWindowContainer see org.eclipse.papyrus.infra.core.sasheditor.api.EditorAccessFunction
-
-Requirement: Req_004: Papyrus shall provide to the developer an access point to have the active editor
-Code instruction:
-- to get the Ipage or the active Editor see org.eclipse.papyrus.infra.core.sasheditor.api.EditorAccessFunction \ No newline at end of file
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/EditorAccessFunction.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/EditorAccessFunction.java
deleted file mode 100644
index daf9d429092..00000000000
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/EditorAccessFunction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2019 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.sasheditor.api;
-
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IMultiPageEditorPart;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
-
-/**
- * this class provides to the developer an access point to have access to open/ closed editor
- *
- */
-public class EditorAccessFunction {
-
- /**
- * Shortcut to get the SashContainer from the multipage editor, for example papyrus.
- *
- * @param multiPageEditorPart
- * @return null or the ISashWindowsContainer
- */
- public static ISashWindowsContainer getSashContainerFromEditor(IMultiPageEditorPart multiPageEditorPart) {
- return multiPageEditorPart.getAdapter(ISashWindowsContainer.class);
- }
-
- /**
- * getActivePage from a multipage Editor
- *
- * @param multiPageEditorPart
- * @return null or the activeEditor
- */
- public static IPapyrusEditor getActiveEditor(IMultiPageEditorPart multiPageEditorPart) {
- ISashWindowsContainer sashContainer = getSashContainerFromEditor(multiPageEditorPart);
- if ((sashContainer != null) && !sashContainer.isDisposed()) {
- IPapyrusEditor activePage = sashContainer.getActiveSashWindowsPage();
- return activePage;
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/IEditorPartWrapper.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/IEditorPartWrapper.java
deleted file mode 100644
index 3e8f886fd3e..00000000000
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/IEditorPartWrapper.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2019 CEA LIST
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.core.sasheditor.api;
-
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.EditorActionBarContributor;
-
-/**
- * This class is used to create a wrapper. From which you can launch an IeditorPart that can be seen by Papyrus Core.
- * see also org.eclipse.papyrus.infra.ui.extension.diagrameditor.AbstractEditorFactory to create a factory that provide it
- * see also the extension point to reference the factory org.eclipse.papyrus.infra.ui.papyrusDiagram
- */
-public interface IEditorPartWrapper extends IEditorModel, IPapyrusEditorDeclaration {
-
- /**
- * Create the Eclipse Editor that should be shown inside Papyrus
- *
- *
- * @return A new instance of the IEditorPart.
- */
- @Override
- public IEditorPart createIEditorPart() throws PartInitException;
-
- /**
- * Get the EditorActionBarContributor that should be associated with the editor .
- *
- * @return
- */
- @Override
- public EditorActionBarContributor getActionBarContributor();
-
-}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/IPapyrusEditor.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/IPapyrusEditor.java
deleted file mode 100644
index 24f55957adf..00000000000
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/IPapyrusEditor.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2019 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.sasheditor.api;
-
-/*****************************************************************************
- * Copyright (c) 2019 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-
-/**
- * This is the super type of real editors contained by the sashEditor
- * see also PapyrusDeclaration useful to add it by extension point
- * in the runtime a IpapyrusEditorDeclaration becomes a IPapyrus Editor
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.api.IEditorPartWrapper
- * @see org.eclipse.papyrus.infra.core.sasheditor.api.ISWTCompositeWrapper
- */
-
-
-
-public interface IPapyrusEditor {
-
-}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/IPapyrusEditorDeclaration.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/IPapyrusEditorDeclaration.java
deleted file mode 100644
index 923b0b392bc..00000000000
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/IPapyrusEditorDeclaration.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2019 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.sasheditor.api;
-
-/**
- * This is the super type of editors declaration contained by the sashEditor
- * This only a declaration to set the semantic.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.api.IEditorPartWrapper
- * @see org.eclipse.papyrus.infra.core.sasheditor.api.ISWTCompositeWrapper
- */
-public interface IPapyrusEditorDeclaration {
-
-}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/ISWTCompositeWrapper.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/ISWTCompositeWrapper.java
deleted file mode 100644
index 77bbf1375be..00000000000
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/api/ISWTCompositeWrapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2019 CEA LIST
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.core.sasheditor.api;
-
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IComponentModel;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Papyrus shall provide to the developer, elements to display its own swt.composite as an editor as inside the sash editor.
- * see also org.eclipse.papyrus.infra.ui.extension.diagrameditor.AbstractEditorFactory to create a factory that provide it
- * see also the extension point to reference the factory org.eclipse.papyrus.infra.ui.papyrusDiagram
- */
-public interface ISWTCompositeWrapper extends IComponentModel, IPapyrusEditorDeclaration {
-
- /**
- * Create the Control corresponding to this model.
- *
- * @param parent
- * The parent of the created container.
- * @return
- */
- @Override
- public Composite createPartControl(Composite parent);
-
-}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IEditorModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IEditorModel.java
index 79c1e15543c..74a84eec30f 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IEditorModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IEditorModel.java
@@ -11,7 +11,6 @@
*
* Contributors:
* Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- * Patrick Tessier (CEA LIST) - add comments
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.contentprovider;
@@ -22,9 +21,6 @@ import org.eclipse.ui.part.EditorActionBarContributor;
/**
* This model indicate that an Editor should be drawn in the sash window folder.
- * This class is used to create an editor that can be integrated by Papyrus Core. This the inking point for a papyrus editor
- *
- * see org.eclipse.papyrus.infra.core.api.IEditorAnchorPoint
*
* @author dumoulin
*
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageModel.java
index c498c5cf5b8..f2df50d14c2 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageModel.java
@@ -12,7 +12,6 @@
*
* CEA LIST - Initial API and implementation
* Christian W. Damus (CEA) - bug 392301
- * Patrick Tessier (CEA LIST) add comments
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.contentprovider;
@@ -25,9 +24,7 @@ import org.eclipse.swt.graphics.Image;
* It can be an Editor or a simple control.
* This interface is used by the sashes window to interact with the model describing the element to be
* shown in the TabItem.
- * To implement a new editor see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel
*
- * @see org.eclipse.papyrus.infra.core.sasheditor.api.IPapyrusEditorDeclaration
* @author dumoulin
*
*/
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/IMultiPageEditorPart.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/IMultiPageEditorPart.java
index c6ce98b7ea3..f5aa31fbd40 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/IMultiPageEditorPart.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/IMultiPageEditorPart.java
@@ -15,7 +15,6 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.editor;
-import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IWorkbenchPartSite;
@@ -24,7 +23,7 @@ import org.eclipse.ui.IWorkbenchPartSite;
* Marker to mark a EditorPart as a MultiPartEditor. Provides methods needed by classes
* like MultiPageActionBarContributor and MultiPageSelectionProvider.
*/
-public interface IMultiPageEditorPart extends IAdaptable {
+public interface IMultiPageEditorPart {
/**
* Get the currently active editor of the MultiPageEditorPart.
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/IPage.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/IPage.java
index 085ee27f3fe..0bee32e3ccd 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/IPage.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/IPage.java
@@ -3,7 +3,6 @@
*/
package org.eclipse.papyrus.infra.core.sasheditor.editor;
-import org.eclipse.papyrus.infra.core.sasheditor.api.IPapyrusEditor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Control;
@@ -16,7 +15,7 @@ import org.eclipse.swt.widgets.Control;
* @author cedric dumoulin
*
*/
-public interface IPage extends IPapyrusEditor {
+public interface IPage {
/**
* Get the title to be shown in the tab
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/SashTabDecorationSynchronizer.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/SashTabDecorationSynchronizer.java
index 838fd07eac2..5495148f3d6 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/SashTabDecorationSynchronizer.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/SashTabDecorationSynchronizer.java
@@ -15,6 +15,7 @@
package org.eclipse.papyrus.infra.core.sasheditor.editor;
+import org.eclipse.papyrus.infra.core.sasheditor.Activator;
import org.eclipse.papyrus.infra.core.sasheditor.internal.SashWindowsContainer;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPropertyListener;
@@ -85,7 +86,8 @@ public class SashTabDecorationSynchronizer {
@Override
public void propertyChanged(Object source, int propId) {
- if (propId == IWorkbenchPart.PROP_TITLE && source instanceof IEditorPart) {
+ if (propId == IWorkbenchPart.PROP_TITLE && source instanceof IEditorPart)
+ {
refreshContainerTabForPage((IEditorPart) source);
}
@@ -136,7 +138,9 @@ public class SashTabDecorationSynchronizer {
* @param page
*/
protected void attachPage(IPage page) {
- if (page instanceof IEditorPage) {
+ if (page instanceof IEditorPage)
+ {
+ Activator.log.debug("attachPage( " + page + " )");
IEditorPage editorPage = (IEditorPage) page;
editorPage.getIEditorPart().addPropertyListener(editorPartPropertyListener);
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/multipage/editor/MultiPageEditor.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/multipage/editor/MultiPageEditor.java
index 5cf339c79e2..6655c0f792a 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/multipage/editor/MultiPageEditor.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/multipage/editor/MultiPageEditor.java
@@ -50,10 +50,7 @@ import org.eclipse.ui.part.MultiPageEditorPart;
* site management.
*
* @author dumoulin
- * @deprecated
- * @since 4.4
*/
-@Deprecated
public abstract class MultiPageEditor extends MultiPageEditorPart {
/** The pageProvider */
@@ -65,7 +62,7 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
private ITabFolderModel tabFolderModel;
/** Ordered set of currently shown diagrams */
- protected List<IPageModel> currentTabs = new ArrayList<>();
+ protected List<IPageModel> currentTabs = new ArrayList<IPageModel>();
/**
* Constructor.
@@ -305,7 +302,7 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
// There is some extra editors ! remove them.
// remove extra editors : for each open editor, check if its model is in
// the list of required models.
- List<IPageModel> toBeRemoved = new ArrayList<>();
+ List<IPageModel> toBeRemoved = new ArrayList<IPageModel>();
Iterator<IPageModel> currentIter = currentTabs.iterator();
while (currentIter.hasNext()) {
IPageModel model = currentIter.next();

Back to the top