Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Redor2013-12-05 14:35:43 +0000
committerLaurent Redor2013-12-06 16:11:48 +0000
commita99b7506fbd222c221eb7fb667421ee9b76966a6 (patch)
tree7f1a921e05a2277bc76abd9b376289ead78fb670
parent487c515e0811e2663f96b34cb9ce51a32c98bd31 (diff)
downloadorg.eclipse.sirius-a99b7506fbd222c221eb7fb667421ee9b76966a6.tar.gz
org.eclipse.sirius-a99b7506fbd222c221eb7fb667421ee9b76966a6.tar.xz
org.eclipse.sirius-a99b7506fbd222c221eb7fb667421ee9b76966a6.zip
[422957] Remove some of the deprecated internal Sirius's methods
Change-Id: I59590e7f9d7b032cb1254c456b5d91942b99a567 Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/tool/internal/util/EditPartsHelper.java23
-rw-r--r--plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/tools/internal/actions/visibility/RevealElementsAction.java79
-rw-r--r--plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/ui/tools/internal/layout/provider/AbstractCompositeLayoutProvider.java27
-rw-r--r--plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/business/internal/helper/task/CreateTableTask.java27
-rw-r--r--plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/command/TableCommandFactory.java35
-rw-r--r--plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/business/internal/refresh/CreateTreeTask.java9
-rw-r--r--plugins/org.eclipse.sirius/src/org/eclipse/sirius/tools/internal/util/CrossReferenceAdapter.java2
-rw-r--r--plugins/org.eclipse.sirius/src/org/eclipse/sirius/tools/internal/util/GMFUtil.java1
8 files changed, 28 insertions, 175 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/tool/internal/util/EditPartsHelper.java b/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/tool/internal/util/EditPartsHelper.java
index f10eaaf88a..c97f3e0b05 100644
--- a/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/tool/internal/util/EditPartsHelper.java
+++ b/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/tool/internal/util/EditPartsHelper.java
@@ -23,13 +23,6 @@ import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
import org.eclipse.gef.ConnectionEditPart;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Iterators;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-
import org.eclipse.sirius.business.api.session.Session;
import org.eclipse.sirius.business.api.session.SessionManager;
import org.eclipse.sirius.diagram.sequence.business.internal.elements.SequenceDiagram;
@@ -43,6 +36,12 @@ import org.eclipse.sirius.diagram.ui.tools.internal.util.EditPartQuery;
import org.eclipse.sirius.viewpoint.DDiagramElement;
import org.eclipse.sirius.viewpoint.ViewpointPackage;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
/**
* Helper class with utilities to deal with GMF edit parts.
*
@@ -83,9 +82,7 @@ public final class EditPartsHelper {
* @param element
* the element from which to start the search for messages.
* @return the messages found without duplicates.
- * @deprecated
*/
- @Deprecated
public static Set<SequenceMessageEditPart> getAllMessages(IGraphicalEditPart element) {
Set<SequenceMessageEditPart> allMessages = Sets.newHashSet();
allMessages.addAll(EditPartsHelper.getAllMessagesFrom(element));
@@ -100,9 +97,7 @@ public final class EditPartsHelper {
* @param element
* the element from which to start the search for messages.
* @return the messages found.
- * @deprecated
*/
- @Deprecated
public static List<SequenceMessageEditPart> getAllMessagesFrom(IGraphicalEditPart element) {
List<SequenceMessageEditPart> messagesParts = Lists.newArrayList();
EditPartsHelper.addAllMessagesFrom(element, messagesParts);
@@ -116,9 +111,7 @@ public final class EditPartsHelper {
* @param element
* the element from which to start the search for messages.
* @return the messages found.
- * @deprecated
*/
- @Deprecated
private static List<SequenceMessageEditPart> getAllMessagesTo(IGraphicalEditPart element) {
List<SequenceMessageEditPart> messagesParts = Lists.newArrayList();
EditPartsHelper.addAllMessagesTo(element, messagesParts);
@@ -132,9 +125,7 @@ public final class EditPartsHelper {
* @param element
* the element from which to start the search for executions.
* @return the executions found.
- * @deprecated
*/
- @Deprecated
public static List<ExecutionEditPart> getAllExecutions(IGraphicalEditPart element) {
return Lists.newArrayList(Iterators.filter(Iterators.filter(new EditPartsTreeIterator(element), ExecutionEditPart.class), EditPartsHelper.isValid()));
}
@@ -147,9 +138,7 @@ public final class EditPartsHelper {
* the element from which to start the search for executions.
* @return the executions found.
*
- * @deprecated
*/
- @Deprecated
public static List<LifelineEditPart> getAllLifelines(IGraphicalEditPart element) {
return Lists.newArrayList(Iterators.filter(Iterators.filter(new EditPartsTreeIterator(element), LifelineEditPart.class), EditPartsHelper.isValid()));
}
diff --git a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/tools/internal/actions/visibility/RevealElementsAction.java b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/tools/internal/actions/visibility/RevealElementsAction.java
deleted file mode 100644
index 10cc38aa61..0000000000
--- a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/tools/internal/actions/visibility/RevealElementsAction.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 THALES GLOBAL SERVICES.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.sirius.diagram.tools.internal.actions.visibility;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-import org.eclipse.sirius.diagram.tools.api.requests.RequestConstants;
-
-/**
- * Reveal (un-hide) a {@link org.eclipse.sirius.viewpoint.DDiagramElement} from a
- * {@link org.eclipse.sirius.viewpoint.DDiagram}.
- *
- * @author dlecan
- * @deprecated since 2.5,
- * {@link org.eclipse.sirius.diagram.tools.internal.actions.visibility.RevealAllElementsAction}
- * must be used instead.
- */
-@Deprecated
-public class RevealElementsAction extends AbstractRevealElementsAction<EditPart> {
-
- /**
- * Constructor.
- */
- public RevealElementsAction() {
- super();
- }
-
- /**
- * Constructor.
- *
- * @param text
- * String
- */
- public RevealElementsAction(final String text) {
- super(text);
- }
-
- /**
- * Constructor.
- *
- * @param text
- * String
- * @param image
- * ImageDescriptor
- */
- public RevealElementsAction(final String text, final ImageDescriptor image) {
- super(text, image);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected boolean doRun(final EditPart element) {
- final Request refreshRequest = new GroupRequest(RequestConstants.REQ_REVEAL_ALLS);
- element.performRequest(refreshRequest);
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Class<EditPart> getElementType() {
- return EditPart.class;
- }
-
-}
diff --git a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/ui/tools/internal/layout/provider/AbstractCompositeLayoutProvider.java b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/ui/tools/internal/layout/provider/AbstractCompositeLayoutProvider.java
index 2a316be321..a6f6550a15 100644
--- a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/ui/tools/internal/layout/provider/AbstractCompositeLayoutProvider.java
+++ b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/ui/tools/internal/layout/provider/AbstractCompositeLayoutProvider.java
@@ -53,12 +53,6 @@ import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
import org.eclipse.gmf.runtime.notation.LayoutConstraint;
import org.eclipse.gmf.runtime.notation.Size;
import org.eclipse.gmf.runtime.notation.View;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Iterators;
-import com.google.common.collect.Lists;
-
import org.eclipse.sirius.diagram.edit.api.part.AbstractDiagramElementContainerEditPart;
import org.eclipse.sirius.diagram.edit.api.part.IDiagramElementEditPart;
import org.eclipse.sirius.diagram.ui.tools.api.layout.LayoutExtender;
@@ -69,6 +63,11 @@ import org.eclipse.sirius.diagram.ui.tools.internal.layout.AutoSizeAndRegionAwar
import org.eclipse.sirius.diagram.ui.tools.internal.layout.DiagramLayoutCustomization;
import org.eclipse.sirius.viewpoint.DDiagramElement;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
+
/**
* Abstract base class to factor out the common code between
* {@link CompositeLeftRightLayoutProvider},
@@ -297,22 +296,6 @@ public abstract class AbstractCompositeLayoutProvider extends CompositeLayoutPro
return super.buildEdges(extender.filterEdges(selectedObjects, editPartToNodeDict), editPartToNodeDict);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider
- * #build_nodes(java.util.List, java.util.Map,
- * org.eclipse.draw2d.graph.Subgraph)
- *
- * @deprecated
- */
- @Override
- @Deprecated
- protected NodeList build_nodes(List selectedObjects, Map editPartToNodeDict, Subgraph rootGraph) {
- return buildNodes(selectedObjects, editPartToNodeDict, rootGraph);
- }
-
@Override
protected NodeList buildNodes(List selectedObjects, Map editPartToNodeDict, Subgraph rootGraph) {
ListIterator li = selectedObjects.listIterator();
diff --git a/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/business/internal/helper/task/CreateTableTask.java b/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/business/internal/helper/task/CreateTableTask.java
index 4fc960bef3..2e1e3ead86 100644
--- a/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/business/internal/helper/task/CreateTableTask.java
+++ b/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/business/internal/helper/task/CreateTableTask.java
@@ -13,14 +13,14 @@ package org.eclipse.sirius.table.business.internal.helper.task;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.sirius.common.tools.api.interpreter.EvaluationException;
-import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter;
-import org.eclipse.sirius.common.tools.api.util.StringUtil;
import org.eclipse.sirius.business.api.dialect.DialectManager;
import org.eclipse.sirius.business.api.helper.task.AbstractCommandTask;
import org.eclipse.sirius.business.api.logger.RuntimeLoggerManager;
import org.eclipse.sirius.business.api.query.IdentifiedElementQuery;
import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.common.tools.api.interpreter.EvaluationException;
+import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter;
+import org.eclipse.sirius.common.tools.api.util.StringUtil;
import org.eclipse.sirius.table.metamodel.table.description.TableDescription;
import org.eclipse.sirius.tools.api.interpreter.InterpreterUtil;
import org.eclipse.sirius.viewpoint.description.DescriptionPackage;
@@ -46,26 +46,7 @@ public class CreateTableTask extends AbstractCommandTask {
* the table description.
* @param semanticElement
* semantic element on which the user requested the creation of
- * the {@link org.eclipse.sirius.table.metamodel.table.DTable}
- * .
- * @deprecated use
- * {@link CreateTableTask#CreateTableTask(TableDescription, EObject, IProgressMonitor)}
- * instead
- */
- public CreateTableTask(final TableDescription desc, final EObject semanticElement) {
- this.semanticElement = semanticElement;
- this.description = desc;
- }
-
- /**
- * Creates the command.
- *
- * @param desc
- * the table description.
- * @param semanticElement
- * semantic element on which the user requested the creation of
- * the {@link org.eclipse.sirius.table.metamodel.table.DTable}
- * .
+ * the {@link org.eclipse.sirius.table.metamodel.table.DTable} .
* @param monitor
* a {@link IProgressMonitor} to show progression of
* {@link org.eclipse.sirius.table.metamodel.table.DTable}
diff --git a/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/command/TableCommandFactory.java b/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/command/TableCommandFactory.java
index 7268e59aec..0c9efd8172 100644
--- a/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/command/TableCommandFactory.java
+++ b/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/command/TableCommandFactory.java
@@ -18,7 +18,6 @@ import java.util.Map;
import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.common.command.AbstractCommand;
import org.eclipse.emf.common.command.Command;
@@ -26,11 +25,6 @@ import org.eclipse.emf.common.command.UnexecutableCommand;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.sirius.common.tools.api.interpreter.EvaluationException;
-import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter;
-import org.eclipse.sirius.common.tools.api.interpreter.IInterpreterSiriusVariables;
-import org.eclipse.sirius.common.tools.api.util.Option;
-import org.eclipse.sirius.common.tools.api.util.StringUtil;
import org.eclipse.sirius.business.api.helper.task.AbstractCommandTask;
import org.eclipse.sirius.business.api.helper.task.ICommandTask;
import org.eclipse.sirius.business.api.helper.task.InitInterpreterVariablesTask;
@@ -41,6 +35,15 @@ import org.eclipse.sirius.business.api.helper.task.UnexecutableTask;
import org.eclipse.sirius.business.api.helper.task.label.InitInterpreterFromParsedVariableTask2;
import org.eclipse.sirius.business.api.logger.RuntimeLoggerManager;
import org.eclipse.sirius.business.api.preferences.SiriusPreferencesKeys;
+import org.eclipse.sirius.common.tools.api.interpreter.EvaluationException;
+import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter;
+import org.eclipse.sirius.common.tools.api.interpreter.IInterpreterSiriusVariables;
+import org.eclipse.sirius.common.tools.api.util.Option;
+import org.eclipse.sirius.common.tools.api.util.StringUtil;
+import org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor;
+import org.eclipse.sirius.ecore.extender.business.api.accessor.exception.FeatureNotFoundException;
+import org.eclipse.sirius.ecore.extender.business.api.permission.IPermissionAuthority;
+import org.eclipse.sirius.ecore.extender.business.api.permission.exception.LockedInstanceException;
import org.eclipse.sirius.table.business.api.helper.TableHelper;
import org.eclipse.sirius.table.business.internal.helper.task.CreateTableTask;
import org.eclipse.sirius.table.business.internal.helper.task.DeleteTableElementTask;
@@ -76,10 +79,6 @@ import org.eclipse.sirius.viewpoint.description.tool.AbstractToolDescription;
import org.eclipse.sirius.viewpoint.description.tool.AbstractVariable;
import org.eclipse.sirius.viewpoint.description.tool.RepresentationCreationDescription;
import org.eclipse.sirius.viewpoint.description.tool.ToolPackage;
-import org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor;
-import org.eclipse.sirius.ecore.extender.business.api.accessor.exception.FeatureNotFoundException;
-import org.eclipse.sirius.ecore.extender.business.api.permission.IPermissionAuthority;
-import org.eclipse.sirius.ecore.extender.business.api.permission.exception.LockedInstanceException;
/**
* A command factory that creates commands that can be undone.
@@ -628,22 +627,6 @@ public class TableCommandFactory extends AbstractCommandFactory implements ITabl
* the tool that describes how to create the table.
* @param semanticElement
* the element from which the table will be created.
- * @return a command that is able to create a table.
- * @deprecated use
- * {@link TableCommandFactory#buildCreateTableFromDescription(TableDescription, EObject, IProgressMonitor)}
- * instead
- */
- public DCommand buildCreateTableFromDescription(final TableDescription description, final EObject semanticElement) {
- return buildCreateTableFromDescription(description, semanticElement, new NullProgressMonitor());
- }
-
- /**
- * Create a command that is able to create a table.
- *
- * @param description
- * the tool that describes how to create the table.
- * @param semanticElement
- * the element from which the table will be created.
* @param monitor
* a {@link IProgressMonitor} to show progression of
* {@link DTable} creation
diff --git a/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/business/internal/refresh/CreateTreeTask.java b/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/business/internal/refresh/CreateTreeTask.java
index a3ea062f63..99b599e08e 100644
--- a/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/business/internal/refresh/CreateTreeTask.java
+++ b/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/business/internal/refresh/CreateTreeTask.java
@@ -13,14 +13,14 @@ package org.eclipse.sirius.tree.business.internal.refresh;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.sirius.common.tools.api.interpreter.EvaluationException;
-import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter;
-import org.eclipse.sirius.common.tools.api.util.StringUtil;
import org.eclipse.sirius.business.api.dialect.DialectManager;
import org.eclipse.sirius.business.api.helper.task.AbstractCommandTask;
import org.eclipse.sirius.business.api.logger.RuntimeLoggerManager;
import org.eclipse.sirius.business.api.query.IdentifiedElementQuery;
import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.common.tools.api.interpreter.EvaluationException;
+import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter;
+import org.eclipse.sirius.common.tools.api.util.StringUtil;
import org.eclipse.sirius.tools.api.interpreter.InterpreterUtil;
import org.eclipse.sirius.tree.description.TreeDescription;
import org.eclipse.sirius.viewpoint.description.DescriptionPackage;
@@ -49,8 +49,7 @@ public class CreateTreeTask extends AbstractCommandTask {
* the {@link org.eclipse.sirius.tree.metamodel.tree.DTree}
* @param monitor
* a {@link IProgressMonitor} to show progression of
- * {@link org.eclipse.sirius.tree.metamodel.tree.DTree}
- * creation
+ * {@link org.eclipse.sirius.tree.metamodel.tree.DTree} creation
*/
public CreateTreeTask(final TreeDescription desc, final EObject semanticElement, IProgressMonitor monitor) {
this.semanticElement = semanticElement;
diff --git a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/tools/internal/util/CrossReferenceAdapter.java b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/tools/internal/util/CrossReferenceAdapter.java
index 2032f8672b..5525818fc3 100644
--- a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/tools/internal/util/CrossReferenceAdapter.java
+++ b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/tools/internal/util/CrossReferenceAdapter.java
@@ -52,9 +52,7 @@ import org.eclipse.emf.ecore.util.InternalEList;
* author Christian Vogt (cvogt) author Christian W. Damus (cdamus)
*
* @author mchauvin (added for checktyle)
- * @deprecated will be deleted soon
*/
-@Deprecated
@SuppressWarnings({ "rawtypes", "unchecked" })
public class CrossReferenceAdapter extends ECrossReferenceAdapter {
diff --git a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/tools/internal/util/GMFUtil.java b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/tools/internal/util/GMFUtil.java
index 2e30b3e1a7..98a79879a0 100644
--- a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/tools/internal/util/GMFUtil.java
+++ b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/tools/internal/util/GMFUtil.java
@@ -22,7 +22,6 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
* Useful operations linked to GMF.
*
* @author mchauvin
- * @deprecated will be deleted soon
*/
@Deprecated
public final class GMFUtil {

Back to the top