Skip to content

Commit

Permalink
1544 show flow or mode elements (#2211)
Browse files Browse the repository at this point in the history
Closes #1544. Add ability to show flow or mode elements.
  • Loading branch information
RyanMcilnay committed Feb 27, 2020
1 parent cbd653a commit 39018d7
Show file tree
Hide file tree
Showing 13 changed files with 899 additions and 95 deletions.
56 changes: 28 additions & 28 deletions analyses/org.osate.analysis.binpacking/plugin.xml
@@ -1,29 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2004-2020 Carnegie Mellon University and others. (see Contributors file).
All Rights Reserved.
NO WARRANTY. ALL MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE
OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT
MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT.
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0
which is available at https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Created, in part, with funding and support from the United States Government. (see Acknowledgments file).
This program includes and/or can make use of certain third party source code, object code, documentation and other
files ("Third Party Software"). The Third Party Software that is used by this program is dependent upon your system
configuration. By using this program, You agree to comply with any and all relevant Third Party Software terms and
conditions contained in any such Third Party Software or separate license file distributed with such Third Party
Software. The parties who own the Third Party Software ("Third Party Licensors") are intended third party benefici-
aries to this license with respect to the terms applicable to their Third Party Software. Third Party Software li-
censes only apply to the Third Party Software and not any other portion of this program or this program as a whole.
-->
<?eclipse version="3.0"?>
<plugin>


</plugin>
<!--
Copyright (c) 2004-2020 Carnegie Mellon University and others. (see Contributors file).
All Rights Reserved.
NO WARRANTY. ALL MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE
OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT
MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT.
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0
which is available at https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Created, in part, with funding and support from the United States Government. (see Acknowledgments file).
This program includes and/or can make use of certain third party source code, object code, documentation and other
files ("Third Party Software"). The Third Party Software that is used by this program is dependent upon your system
configuration. By using this program, You agree to comply with any and all relevant Third Party Software terms and
conditions contained in any such Third Party Software or separate license file distributed with such Third Party
Software. The parties who own the Third Party Software ("Third Party Licensors") are intended third party benefici-
aries to this license with respect to the terms applicable to their Third Party Software. Third Party Software li-
censes only apply to the Third Party Software and not any other portion of this program or this program as a whole.
-->
<?eclipse version="3.0"?>
<plugin>


</plugin>
21 changes: 15 additions & 6 deletions ge/org.osate.ge.doc/docs-gen/user_guide.html
Expand Up @@ -96,8 +96,11 @@ <h1 class="title">OSATE Graphical Editor User Guide</h1>
<li><a href="#sec:hidden_children"><span class="toc-section-number">8.3</span> Hidden Children</a></li>
<li><a href="#sec:abstracted_connections"><span class="toc-section-number">8.4</span> Abstracted Connections</a></li>
<li><a href="#highlighting-flow-implementations-and-end-to-end-flow-specifications"><span class="toc-section-number">8.5</span> Highlighting Flow Implementations and End-to-End Flow Specifications</a></li>
<li><a href="#moving-shapes-using-arrow-keys"><span class="toc-section-number">8.6</span> Moving Shapes Using Arrow Keys</a></li>
<li><a href="#sec:restore_missing_diagram_elements"><span class="toc-section-number">8.7</span> Restore Missing Diagram Elements</a></li>
<li><a href="#showing-flow-implementation-and-end-to-end-flow-specification-segments"><span class="toc-section-number">8.6</span> Showing Flow Implementation and End-to-End Flow Specification Segments</a></li>
<li><a href="#highlighting-in-mode-elements"><span class="toc-section-number">8.7</span> Highlighting In Mode Elements</a></li>
<li><a href="#showing-in-mode-elements"><span class="toc-section-number">8.8</span> Showing In Mode Elements</a></li>
<li><a href="#moving-shapes-using-arrow-keys"><span class="toc-section-number">8.9</span> Moving Shapes Using Arrow Keys</a></li>
<li><a href="#sec:restore_missing_diagram_elements"><span class="toc-section-number">8.10</span> Restore Missing Diagram Elements</a></li>
</ul></li>
<li><a href="#navigating-between-diagrams"><span class="toc-section-number">9</span> Navigating Between Diagrams</a><ul>
<li><a href="#creating-a-new-diagram"><span class="toc-section-number">9.1</span> Creating a New Diagram</a></li>
Expand Down Expand Up @@ -795,15 +798,21 @@ <h2 id="sec:abstracted_connections"><span class="header-section-number">8.4</spa
<li>An AADL property reference value for which the referenced model element is hidden.</li>
</ul>
<h2 id="highlighting-flow-implementations-and-end-to-end-flow-specifications"><span class="header-section-number">8.5</span> Highlighting Flow Implementations and End-to-End Flow Specifications</h2>
<p>Selecting a flow implementation or end-to-end flow specification from the flow drop-down in the toolbar will highlight the flow. Flow Implementations and End To End Flows that have segments that are not shown in the diagram will be marked with an asterisk(*) in the drop-down.</p>
<h2 id="moving-shapes-using-arrow-keys"><span class="header-section-number">8.6</span> Moving Shapes Using Arrow Keys</h2>
<p>Selecting a Flow Implementation or End-to-End Flow specification from the flow drop-down in the toolbar will highlight the flow. Flow Implementations and End-to-End Flows that have no segments and missing segments are marked with an empty tag (E) or a partial tag (P), respectively.</p>
<h2 id="showing-flow-implementation-and-end-to-end-flow-specification-segments"><span class="header-section-number">8.6</span> Showing Flow Implementation and End-to-End Flow Specification Segments</h2>
<p>Selecting the “Show” button on the toolbar shows the missing flow segments of the currently selected flow drop-down Flow Implementation or End-to-End Flow when it is marked empty (E) or partial (P).</p>
<h2 id="highlighting-in-mode-elements"><span class="header-section-number">8.7</span> Highlighting In Mode Elements</h2>
<p>Selecting a Mode or Mode Transition from the mode drop-down in the toolbar will highlight the in mode elements in the diagram.</p>
<h2 id="showing-in-mode-elements"><span class="header-section-number">8.8</span> Showing In Mode Elements</h2>
<p>Right clicking a Mode or Mode Transition and selecting the “Show In Mode Elements” will show the elements within the mode’s container which are active in the selected mode.</p>
<h2 id="moving-shapes-using-arrow-keys"><span class="header-section-number">8.9</span> Moving Shapes Using Arrow Keys</h2>
<ol type="1">
<li><p>Select the element to be moved.</p></li>
<li><p>Press the <strong>.</strong> key.</p></li>
<li><p>Using the <em>Arrow</em> keys, move the element to desired location.</p></li>
<li><p>Press the <em>Enter</em> key.</p></li>
</ol>
<h2 id="sec:restore_missing_diagram_elements"><span class="header-section-number">8.7</span> Restore Missing Diagram Elements</h2>
<h2 id="sec:restore_missing_diagram_elements"><span class="header-section-number">8.10</span> Restore Missing Diagram Elements</h2>
<p>If a a model element is renamed from the AADL text editor without using the <em>Rename Element</em> menu option, the diagram element may disappear from diagrams in which it appears. In such cases it is possible to restore the diagram elements using the following steps. Note: if the diagram is saved after the diagram elements disappears, it will not be possible to restore the missing diagram elements.</p>
<ol type="1">
<li>Select <em>Edit-&gt;Restore Missing Diagram Elements</em>. A window containing diagram elements which have been removed from the diagram because the associated model element is missing will appear.</li>
Expand Down Expand Up @@ -983,7 +992,7 @@ <h2 id="build-automatically"><span class="header-section-number">12.2</span> Bui
<h2 id="inconsistent-font-sizes-across-machines"><span class="header-section-number">12.3</span> Inconsistent Font Sizes Across Machines</h2>
<p>To ensure diagrams have a consistent appearance across machines, the graphical editor attempts to produce consistent text sizes regardless of system settings. However, due to limitations in the underlying libraries on which the graphical editor relies, this is not always possible. On windows systems, the graphical editor produces consistent font sizes at 100%, 125%, and 200% system text scaling levels.</p>
<h2 id="missing-diagram-elements-after-modification-of-aadl-source"><span class="header-section-number">12.4</span> Missing Diagram Elements After Modification of AADL Source</h2>
<p>See section <a href="#sec:restore_missing_diagram_elements">8.7</a>.</p>
<p>See section <a href="#sec:restore_missing_diagram_elements">8.10</a>.</p>
<h2 id="reporting-issues"><span class="header-section-number">12.5</span> Reporting Issues</h2>
<p>Issues should be reported using the <a href="https://github.com/osate/osate2/issues" target="_blank">OSATE Issue Tracker</a>.</p>
<h1 id="notices"><span class="header-section-number">13</span> Notices</h1>
Expand Down
6 changes: 6 additions & 0 deletions ge/org.osate.ge.doc/docs-gen/user_guide_toc.xml
Expand Up @@ -112,6 +112,12 @@ censes only apply to the Third Party Software and not any other portion of this
</topic>
<topic label="Highlighting Flow Implementations and End-to-End Flow Specifications" href="docs-gen/user_guide.html#highlighting-flow-implementations-and-end-to-end-flow-specifications">
</topic>
<topic label="Showing Flow Implementation and End-to-End Flow Specification Segments" href="docs-gen/user_guide.html#showing-flow-implementation-and-end-to-end-flow-specification-segments">
</topic>
<topic label="Highlighting In Mode Elements" href="docs-gen/user_guide.html#highlighting-in-mode-elements">
</topic>
<topic label="Showing In Mode Elements" href="docs-gen/user_guide.html#showing-in-mode-elements">
</topic>
<topic label="Moving Shapes Using Arrow Keys" href="docs-gen/user_guide.html#moving-shapes-using-arrow-keys">
</topic>
<topic label="Restore Missing Diagram Elements" href="docs-gen/user_guide.html#sec:restore_missing_diagram_elements">
Expand Down
11 changes: 10 additions & 1 deletion ge/org.osate.ge.doc/docs/user_guide.md
Expand Up @@ -564,7 +564,16 @@ In some cases a connection between diagram elements will be represented by a dot
- An AADL property reference value for which the referenced model element is hidden.

## Highlighting Flow Implementations and End-to-End Flow Specifications
Selecting a flow implementation or end-to-end flow specification from the flow drop-down in the toolbar will highlight the flow. Flow Implementations and End To End Flows that have segments that are not shown in the diagram will be marked with an asterisk(*) in the drop-down.
Selecting a Flow Implementation or End-to-End Flow specification from the flow drop-down in the toolbar will highlight the flow. Flow Implementations and End-to-End Flows that have no segments and missing segments are marked with an empty tag (E) or a partial tag (P), respectively.

## Showing Flow Implementation and End-to-End Flow Specification Segments
Selecting the "Show" button on the toolbar shows the missing flow segments of the currently selected flow drop-down Flow Implementation or End-to-End Flow when it is marked empty (E) or partial (P).

## Highlighting In Mode Elements
Selecting a Mode or Mode Transition from the mode drop-down in the toolbar will highlight the in mode elements in the diagram.

## Showing In Mode Elements
Right clicking a Mode or Mode Transition and selecting the "Show In Mode Elements" will show the elements within the mode's container which are active in the selected mode.

## Moving Shapes Using Arrow Keys
1. Select the element to be moved.
Expand Down
2 changes: 1 addition & 1 deletion ge/org.osate.ge/META-INF/MANIFEST.MF
Expand Up @@ -25,7 +25,7 @@ Require-Bundle: org.eclipse.ui;bundle-version="[3.115.0,4.0.0)",
org.eclipse.jface;bundle-version="[3.18.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)",
org.eclipse.core.expressions;bundle-version="[3.6.0,4.0.0)",
org.osate.aadl2.instantiation;bundle-version="[1.0.0,2.0.0)",
org.osate.aadl2.instantiation;bundle-version="[1.1.0,2.0.0)",
org.osate.annexsupport;bundle-version="[1.0.0,2.0.0)",
org.osate.ge.diagram;bundle-version="[2.0.0,3.0.0)",
org.eclipse.ltk.ui.refactoring;bundle-version="[3.10.0,4.0.0)",
Expand Down
15 changes: 15 additions & 0 deletions ge/org.osate.ge/plugin.xml
Expand Up @@ -188,6 +188,10 @@ censes only apply to the Third Party Software and not any other portion of this
id="org.osate.ge.configureDiagram"
name="Configure Diagram...">
</command>
<command
id="org.osate.ge.showElementsInMode"
name="Show Elements In Mode">
</command>
<command
id="org.osate.ge.showConnectedElements"
name="Show Connected Elements">
Expand Down Expand Up @@ -476,6 +480,10 @@ censes only apply to the Third Party Software and not any other portion of this
class="org.osate.ge.internal.ui.handlers.ConfigureDiagramHandler"
commandId="org.osate.ge.configureDiagram">
</handler>
<handler
class="org.osate.ge.internal.ui.handlers.ShowElementsInModeHandler"
commandId="org.osate.ge.showElementsInMode">
</handler>
<handler
class="org.osate.ge.internal.ui.handlers.ShowConnectedElementsHandler"
commandId="org.osate.ge.showConnectedElements">
Expand Down Expand Up @@ -893,6 +901,13 @@ censes only apply to the Third Party Software and not any other portion of this
checkEnabled="true">
</visibleWhen>
</menu>
<command
commandId="org.osate.ge.showElementsInMode"
style="push">
<visibleWhen
checkEnabled="true">
</visibleWhen>
</command>
<command
commandId="org.osate.ge.showConnectedElements"
style="push">
Expand Down
@@ -1,18 +1,18 @@
/**
* Copyright (c) 2004-2020 Carnegie Mellon University and others. (see Contributors file).
* Copyright (c) 2004-2020 Carnegie Mellon University and others. (see Contributors file).
* All Rights Reserved.
*
*
* NO WARRANTY. ALL MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE
* OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT
* MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT.
*
*
* This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
* SPDX-License-Identifier: EPL-2.0
*
*
* Created, in part, with funding and support from the United States Government. (see Acknowledgments file).
*
*
* This program includes and/or can make use of certain third party source code, object code, documentation and other
* files ("Third Party Software"). The Third Party Software that is used by this program is dependent upon your system
* configuration. By using this program, You agree to comply with any and all relevant Third Party Software terms and
Expand All @@ -36,11 +36,14 @@
public class AgeDiagramEditorActionBarContributor extends org.eclipse.graphiti.ui.editor.DiagramEditorActionBarContributor {
final ModeContributionItem selectedModeItem;
final FlowContributionItem selectedFlowItem;
final ShowFlowContributionItem showFlowImplElements;
DummyContributionItem dummyItem;

public AgeDiagramEditorActionBarContributor() {
selectedModeItem = new ModeContributionItem("org.osate.ge.ui.editor.items.selected_mode");
selectedFlowItem = new FlowContributionItem("org.osate.ge.ui.editor.items.selected_flow");
showFlowImplElements = new ShowFlowContributionItem("org.osate.ge.ui.editor.items.show_flow_elements");
selectedFlowItem = new FlowContributionItem("org.osate.ge.ui.editor.items.selected_flow",
showFlowImplElements);
dummyItem = new DummyContributionItem("org.osate.ge.ui.editor.items.dummy");
}

Expand All @@ -53,6 +56,7 @@ protected void buildActions() {
public void dispose() {
selectedModeItem.setActiveEditor(null);
selectedFlowItem.setActiveEditor(null);
showFlowImplElements.setActiveEditor(null);
super.dispose();
}

Expand All @@ -71,6 +75,7 @@ public void contributeToToolBar(final IToolBarManager tbm) {
tbm.add(selectedModeItem);
tbm.add(new Separator());
tbm.add(selectedFlowItem);
tbm.add(showFlowImplElements);
tbm.add(new Separator());
tbm.add(dummyItem);
}
Expand Down Expand Up @@ -118,6 +123,7 @@ public final void setActiveEditor(final IEditorPart editor) {
super.setActiveEditor(editor);
selectedModeItem.setActiveEditor(editor);
selectedFlowItem.setActiveEditor(editor);
showFlowImplElements.setActiveEditor(editor);
}

}
@@ -1,18 +1,18 @@
/**
* Copyright (c) 2004-2020 Carnegie Mellon University and others. (see Contributors file).
* Copyright (c) 2004-2020 Carnegie Mellon University and others. (see Contributors file).
* All Rights Reserved.
*
*
* NO WARRANTY. ALL MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE
* OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT
* MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT.
*
*
* This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
* SPDX-License-Identifier: EPL-2.0
*
*
* Created, in part, with funding and support from the United States Government. (see Acknowledgments file).
*
*
* This program includes and/or can make use of certain third party source code, object code, documentation and other
* files ("Third Party Software"). The Third Party Software that is used by this program is dependent upon your system
* configuration. By using this program, You agree to comply with any and all relevant Third Party Software terms and
Expand Down Expand Up @@ -113,6 +113,6 @@ protected String getNullValueString() {
// Force a fixed width for the combo contribution items. Otherwise the sizes are often incorrect due to the dynamic nature of the control.
@Override
protected int computeWidth(Control control) {
return 300;
return 310;
}
}

0 comments on commit 39018d7

Please sign in to comment.