diff options
| author | Esteban Dugueperoux | 2015-08-20 08:32:07 +0000 |
|---|---|---|
| committer | Esteban DUGUEPEROUX | 2015-08-20 14:22:09 +0000 |
| commit | 097a888b2d990cdeeda8f9ea91566a23cccde306 (patch) | |
| tree | 05f0b44bec998b7e48a0b4c0093034548d9b015a | |
| parent | 78d6c23282ab364dcb70a71f9274ac6066e37f5b (diff) | |
| download | org.eclipse.sirius-097a888b2d990cdeeda8f9ea91566a23cccde306.tar.gz org.eclipse.sirius-097a888b2d990cdeeda8f9ea91566a23cccde306.tar.xz org.eclipse.sirius-097a888b2d990cdeeda8f9ea91566a23cccde306.zip | |
[475380] Rename "Arrange Linked Bordered Nodes" action
- Rename "Arrange Linked Bordered Nodes" action into "Arrange Linked
Border Nodes"
Bug: 475380
Change-Id: Iff42611834d54028f899e36ad586c8a75fad3fc9
Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
14 files changed, 169 insertions, 174 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/plugin.xml b/plugins/org.eclipse.sirius.diagram.ui/plugin.xml index a7a26db3de..66e69742ce 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/plugin.xml +++ b/plugins/org.eclipse.sirius.diagram.ui/plugin.xml @@ -131,9 +131,9 @@ <partMenuGroup menubarPath="/edit/" id="copyLayoutGroup" separator="true" /> <partAction menubarPath="/edit/copyLayoutGroup" id="copyLayoutAction" /> <partAction menubarPath="/edit/copyLayoutGroup" id="pasteLayoutAction" /> - <partAction menubarPath="/diagramMenu/arrangeMenu/arrangeGroup" id="arrangeBorderedNodesAction"/> + <partAction menubarPath="/diagramMenu/arrangeMenu/arrangeGroup" id="arrangeBorderNodesAction"/> <!--partAction menubarPath="/diagramMenu/routerMenu/routerGroup" id="treeRoutingStyleAction"/--> - <partAction toolbarPath="/arrangeMenu/arrangeGroup" id="arrangeBorderedNodesActionToolBar"/> + <partAction toolbarPath="/arrangeMenu/arrangeGroup" id="arrangeBorderNodesActionToolBar"/> <!-- Add the DeselectAll action after selectAll action--> <partAction menubarPath="/edit/selectAll" id="deselectAll"/> <!-- Add distribute action in new group --> @@ -156,7 +156,7 @@ <popupMenuGroup path="/formatMenu/" id="pinGroup" /> <popupAction path="/formatMenu/pinGroup" id="pinElementsAction" /> <popupAction path="/formatMenu/pinGroup" id="unpinElementsAction" /> - <popupAction path="/formatMenu/arrangeMenu/arrangeGroup" id="arrangeBorderedNodesAction"/> + <popupAction path="/formatMenu/arrangeMenu/arrangeGroup" id="arrangeBorderNodesAction"/> <!-- Add distribute action in new distribute group --> <popupMenu path="/formatMenu/alignMenu" id="distributeMenu"/> <popupMenuGroup path="/formatMenu/distributeMenu/" id="distributeHorizontalGroup"/> @@ -467,7 +467,7 @@ objectClass="org.eclipse.sirius.diagram.ui.edit.api.part.IDDiagramEditPart"> </popupStructuredContributionCriteria> <popupAction - id="arrangeBorderedNodesAction"> + id="arrangeBorderNodesAction"> </popupAction> </popupContribution> </contributionItemProvider> @@ -1394,8 +1394,8 @@ style="push"> </command> <command - commandId="org.eclipse.sirius.diagram.ui.arrangeLinkedBorderedNodes" - label="Arrange Linked Bordered Nodes" + commandId="org.eclipse.sirius.diagram.ui.arrangeLinkedBorderNodes" + label="Arrange Linked Border Nodes" style="push"> </command> </menuContribution>--> diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/providers/SiriusContributionItemProvider.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/providers/SiriusContributionItemProvider.java index 629a8296c7..0c54fe1d37 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/providers/SiriusContributionItemProvider.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/providers/SiriusContributionItemProvider.java @@ -21,7 +21,7 @@ import org.eclipse.sirius.diagram.ui.tools.internal.actions.SaveAsImageFileActio import org.eclipse.sirius.diagram.ui.tools.internal.actions.SelectHiddenElementsAction; import org.eclipse.sirius.diagram.ui.tools.internal.actions.TabbarRouterAction; import org.eclipse.sirius.diagram.ui.tools.internal.actions.distribute.DistributeAction; -import org.eclipse.sirius.diagram.ui.tools.internal.actions.layout.ArrangeBorderedNodesAction; +import org.eclipse.sirius.diagram.ui.tools.internal.actions.layout.ArrangeBorderNodesAction; import org.eclipse.sirius.diagram.ui.tools.internal.actions.layout.CopyLayoutAction; import org.eclipse.sirius.diagram.ui.tools.internal.actions.layout.PasteLayoutAction; import org.eclipse.sirius.diagram.ui.tools.internal.actions.pinning.PinElementsEclipseAction; @@ -55,10 +55,10 @@ public class SiriusContributionItemProvider extends AbstractContributionItemProv result = new PinElementsEclipseAction(); } else if (ActionIds.UNPIN_ELEMENTS.equals(actionId)) { result = new UnpinElementsEclipseAction(); - } else if (ActionIds.ARRANGE_BORDERED_NODES.equals(actionId)) { - result = ArrangeBorderedNodesAction.createArrangeBorderedNodesAction(workbenchPage); - } else if (ActionIds.ARRANGE_BORDERED_NODES_TOOLBAR.equals(actionId)) { - result = ArrangeBorderedNodesAction.createToolBarArrangeBorderedNodesAction(workbenchPage); + } else if (ActionIds.ARRANGE_BORDER_NODES.equals(actionId)) { + result = ArrangeBorderNodesAction.createArrangeBorderNodesAction(workbenchPage); + } else if (ActionIds.ARRANGE_BORDER_NODES_TOOLBAR.equals(actionId)) { + result = ArrangeBorderNodesAction.createToolBarArrangeBorderNodesAction(workbenchPage); } else if (ActionIds.COPY_TO_IMAGE.equals(actionId)) { result = new SaveAsImageFileAction(); } else if (ActionIds.SELECT_HIDDEN_ELEMENTS.equals(actionId)) { diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/ui/actions/ActionIds.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/ui/actions/ActionIds.java index 1529ee694a..f431939580 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/ui/actions/ActionIds.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/ui/actions/ActionIds.java @@ -38,11 +38,28 @@ public interface ActionIds { /** Action id for unpin elements action. */ String UNPIN_ELEMENTS = "unpinElementsAction"; //$NON-NLS-1$ - /** Action id for arrange bordered nodes action. */ - String ARRANGE_BORDERED_NODES = "arrangeBorderedNodesAction"; //$NON-NLS-1$ - - /** Action id for arrange bordered nodes action. */ - String ARRANGE_BORDERED_NODES_TOOLBAR = "arrangeBorderedNodesActionToolBar"; //$NON-NLS-1$ + /** Action id for arrange border nodes action. */ + String ARRANGE_BORDER_NODES = "arrangeBorderNodesAction"; //$NON-NLS-1$ + + /** Action id for arrange border nodes action. */ + String ARRANGE_BORDER_NODES_TOOLBAR = "arrangeBorderNodesActionToolBar"; //$NON-NLS-1$ + + /** + * Action id for arrange border nodes action. + * + * @deprecated use {@link ActionIds#ARRANGE_BORDER_NODES} instead + */ + @Deprecated + String ARRANGE_BORDERED_NODES = "arrangeBorderNodesAction"; + // $NON-NLS-1$ + + /** + * Action id for arrange bordered nodes action. + * + * @deprecated use {@link ActionIds#ARRANGE_BORDER_NODES_TOOLBAR} instead + */ + @Deprecated + String ARRANGE_BORDERED_NODES_TOOLBAR = "arrangeBorderNodesActionToolBar"; //$NON-NLS-1$ /** Action for copy (export) to an image action. */ String COPY_TO_IMAGE = "newCopyToImageAction"; //$NON-NLS-1$ diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/actions/layout/ArrangeBorderedNodesAction.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/actions/layout/ArrangeBorderNodesAction.java index dc31836d68..0ac21c89fe 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/actions/layout/ArrangeBorderedNodesAction.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/actions/layout/ArrangeBorderNodesAction.java @@ -32,11 +32,11 @@ import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPart; /** - * Action that arranges all bordered nodes of a diagram. + * Action that arranges all border nodes of a diagram. * * @author <a href="mailto:laurent.redor@obeo.fr">Laurent Redor</a> */ -public class ArrangeBorderedNodesAction extends AbstractDiagramAction { +public class ArrangeBorderNodesAction extends AbstractDiagramAction { /** * Constructs a new diagram action. @@ -44,20 +44,20 @@ public class ArrangeBorderedNodesAction extends AbstractDiagramAction { * @param workbenchPage * The workbench page associated with this action */ - protected ArrangeBorderedNodesAction(final IWorkbenchPage workbenchPage) { + protected ArrangeBorderNodesAction(final IWorkbenchPage workbenchPage) { super(workbenchPage); } /** * This constructor is provided just in case a derived class needs to - * support both the construction of a diagram action with a workbenchpart. + * support both the construction of a diagram action with a workbench part. * Typically this is only when the diagram declares its own action in - * additional to the one registered with the action serivce. + * additional to the one registered with the action service. * * @param workbenchpart * The workbench part associated with this action */ - protected ArrangeBorderedNodesAction(final IWorkbenchPart workbenchpart) { + protected ArrangeBorderNodesAction(final IWorkbenchPart workbenchpart) { super(workbenchpart); } @@ -72,48 +72,25 @@ public class ArrangeBorderedNodesAction extends AbstractDiagramAction { protected void initAction(final String id, final String text) { setId(id); setText(text); - setToolTipText("Arrange all the linked bordered nodes of the diagram."); - + setToolTipText("Arrange all the linked border nodes of the diagram."); setImageDescriptor(DiagramUIPlugin.Implementation.getBundledImageDescriptor(DiagramImagesPath.ARRANGE_BORDERED_NODES_ICON)); - // setDisabledImageDescriptor(DiagramUIActionsPluginImages.DESC_ARRANGE_ALL_DISABLED); - // setHoverImageDescriptor(DiagramUIActionsPluginImages.DESC_ARRANGE_ALL); } - /** - * {@inheritDoc} - * - * @see org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction#createTargetRequest() - */ @Override protected Request createTargetRequest() { return null; } - /** - * {@inheritDoc} - * - * @see org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction#isSelectionListener() - */ @Override protected boolean isSelectionListener() { return true; } - /** - * {@inheritDoc} - * - * @see org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction#doRun(org.eclipse.core.runtime.IProgressMonitor) - */ @Override protected void doRun(final IProgressMonitor progressMonitor) { super.doRun(progressMonitor); } - /** - * {@inheritDoc} - * - * @see org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction#calculateEnabled() - */ @Override protected boolean calculateEnabled() { // Do not call super.calculateEnabled(), it would break client that use @@ -126,11 +103,6 @@ public class ArrangeBorderedNodesAction extends AbstractDiagramAction { return getSelectedObjects().size() > 0 && super.canEditInstance(); } - /** - * {@inheritDoc} - * - * @see org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction#getCommand() - */ @Override protected Command getCommand() { Command command = UnexecutableCommand.INSTANCE; @@ -149,39 +121,34 @@ public class ArrangeBorderedNodesAction extends AbstractDiagramAction { return command; } - /** - * {@inheritDoc} - * - * @see org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction#getCommandLabel() - */ @Override protected String getCommandLabel() { - return "Arrange Linked Bordered Nodes "; + return "Arrange Linked Border Nodes "; } /** - * Creates the Arrange Bordered Nodes action. + * Creates the Arrange Border Nodes action. * * @param workbenchPage * The workbench page associated with this action - * @return A new arrange bordered nodes action + * @return A new arrange border nodes action */ - public static ArrangeBorderedNodesAction createArrangeBorderedNodesAction(final IWorkbenchPage workbenchPage) { - final ArrangeBorderedNodesAction action = new ArrangeBorderedNodesAction(workbenchPage); - action.initAction(ActionIds.ARRANGE_BORDERED_NODES, "Linked Bordered Nodes"); + public static ArrangeBorderNodesAction createArrangeBorderNodesAction(final IWorkbenchPage workbenchPage) { + final ArrangeBorderNodesAction action = new ArrangeBorderNodesAction(workbenchPage); + action.initAction(ActionIds.ARRANGE_BORDER_NODES, "Linked Border Nodes"); return action; } /** - * Creates the Arrange Bordered Nodes action for the toolbar menu. + * Creates the Arrange Border Nodes action for the toolbar menu. * * @param workbenchPage * The workbench page associated with this action - * @return A new arrange bordered nodes action + * @return A new arrange border nodes action */ - public static ArrangeBorderedNodesAction createToolBarArrangeBorderedNodesAction(final IWorkbenchPage workbenchPage) { - final ArrangeBorderedNodesAction action = new ArrangeBorderedNodesAction(workbenchPage); - action.initAction(ActionIds.ARRANGE_BORDERED_NODES_TOOLBAR, "Arrange Linked Bordered Nodes"); + public static ArrangeBorderNodesAction createToolBarArrangeBorderNodesAction(final IWorkbenchPage workbenchPage) { + final ArrangeBorderNodesAction action = new ArrangeBorderNodesAction(workbenchPage); + action.initAction(ActionIds.ARRANGE_BORDER_NODES_TOOLBAR, "Arrange Linked Border Nodes"); return action; } diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/editor/tabbar/actions/TabbarArrangeMenuManager.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/editor/tabbar/actions/TabbarArrangeMenuManager.java index 128b2e4f23..c3212e4e28 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/editor/tabbar/actions/TabbarArrangeMenuManager.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/editor/tabbar/actions/TabbarArrangeMenuManager.java @@ -30,7 +30,7 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.sirius.common.ui.tools.api.util.EclipseUIUtil; import org.eclipse.sirius.diagram.ui.internal.edit.parts.DDiagramEditPart; -import org.eclipse.sirius.diagram.ui.tools.internal.actions.layout.ArrangeBorderedNodesAction; +import org.eclipse.sirius.diagram.ui.tools.internal.actions.layout.ArrangeBorderNodesAction; import org.eclipse.sirius.diagram.ui.tools.internal.layout.provider.ArrangeAllOnlyLayoutProvider; import org.eclipse.sirius.diagram.ui.tools.internal.layout.provider.LayoutService; import org.eclipse.ui.ISelectionListener; @@ -174,15 +174,15 @@ public class TabbarArrangeMenuManager extends ArrangeMenuManager implements ISel setDefaultAction(toolbarArrangeSelectionAction.getId()); } } else { - if (!isArrangeAllAndBorderedNodes()) { + if (!isArrangeAllAndBorderNodes()) { // change to Arrange All / Arrange Bordered Nodes removeArrangeActions(); ArrangeAction toolbarArrangeAllAction = ArrangeAction.createToolbarArrangeAllAction(page); add(toolbarArrangeAllAction); - ArrangeBorderedNodesAction toolBarArrangeBorderedNodesAction = ArrangeBorderedNodesAction.createToolBarArrangeBorderedNodesAction(page); - add(toolBarArrangeBorderedNodesAction); + ArrangeBorderNodesAction toolBarArrangeBorderNodesAction = ArrangeBorderNodesAction.createToolBarArrangeBorderNodesAction(page); + add(toolBarArrangeBorderNodesAction); setDefaultAction(toolbarArrangeAllAction.getId()); } @@ -214,12 +214,12 @@ public class TabbarArrangeMenuManager extends ArrangeMenuManager implements ISel /** * Remove all "Arrange" actions: - Arrange Selection - Arrange All - Arrange - * Linked Bordered Nodes + * Linked Border Nodes */ private void removeArrangeActions() { remove(ActionIds.ACTION_TOOLBAR_ARRANGE_SELECTION); remove(ActionIds.ACTION_TOOLBAR_ARRANGE_ALL); - remove(org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDERED_NODES_TOOLBAR); + remove(org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDER_NODES_TOOLBAR); } /** @@ -238,8 +238,8 @@ public class TabbarArrangeMenuManager extends ArrangeMenuManager implements ISel * @return true id there are only two arrange actions when the diagram is * selected */ - private boolean isArrangeAllAndBorderedNodes() { - return find(ActionIds.ACTION_TOOLBAR_ARRANGE_ALL) != null && find(org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDERED_NODES_TOOLBAR) != null; + private boolean isArrangeAllAndBorderNodes() { + return find(ActionIds.ACTION_TOOLBAR_ARRANGE_ALL) != null && find(org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDER_NODES_TOOLBAR) != null; } /** diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/menu/DiagramEditorContextMenuProvider.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/menu/DiagramEditorContextMenuProvider.java index 875870f0a9..b62715c8fa 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/menu/DiagramEditorContextMenuProvider.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/menu/DiagramEditorContextMenuProvider.java @@ -103,6 +103,7 @@ public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider try { TransactionUtil.getEditingDomain((EObject) getViewer().getContents().getModel()).runExclusive(new Runnable() { + @Override public void run() { ContributionItemService.getInstance().contributeToPopupMenu(DiagramEditorContextMenuProvider.this, part); menu.remove(ActionIds.ACTION_DELETE_FROM_MODEL); @@ -126,10 +127,10 @@ public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider manager.remove(GlobalActionId.PASTE); } - // Add the arrangeBorderedNodesActionToolBar just after the + // Add the arrangeBorderNodesActionToolBar just after the // toolbarArrangeAllAction (Arrange All action of GMF) // This is needed just in case of diagram selection. - final IContributionItem item1 = menu.find(org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDERED_NODES); + final IContributionItem item1 = menu.find(org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDER_NODES); if (item1 != null) { menu.remove(item1); final IMenuManager arrangeMenu = menu.findMenuUsingPath(org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.MENU_ARRANGE); diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html index db211b982f..fede180912 100644 --- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html +++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html @@ -72,6 +72,7 @@ <a href="./user/sequences/Sequence%20Diagrams.html#introduction">documentation</a> for details. Previously, the user has to explicitely disable the snap features. </li> <li><span class="label label-info">Modified</span> The Link with Editor behavior has changed. The link with editor was previously unidirectional from the Common Navigator (Model Explorer view or Project view) toward the active representation. By now, when selecting one or several elements in the representation, the corresponding semantic elements are selected in the Common Navigator.</li> + <li><span class="label label-info">Modified</span> The «Arrange Linked Bordered Nodes» tabbar action has been renamed to «Arrange Linked Border Nodes» as it is border nodes which are layouted and not bordered nodes.</li> </ul> <h3 id="SpecifierVisibleChanges">Specifier-Visible Changes</h3> <ul> @@ -317,6 +318,22 @@ <code>org.eclipse.sirius.diagram.ui.tools.api.figure.ViewNodeContainerRectangleFigureDesc</code> as it was generated by GMF tooling and never used in Sirius whose edit parts and edit policies expect <code>org.eclipse.draw2d.IFigure.useLocalCoordinates()</code> to always return false for its figures. </li> + <li><span class="label label-warning">Deprecated</span> + <code>org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDERED_NODES</code> deprecated in favor + <code>org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDER_NODES</code> as it is an action id about border nodes layout. + </li> + <li><span class="label label-warning">Deprecated</span> + <code>org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDERED_NODES_TOOLBAR</code> deprecated in favor + <code>org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDER_NODES_TOOLBAR</code> as it is an action id about border nodes layout. + </li> + <li><span class="label label-success">Added</span> + <code>org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDER_NODES</code> added to replace + <code>org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDERED_NODES_TOOLBAR</code> which is deprecated + </li> + <li><span class="label label-success">Added</span> + <code>org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDER_NODES_TOOLBAR</code> added to replace + <code>org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDERED_NODES</code> which is deprecated + </li> </ul> <h4 id="Changesinorg.eclipse.sirius.tests.support">Changes in <code>org.eclipse.sirius.tests.support</code> diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile index 20f23afdaf..373336882e 100644 --- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile +++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile @@ -11,6 +11,7 @@ h3. User-Visible Changes * <span class="label label-success">Added</span> A new feature allows to snap to all shapes (instead of just to snap to brother shapes). The <kdb>F4</kdb> shortcut key activates this mode when you resize a node, move a node or move a bendpoint of edge, see "documentation":./user/diagrams/Diagrams.html#snap_to_shapes for details. * <span class="label label-info">Modified</span> The _Snap to Grid_ and _Snap to Shapes_ are now automatically disabled on Sequence diagrams. As indicated in the user documentation, to work correctly, Sirius sequence diagrams must have a tight control on where the graphical elements are placed on the diagram and on their synchronization with the underlying semantic model. see "documentation":./user/sequences/Sequence%20Diagrams.html#introduction for details. Previously, the user has to explicitely disable the snap features. * <span class="label label-info">Modified</span> The Link with Editor behavior has changed. The link with editor was previously unidirectional from the Common Navigator (Model Explorer view or Project view) toward the active representation. By now, when selecting one or several elements in the representation, the corresponding semantic elements are selected in the Common Navigator. +* <span class="label label-info">Modified</span> The "Arrange Linked Bordered Nodes" tabbar action has been renamed to "Arrange Linked Border Nodes" as it is border nodes which are layouted and not bordered nodes. h3. Specifier-Visible Changes @@ -81,6 +82,10 @@ h4. Changes in @org.eclipse.sirius.ui@ h4. Changes in @org.eclipse.sirius.diagram.ui@ * <span class="label label-danger">Removed</span> The method @setUseLocalCoordinates(boolean)@ has been removed from @org.eclipse.sirius.diagram.ui.tools.api.figure.GradientRoundedRectangle@, @org.eclipse.sirius.diagram.ui.tools.api.figure.ViewNodeContainerParallelogram@, @org.eclipse.sirius.diagram.ui.tools.api.figure.ViewNodeContainerRectangleFigureDesc@ as it was generated by GMF tooling and never used in Sirius whose edit parts and edit policies expect @org.eclipse.draw2d.IFigure.useLocalCoordinates()@ to always return false for its figures. +* <span class="label label-warning">Deprecated</span> @org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDERED_NODES@ deprecated in favor @org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDER_NODES@ as it is an action id about border nodes layout. +* <span class="label label-warning">Deprecated</span> @org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDERED_NODES_TOOLBAR@ deprecated in favor @org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDER_NODES_TOOLBAR@ as it is an action id about border nodes layout. +* <span class="label label-success">Added</span> @org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDER_NODES@ added to replace @org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDERED_NODES_TOOLBAR@ which is deprecated +* <span class="label label-success">Added</span> @org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDER_NODES_TOOLBAR@ added to replace @org.eclipse.sirius.diagram.ui.tools.api.ui.actions.ActionIds.ARRANGE_BORDERED_NODES@ which is deprecated h4. Changes in @org.eclipse.sirius.tests.support@ diff --git a/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.html b/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.html index 9a58eae756..3453df5402 100644 --- a/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.html +++ b/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.html @@ -988,7 +988,7 @@ <strong>not</strong> be moved by the algorithm. </li> <li> - <em>Arrange Linked Bordered Nodes</em> This special action will only concerns nodes which are on the border of another element and which are either the source or the target of at least one edge. When invoked, the action will try to move these bordered nodes on the border of their parent on the most «natural» side of their parent element depending on the direction of the edge. For example if a bordered node is on the top side of an element but has an edge which does down to a target element below its parent, this action will move the bordered node to the bottom side so that the edge does not cross the parent element. + <em>Arrange Linked Border Nodes</em> This special action will only concerns nodes which are on the border of another element and which are either the source or the target of at least one edge. When invoked, the action will try to move these bordered nodes on the border of their parent on the most «natural» side of their parent element depending on the direction of the edge. For example if a border node is on the top side of an element but has an edge which goes down to a target element below its parent, this action will move the border node to the bottom side so that the edge does not cross the parent element. </li> </ul> <p> diff --git a/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.textile b/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.textile index 17648bd4c9..a387fe5fd6 100644 --- a/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.textile +++ b/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.textile @@ -657,7 +657,7 @@ When the diagram itself (and not a specific element) is selected, the tab-bar co !images/tabbar_automatic_layout_tools.png! _Automatic Layout Tools_. The first group of tools are used to trigger an automatic layout of the elements on the diagram. Automatic layout uses a generic algorithm which tries to arrange the position and sizes of the elements on the diagram in a nice, readable way. In particular it makes sure, unless specific constraints pervent it, that no elements overlap each other, and that elements which contain others (i.e. containers) are large enough to show all their contents. It also tries to minimize the crossing of edges. The two ways to invoke the automatic layout algorithms are available as a drop-down menu on the left-most icon in the tab-bar. * _Arrange All_. This is the action available by default. It launches the layout algorithm on all the elements in the diagram. Note that elements which have been _pinned_ to their position will *not* be moved by the algorithm. -* _Arrange Linked Bordered Nodes_ This special action will only concerns nodes which are on the border of another element and which are either the source or the target of at least one edge. When invoked, the action will try to move these bordered nodes on the border of their parent on the most "natural" side of their parent element depending on the direction of the edge. For example if a bordered node is on the top side of an element but has an edge which does down to a target element below its parent, this action will move the bordered node to the bottom side so that the edge does not cross the parent element. +* _Arrange Linked Border Nodes_ This special action will only concerns nodes which are on the border of another element and which are either the source or the target of at least one edge. When invoked, the action will try to move these bordered nodes on the border of their parent on the most "natural" side of their parent element depending on the direction of the edge. For example if a border node is on the top side of an element but has an edge which goes down to a target element below its parent, this action will move the border node to the bottom side so that the edge does not cross the parent element. !images/tabbar_selection_tools.png! _Selection Tools_. The next group of tab-bar tools, also organized in a drop-down menu, can be used to select groups of diagram elements in a single operation. * _Select All_. This is the default operation and will select all the elements visible on the diagram. It is also available via the _Ctrl+A_ keyboard shortcut. diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest.java index 509512fb72..b5c988d24f 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest.java @@ -53,8 +53,6 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest extends A private static final String REPRESENTATION_NAME_ENTITIES2 = "Entities2"; - private static final String VIEWPOINT_NAME = "Test case for ticket #1957"; - private static final String MODEL = "APP_TEMOIN.ecore"; private static final String SESSION_FILE = "APP_TEMOIN.aird"; @@ -76,23 +74,17 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest extends A */ protected SWTBotSiriusDiagramEditor editor; - /** - * {@inheritDoc} - */ @Override protected void onSetUpBeforeClosingWelcomePage() throws Exception { copyFileToTestProject(Activator.PLUGIN_ID, DATA_UNIT_DIR, MODEL, SESSION_FILE, VSM_FILE); } - /** - * {@inheritDoc} - */ @Override protected void onSetUpAfterOpeningDesignerPerspective() throws Exception { sessionAirdResource = new UIResource(designerProject, FILE_DIR, SESSION_FILE); localSession = designerPerspective.openSessionFromFile(sessionAirdResource); - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_ENTITIES2, REPRESENTATION_INSTANCE_NAME_ENTITIES2, DDiagram.class); + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_ENTITIES2, REPRESENTATION_INSTANCE_NAME_ENTITIES2, DDiagram.class); bot.viewById("org.eclipse.ui.views.ContentOutline").close(); SWTBotUtils.waitAllUiEvents(); } @@ -110,8 +102,8 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest extends A * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase1() throws Exception { - // activate the "Arrange Linked Bordered Nodes" action + public void testArrangeLinkedBorderNodesCase1() throws Exception { + // activate the "Arrange Linked Border Nodes" action editor.clickContextMenu("Arrange All"); validatePositions(); @@ -123,9 +115,9 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest extends A * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase1Zoom200() throws Exception { + public void testArrangeLinkedBorderNodesCase1Zoom200() throws Exception { editor.zoom(ZoomLevel.ZOOM_200); - // activate the "Arrange Linked Bordered Nodes" action + // activate the "Arrange Linked Border Nodes" action editor.clickContextMenu("Arrange All"); validatePositions(); editor.zoom(ZoomLevel.ZOOM_100); @@ -137,9 +129,9 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest extends A * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase1Zoom50() throws Exception { + public void testArrangeLinkedBorderNodesCase1Zoom50() throws Exception { editor.zoom(ZoomLevel.ZOOM_50); - // activate the "Arrange Linked Bordered Nodes" action + // activate the "Arrange Linked Border Nodes" action editor.clickContextMenu("Arrange All"); validatePositions(); editor.zoom(ZoomLevel.ZOOM_100); @@ -152,15 +144,15 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest extends A * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase1Pinned() throws Exception { + public void testArrangeLinkedBorderNodesCase1Pinned() throws Exception { // Select another diagram - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_ENTITIES2, REPRESENTATION_INSTANCE_NAME_ENTITIES_PINNED, DDiagram.class); + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_ENTITIES2, REPRESENTATION_INSTANCE_NAME_ENTITIES_PINNED, DDiagram.class); // validate position before Arrange validatePositions(false); editor.clickContextMenu("Arrange All"); // validate position after Arrange validatePositions(false); - // activate the "Arrange Linked Bordered Nodes" action + // activate the "Arrange Linked Border Nodes" action // editor.clickContextMenu("Arrange All"); } @@ -170,11 +162,11 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest extends A * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase2() throws Exception { + public void testArrangeLinkedBorderNodesCase2() throws Exception { // Select another diagram - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_ENTITIES, REPRESENTATION_INSTANCE_NAME_ENTITIES, DDiagram.class); + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_ENTITIES, REPRESENTATION_INSTANCE_NAME_ENTITIES, DDiagram.class); - // activate the "Arrange Linked Bordered Nodes" action + // activate the "Arrange Linked Border Nodes" action editor.clickContextMenu("Arrange All"); validatePositions(); @@ -342,7 +334,8 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest extends A // boolean validatePositionOfPortOnContainer = // validatePositionOfPortOnContainer(containerEP, portEP, position); // - // assertTrue("The port "+portName+" is not in the expected position relatively to the container "+containerName, + // assertTrue("The port "+portName+" is not in the expected position + // relatively to the container "+containerName, // validatePositionOfPortOnContainer); } @@ -445,7 +438,7 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest extends A ArrayList<AbstractDiagramEdgeEditPart> linkedPorts = new ArrayList<AbstractDiagramEdgeEditPart>(); Iterator<?> targetIterator = portEP.getTargetConnections().iterator(); while (targetIterator.hasNext()) { - Object object = (Object) targetIterator.next(); + Object object = targetIterator.next(); if (object instanceof AbstractDiagramEdgeEditPart) { AbstractDiagramEdgeEditPart edgeEP = (AbstractDiagramEdgeEditPart) object; linkedPorts.add(edgeEP); @@ -454,7 +447,7 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest extends A Iterator<?> sourceIterator = portEP.getSourceConnections().iterator(); while (sourceIterator.hasNext()) { - Object object = (Object) sourceIterator.next(); + Object object = sourceIterator.next(); if (object instanceof AbstractDiagramEdgeEditPart) { AbstractDiagramEdgeEditPart edgeEP = (AbstractDiagramEdgeEditPart) object; linkedPorts.add(edgeEP); @@ -490,7 +483,7 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest extends A private AbstractDiagramBorderNodeEditPart findPortInContainer(AbstractBorderedShapeEditPart containerEP, String portName) { Iterator<?> iterator = containerEP.getChildren().iterator(); while (iterator.hasNext()) { - Object object = (Object) iterator.next(); + Object object = iterator.next(); if (object instanceof AbstractDiagramBorderNodeEditPart) { AbstractDiagramBorderNodeEditPart portEP = (AbstractDiagramBorderNodeEditPart) object; Object portModel = portEP.getModel(); @@ -501,7 +494,7 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityAppTemoinTest extends A DDiagramElement portDDiagramElement = (DDiagramElement) portElement; Iterator<EObject> semanticElementsIterator = portDDiagramElement.getSemanticElements().iterator(); while (semanticElementsIterator.hasNext()) { - EObject eObject = (EObject) semanticElementsIterator.next(); + EObject eObject = semanticElementsIterator.next(); if (eObject instanceof ENamedElement) { ENamedElement ref = (ENamedElement) eObject; if (ref.getName().equals(portName)) { diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ArrangeAllLinkedBorderedNodesLayoutStabilityTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ArrangeAllLinkedBorderedNodesLayoutStabilityTest.java index b9ca71d754..3e3737299c 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ArrangeAllLinkedBorderedNodesLayoutStabilityTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ArrangeAllLinkedBorderedNodesLayoutStabilityTest.java @@ -101,9 +101,6 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr */ protected SWTBotSiriusDiagramEditor editor; - /** - * {@inheritDoc} - */ @Override protected void onSetUpBeforeClosingWelcomePage() throws Exception { // Disable refresh on opening @@ -113,12 +110,9 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr } private void arrangeLinkedBorderedNodes() { - editor.clickContextMenu("Linked Bordered Nodes"); + editor.clickContextMenu("Linked Border Nodes"); } - /** - * {@inheritDoc} - */ @Override protected void onSetUpAfterOpeningDesignerPerspective() throws Exception { sessionAirdResource = new UIResource(designerProject, FILE_DIR, SESSION_FILE); @@ -132,9 +126,9 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase1() throws Exception { - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_UC1, REPRESENTATION_INSTANCE_NAME_UC1, DDiagram.class); - // activate the "Arrange Linked Bordered Nodes" action + public void testArrangeLinkedBorderNodesCase1() throws Exception { + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_UC1, REPRESENTATION_INSTANCE_NAME_UC1, DDiagram.class); + // activate the "Arrange Linked Border Nodes" action editor.clickContextMenu("Arrange All"); // Validate the positions of the bordered nodes. // We don't check the edges crossing because the label on the border @@ -149,11 +143,11 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase2() throws Exception { - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC2, DDiagram.class); - // activate the "Arrange Linked Bordered Nodes" action + public void testArrangeLinkedBorderNodesCase2() throws Exception { + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC2, DDiagram.class); + // activate the "Arrange Linked Border Nodes" action editor.clickContextMenu("Arrange All"); - // Validate the positions of the bordered nodes. + // Validate the positions of the border nodes. validatePositions(false); } @@ -163,11 +157,11 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase3() throws Exception { - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_UC3, REPRESENTATION_INSTANCE_NAME_UC3, DDiagram.class); - // activate the "Arrange Linked Bordered Nodes" action + public void testArrangeLinkedBorderNodesCase3() throws Exception { + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_UC3, REPRESENTATION_INSTANCE_NAME_UC3, DDiagram.class); + // activate the "Arrange Linked Border Nodes" action editor.clickContextMenu("Arrange All"); - // Validate the positions of the bordered nodes. + // Validate the positions of the border nodes. validatePositions(true); } @@ -186,11 +180,11 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr * @throws Exception * Test error. */ - public void failedTestArrangeLinkedBorderedNodesCase4() throws Exception { - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_UC4, REPRESENTATION_INSTANCE_NAME_UC4, DDiagram.class); - // activate the "Arrange Linked Bordered Nodes" action + public void failedTestArrangeLinkedBorderNodesCase4() throws Exception { + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_UC4, REPRESENTATION_INSTANCE_NAME_UC4, DDiagram.class); + // activate the "Arrange Linked Border Nodes" action editor.clickContextMenu("Arrange All"); - // Validate the positions of the bordered nodes. + // Validate the positions of the border nodes. validatePositions(true); } @@ -200,11 +194,11 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase5_1() throws Exception { - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_1, DDiagram.class); - // activate the "Arrange Linked Bordered Nodes" action + public void testArrangeLinkedBorderNodesCase5_1() throws Exception { + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_1, DDiagram.class); + // activate the "Arrange Linked Border Nodes" action arrangeLinkedBorderedNodes(); - // Validate the positions of the bordered nodes. + // Validate the positions of the border nodes. validatePositionsOfUseCase5(); } @@ -214,11 +208,11 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase5_2() throws Exception { - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_2, DDiagram.class); - // activate the "Arrange Linked Bordered Nodes" action + public void testArrangeLinkedBorderNodesCase5_2() throws Exception { + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_2, DDiagram.class); + // activate the "Arrange Linked Border Nodes" action arrangeLinkedBorderedNodes(); - // Validate the positions of the bordered nodes. + // Validate the positions of the border nodes. validatePositionsOfUseCase5(); } @@ -228,11 +222,11 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase5_3() throws Exception { - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_3, DDiagram.class); - // activate the "Arrange Linked Bordered Nodes" action + public void testArrangeLinkedBorderNodesCase5_3() throws Exception { + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_3, DDiagram.class); + // activate the "Arrange Linked Border Nodes" action arrangeLinkedBorderedNodes(); - // Validate the positions of the bordered nodes. + // Validate the positions of the border nodes. validatePositionsOfUseCase5(); } @@ -242,11 +236,11 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase5_4() throws Exception { - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_4, DDiagram.class); - // activate the "Arrange Linked Bordered Nodes" action + public void testArrangeLinkedBorderNodesCase5_4() throws Exception { + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_4, DDiagram.class); + // activate the "Arrange Linked Border Nodes" action arrangeLinkedBorderedNodes(); - // Validate the positions of the bordered nodes. + // Validate the positions of the border nodes. validatePositionsOfUseCase5(); } @@ -256,8 +250,8 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase5_5() throws Exception { - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_5, DDiagram.class); + public void testArrangeLinkedBorderNodesCase5_5() throws Exception { + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_5, DDiagram.class); arrangeLinkedBorderedNodes(); // Validate the positions of the bordered nodes. validatePositionsOfUseCase5(); @@ -269,11 +263,11 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase5_6() throws Exception { - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_6, DDiagram.class); - // activate the "Arrange Linked Bordered Nodes" action + public void testArrangeLinkedBorderNodesCase5_6() throws Exception { + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_6, DDiagram.class); + // activate the "Arrange Linked Border Nodes" action arrangeLinkedBorderedNodes(); - // Validate the positions of the bordered nodes. + // Validate the positions of the border nodes. validatePositionsOfUseCase5(); } @@ -283,11 +277,11 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase5_7() throws Exception { - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_7, DDiagram.class); - // activate the "Arrange Linked Bordered Nodes" action + public void testArrangeLinkedBorderNodesCase5_7() throws Exception { + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_7, DDiagram.class); + // activate the "Arrange Linked Border Nodes" action arrangeLinkedBorderedNodes(); - // Validate the positions of the bordered nodes. + // Validate the positions of the border nodes. validatePositionsOfUseCase5(); } @@ -297,11 +291,11 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase5_8() throws Exception { - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_8, DDiagram.class); - // activate the "Arrange Linked Bordered Nodes" action + public void testArrangeLinkedBorderNodesCase5_8() throws Exception { + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_UC2, REPRESENTATION_INSTANCE_NAME_UC5_8, DDiagram.class); + // activate the "Arrange Linked Border Nodes" action arrangeLinkedBorderedNodes(); - // Validate the positions of the bordered nodes. + // Validate the positions of the border nodes. validatePositionsOfUseCase5(); } @@ -311,11 +305,11 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr * @throws Exception * Test error. */ - public void testArrangeLinkedBorderedNodesCase6() throws Exception { - editor = openDiagram(localSession.getOpenedSession(), REPRESENTATION_NAME_UC3, REPRESENTATION_INSTANCE_NAME_UC6, DDiagram.class); - // activate the "Arrange Linked Bordered Nodes" action + public void testArrangeLinkedBorderNodesCase6() throws Exception { + editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME_UC3, REPRESENTATION_INSTANCE_NAME_UC6, DDiagram.class); + // activate the "Arrange Linked Border Nodes" action arrangeLinkedBorderedNodes(); - // Validate the positions of the bordered nodes. + // Validate the positions of the border nodes. validatePositions(true); } @@ -515,7 +509,8 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr // boolean validatePositionOfPortOnContainer = // validatePositionOfPortOnContainer(containerEP, portEP, position); // - // assertTrue("The port "+portName+" is not in the expected position relatively to the container "+containerName, + // assertTrue("The port "+portName+" is not in the expected position + // relatively to the container "+containerName, // validatePositionOfPortOnContainer); } @@ -617,7 +612,7 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr ArrayList<AbstractDiagramEdgeEditPart> linkedPorts = new ArrayList<AbstractDiagramEdgeEditPart>(); Iterator<?> targetIterator = portEP.getTargetConnections().iterator(); while (targetIterator.hasNext()) { - Object object = (Object) targetIterator.next(); + Object object = targetIterator.next(); if (object instanceof AbstractDiagramEdgeEditPart) { AbstractDiagramEdgeEditPart edgeEP = (AbstractDiagramEdgeEditPart) object; linkedPorts.add(edgeEP); @@ -626,7 +621,7 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr Iterator<?> sourceIterator = portEP.getSourceConnections().iterator(); while (sourceIterator.hasNext()) { - Object object = (Object) sourceIterator.next(); + Object object = sourceIterator.next(); if (object instanceof AbstractDiagramEdgeEditPart) { AbstractDiagramEdgeEditPart edgeEP = (AbstractDiagramEdgeEditPart) object; linkedPorts.add(edgeEP); @@ -662,7 +657,7 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr private AbstractDiagramBorderNodeEditPart findPortInContainer(AbstractBorderedShapeEditPart containerEP, String portName) { Iterator<?> iterator = containerEP.getChildren().iterator(); while (iterator.hasNext()) { - Object object = (Object) iterator.next(); + Object object = iterator.next(); if (object instanceof AbstractDiagramBorderNodeEditPart) { AbstractDiagramBorderNodeEditPart portEP = (AbstractDiagramBorderNodeEditPart) object; Object portModel = portEP.getModel(); @@ -673,7 +668,7 @@ public class ArrangeAllLinkedBorderedNodesLayoutStabilityTest extends AbstractAr DDiagramElement portDDiagramElement = (DDiagramElement) portElement; Iterator<EObject> semanticElementsIterator = portDDiagramElement.getSemanticElements().iterator(); while (semanticElementsIterator.hasNext()) { - EObject eObject = (EObject) semanticElementsIterator.next(); + EObject eObject = semanticElementsIterator.next(); if (eObject instanceof ENamedElement) { ENamedElement ref = (ENamedElement) eObject; if (ref.getName().equals(portName)) { diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/SequenceArrangeLinkedBorderedNodesTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/SequenceArrangeLinkedBorderedNodesTest.java index 2b4164cb97..4b07f20d87 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/SequenceArrangeLinkedBorderedNodesTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/SequenceArrangeLinkedBorderedNodesTest.java @@ -17,7 +17,7 @@ import org.eclipse.swtbot.swt.finder.waits.Conditions; import org.eclipse.swtbot.swt.finder.widgets.TimeoutException; /** - * Test class to validate "Arrange Linked Bordered Nodes" does not throw NPE + * Test class to validate "Arrange Linked Border Nodes" does not throw NPE * anymore. Validate ticket #2232 * * @author smonnier @@ -25,8 +25,8 @@ import org.eclipse.swtbot.swt.finder.widgets.TimeoutException; public class SequenceArrangeLinkedBorderedNodesTest extends AbstractDefaultModelSequenceTests { /** - * Test method to validate "Arrange Linked Bordered Nodes" does not throw - * NPE anymore. Validate ticket #2232 + * Test method to validate "Arrange Linked Border Nodes" does not throw NPE + * anymore. Validate ticket #2232 * * @throws Exception * Test error. @@ -54,14 +54,14 @@ public class SequenceArrangeLinkedBorderedNodesTest extends AbstractDefaultModel // Creation of an async call createMessage(InteractionsConstants.SYNC_CALL_TOOL_ID, lifelineBPosition, 230, lifelineCPosition, 230); - editor.clickContextMenu("Linked Bordered Nodes"); + editor.clickContextMenu("Linked Border Nodes"); final long oldTimeout = SWTBotPreferences.TIMEOUT; try { // Depending on the configuration, a pop up appear when // "Arrange Linked Bordered Nodes" fail SWTBotPreferences.TIMEOUT = 1000; - bot.waitUntil(Conditions.shellIsActive("Linked Bordered Nodes")); - fail(TimeoutException.class + " expected for shell \"Linked Bordered Nodes\""); + bot.waitUntil(Conditions.shellIsActive("Linked Border Nodes")); + fail(TimeoutException.class + " expected for shell \"Linked Border Nodes\""); } catch (final TimeoutException e) { // Expected, the shell must not be found } finally { diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/tabbar/LockedTabBarTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/tabbar/LockedTabBarTest.java index e91f019c86..6c7c158827 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/tabbar/LockedTabBarTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/tabbar/LockedTabBarTest.java @@ -77,7 +77,7 @@ public class LockedTabBarTest extends AbstractSiriusSwtBotGefTestCase { private static final String ARRANGE_SELECTION = "Arrange Selection"; - private static final String ARRANGE_LINKED_BORDERED_NODES = "Arrange Linked Bordered Nodes"; + private static final String ARRANGE_LINKED_BORDER_NODES = "Arrange Linked Border Nodes"; private static final String PIN_SELECTION = "Pin selected elements"; @@ -226,7 +226,7 @@ public class LockedTabBarTest extends AbstractSiriusSwtBotGefTestCase { // "Arrange All" drop down button SWTBotToolbarDropDownButton arrangeAllMenu = bot.toolbarDropDownButtonWithTooltip(ARRANGE_ALL); - for (SWTBotMenu item : arrangeAllMenu.menuItems(new AllItemsExcept(ARRANGE_LINKED_BORDERED_NODES))) { + for (SWTBotMenu item : arrangeAllMenu.menuItems(new AllItemsExcept(ARRANGE_LINKED_BORDER_NODES))) { assertEnabled(item, enabled); } arrangeAllMenu.pressShortcut(Keystrokes.ESC); |
