Commit 81fcd159 authored by Simon Barner's avatar Simon Barner
Browse files

Merge branch 'master' of https://git.fortiss.org/af3/af3.git into 3337



Conflicts:
	org.fortiss.af3.allocation/src/org/fortiss/af3/allocation/model/impl/.ratings
	org.fortiss.af3.allocation/src/org/fortiss/af3/allocation/utils/.ratings
Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parents e0bb77fa ea6ccbb6
......@@ -7,6 +7,15 @@
<modelElementHandler handler="org.fortiss.af3.allocation.ui.handler.AllocationTableCollectionHandler">
<modelElementClass modelElementClass="org.fortiss.af3.allocation.model.AllocationTableCollection"/>
</modelElementHandler>
<modelElementHandler handler="org.fortiss.af3.allocation.ui.handler.ManyToOneAllocationEntryHandler">
<modelElementClass modelElementClass="org.fortiss.af3.allocation.model.ManyToOneAllocationEntry"/>
</modelElementHandler>
<modelElementHandler handler="org.fortiss.af3.allocation.ui.handler.OneToOneAllocationEntryHandler">
<modelElementClass modelElementClass="org.fortiss.af3.allocation.model.OneToOneAllocationEntry"/>
</modelElementHandler>
<modelElementHandler handler="org.fortiss.af3.allocation.ui.handler.OneToManyAllocationEntryHandler">
<modelElementClass modelElementClass="org.fortiss.af3.allocation.model.OneToManyAllocationEntry"/>
</modelElementHandler>
</extension>
<extension point="org.fortiss.tooling.kernel.modelPrototypeProvider">
......
AF3AllocationUIActivator.java d0d2f939b1c8a1ba0995a3dc6dfd2c197ab09832 GREEN
DefaultStyle.java 1981ac9801c7867c08868dde009415db4c5c8ba8 GREEN
ParameterEntryTreeViewerEditingSupport.java aedc9b5729911b42bf752d7edbe507ff4f447420 GREEN
ParameterEntryTreeViewerLabelProvider.java dacadca1f62afba95d0d6a68f7aca6252b34b172 GREEN
ParameterEntryTreeViewerLabelProvider.java 79c70864ef80404e31aa48f75d36072f35380762 GREEN
ParameterSourceElementTreeViewerEditingSupport.java 9e30e6e0df10beaaf3231c9ff06a0c5ab1df9b34 GREEN
ParameterSourceElementTreeViewerLabelProvider.java cb886708a180db20dee0411b37fa32185b9a95f5 GREEN
ParameterTableTreeViewerManager.java 33b2836459c8258127bd1174c938b5953b115eba GREEN
TreeViewerCheckBoxEditingSupport.java 00d09fbe4950453c0272c6b497b994ffeec38023 GREEN
TreeViewerCheckBoxLabelProvider.java 97fe6771fbe09ccd16c1fe1ade862d2f95093ed1 GREEN
TreeViewerCheckBoxLabelProvider.java 831580238a82f8b1fe87dc4ff8518efd9f42c25a GREEN
TreeViewerContentProvider.java e19b353b4f7624fd38db782524fed5cdf66dff55 GREEN
TreeViewerFirstColumnLabelProvider.java 41af5aeea1c94de2deb2a024b5d0c589302b0c15 GREEN
TreeViewerManager.java 2e073c418cfdf089f42d13be62ff3b26efca3a39 GREEN
TreeViewerManager.java ac9452a973bfcb14bda59c940155fb2343fdbe18 GREEN
......@@ -15,7 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.allocation.ui.editor.treeviewer;
import static org.fortiss.af3.allocation.ui.DefaultStyle.RIGHT_ARROW;
import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.RIGHT_ARROW;
import static org.fortiss.af3.allocation.utils.AllocationUtils.getParameterEntryName;
import static org.fortiss.af3.allocation.utils.AllocationUtils.getParameterEntryValue;
......
......@@ -15,7 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.allocation.ui.editor.treeviewer;
import static org.fortiss.af3.allocation.ui.DefaultStyle.RIGHT_ARROW;
import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.RIGHT_ARROW;
import static org.fortiss.af3.allocation.utils.AllocationUtils.isAllocated;
import static org.fortiss.af3.allocation.utils.AllocationUtils.isModifiableAllocationEntry;
......
......@@ -18,8 +18,8 @@ package org.fortiss.af3.allocation.ui.editor.treeviewer;
import static java.util.Arrays.sort;
import static java.util.Collections.emptyList;
import static org.eclipse.jface.viewers.AbstractTreeViewer.ALL_LEVELS;
import static org.fortiss.af3.allocation.ui.DefaultStyle.DOWN_ARROW;
import static org.fortiss.af3.allocation.ui.DefaultStyle.RIGHT_ARROW;
import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.DOWN_ARROW;
import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.RIGHT_ARROW;
import java.util.ArrayList;
import java.util.Collection;
......
AllocationTableCollectionHandler.java d670d09ac29b35de7cdb12a9391f1c202b8dabe5 GREEN
ManyToOneAllocationEntryHandler.java 0f2b8ecaf7761b672d380b31558b3ca4a86eadce GREEN
OneToManyAllocationEntryHandler.java b8271e7603d4af63e0897b689f06ff9d2f2de28d GREEN
OneToOneAllocationEntryHandler.java 27a868c2b2cc528a119961990bb574ef35c4df51 GREEN
/*-------------------------------------------------------------------------+
| Copyright 2019 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.allocation.ui.handler;
import static java.util.stream.Collectors.joining;
import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.RIGHT_ARROW;
import java.util.Collection;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.allocation.model.ManyToOneAllocationEntry;
import org.fortiss.tooling.base.model.element.IModelElement;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase;
import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
/**
* {@link IModelElementHandler} for {@link ManyToOneAllocationEntry}s.
*
* @author diewald
*/
public class ManyToOneAllocationEntryHandler
extends ModelElementHandlerBase<ManyToOneAllocationEntry> {
/** {@inheritDoc} */
@Override
public String getName(ManyToOneAllocationEntry element) {
IModelElementHandlerService handlerService = IModelElementHandlerService.getInstance();
Collection<IModelElement> sourceElements = element.getSourceElements();
String name = "[ " +
sourceElements.stream().map(e -> handlerService.getName(e)).collect(joining(",")) +
" ]";
name = name + " " + RIGHT_ARROW + " ";
name = name + handlerService.getName(element.getTargetElement());
return name;
}
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return null;
}
}
/*-------------------------------------------------------------------------+
| Copyright 2019 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.allocation.ui.handler;
import static java.util.stream.Collectors.joining;
import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.RIGHT_ARROW;
import java.util.Collection;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.allocation.model.OneToManyAllocationEntry;
import org.fortiss.tooling.base.model.element.IModelElement;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase;
import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
/**
* {@link IModelElementHandler} for {@link OneToManyAllocationEntry}s.
*
* @author diewald
*/
public class OneToManyAllocationEntryHandler
extends ModelElementHandlerBase<OneToManyAllocationEntry> {
/** {@inheritDoc} */
@Override
public String getName(OneToManyAllocationEntry element) {
IModelElementHandlerService handlerService = IModelElementHandlerService.getInstance();
String name = handlerService.getName(element.getSourceElement());
name = name + " " + RIGHT_ARROW + " ";
Collection<IModelElement> targetElements = element.getTargetElements();
name = name + "[ " +
targetElements.stream().map(e -> handlerService.getName(e)).collect(joining(", "));
return name + " ]";
}
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return null;
}
}
/*-------------------------------------------------------------------------+
| Copyright 2017 fortiss GmbH |
| Copyright 2019 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -13,18 +13,36 @@
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.allocation.ui;
package org.fortiss.af3.allocation.ui.handler;
import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.RIGHT_ARROW;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.allocation.model.OneToOneAllocationEntry;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase;
import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
/**
* Style definitions for allocation UI elments.
* {@link IModelElementHandler} for {@link OneToOneAllocationEntry}s.
*
* @author barner
* @author diewald
*/
public class DefaultStyle {
public class OneToOneAllocationEntryHandler
extends ModelElementHandlerBase<OneToOneAllocationEntry> {
/** Unicode right arrow. */
public static final String RIGHT_ARROW = "\u2192";
/** {@inheritDoc} */
@Override
public String getName(OneToOneAllocationEntry element) {
IModelElementHandlerService handlerService = IModelElementHandlerService.getInstance();
String sourceName = handlerService.getName(element.getSourceElement());
String targetName = handlerService.getName(element.getTargetElement());
return sourceName + " " + RIGHT_ARROW + " " + targetName;
}
/** Unicode down arrow. */
public static final String DOWN_ARROW = "\u2193";
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return null;
}
}
......@@ -2,5 +2,5 @@ AF3AllocationFactoryImplCustom.java 36f55f6cc9ab49c09223a7b0c0163157b137aeb3 GRE
AllocationEntryStaticImpl.java 49e2c1390029f9652e8d891a1ce281f30e941d5b GREEN
AllocationTableCollectionStaticImpl.java d1ebdc08e00373ca5940853c1fb7c1b0a5b19c43 GREEN
AllocationTableStaticImpl.java 81c556aad96385789a251c19e5ec92db1f07bae8 GREEN
ParameterEntryStaticImpl.java 45ff9e4ab15af6527f6cba27920954981697d23d GREEN
ParameterEntryStaticImpl.java 81f62de67eaeac99da628853f31ae13bc6a33cc4 GREEN
ParameterTableStaticImpl.java cbf046b336d70c0b7b9e5976eda99537a8f73114 GREEN
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.allocation.model.impl;
import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.RIGHT_ARROW;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.computeFullyQualifiedName;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.computeRelativeName;
......@@ -43,9 +44,6 @@ public class ParameterEntryStaticImpl {
return element != null ? element.toString() : "<null>";
}
/** Unicode right arrow. */
private static final String RIGHT_ARROW = "\u2192";
/**
* Computes the "name" of the given {@link ParameterEntry} based on its referenced
* {@code sourceElement} and {@code targetElement}.
......
AllocationModelElementFactory.java 1790fc35d560cdf74ac1900c0d289e58900a0c32 GREEN
AllocationModelElementFactory.java 9aba183708290c741ebbbe2897bbfcc51ea33fb6 GREEN
AllocationUtils.java 1d6f9a08ce8f0ba1a0ea5b5d4b628f0a28321f4f YELLOW
......@@ -33,6 +33,12 @@ import org.fortiss.af3.allocation.model.OneToOneAllocationEntry;
*/
public class AllocationModelElementFactory {
/** Allocation Names: Unicode right arrow. */
public static final String RIGHT_ARROW = "\u2192";
/** Allocation Names: Unicode down arrow. */
public static final String DOWN_ARROW = "\u2193";
/**
* Creates a new {@link AllocationTableCollection}.
*
......
documentation.html 54373a5beed76fda975bb28b64a371fccbf6b377 RED
documentation.html 24c55e0a163060d58a1bb21253c10eda8c4012ed GREEN
<html><body>
<H1>Developer Documentation for <I>org.fortiss.af3.component.ui</I></H1>
<P>// TODO
</body></html>
<html>
<h1>Developer Documentation for <i>org.fortiss.af3.component.ui</i></h1>
<h2>Plugin description</h2>
<p>This is the user interface part of the af3.component plugin. It provides a component and a
code specification editor. Also it provides a simulator, in which the user observe the
execution of the model and debug it.</p>
<h2>Package description</h2>
<ul>
<li><tt>component.ui</tt>: main package for component.</li>
<li><tt>component.ui.behavior</tt>: implementation for converters and validators</li>
<li><tt>component.ui.commands</tt>: implementation for commands.</li>
<li><tt>component.ui.compose</tt>: connection compositor for directly connecting components.</li>
<li><tt>component.ui.editor</tt>: package for editors of the AF3 component language.</li>
<li><tt>component.ui.editor.code</tt>: implementation of the code specification editor.</li>
<li><tt>component.ui.editor.datastate</tt>: editor for the data state variables.</li>
<li><tt>component.ui.editpart</tt>: implementation for edit parts.</li>
<li><tt> component.ui.editpart.figures</tt>: implementation for figures. A figure can be a rectangle
or an ellipse with text inside.</li>
<li><tt>component.ui.examples</tt>: implementation for examples.</li>
<li><tt>component.ui.generator</tt>: implementation of C code generator.</li>
<li><tt>component.ui.handler</tt>: implementation of handlers for model elements.</li>
<li><tt>component.ui.library</tt>: this package contains actions for the components library.</li>
<li><tt>component.ui.properties</tt>: implementation of properties.</li>
<li><tt>component.ui.simulator</tt>: implementation of the AF3 simulator.</li>
<li><tt>component.ui.simulator.component</tt>: implementation of components simulator.</li>
<li><tt>component.ui.simulator.menu</tt>: implementation of simulator menu.</li>
<li><tt>component.ui.simulator.views</tt>: implementation of simulator views.</li>
<li><tt>component.ui.simulator.utils</tt>: utility classes for component UI.</li>
</ul>
</body>
</html>
\ No newline at end of file
documentation.html 5a2ca7a915947460d270932825ee4d5f59a732e0 RED
documentation.html e66e28a6276439808c7cbcdac8b3e62f1e734067 GREEN
<html><body>
<H1>Developer Documentation for <I>org.fortiss.af3.component</I></H1>
<P>// TODO
</body></html>
<html>
<body>
<h1>Developer Documentation for <i>org.fortiss.af3.component</i></h1>
<h2>Plugin description</h2>
<p>The plugin represents a component language with a set of behavior
specifications.</p>
<p>A component contains one behavior to execute and it can be related to other
components by input or output ports and incoming and outgoing
channels between ports. The data of types <i>boolean</i>, <i>int</i>, <i>double</i> or
user-defined <i>structs</i> and <i>arrays</i> can be propagated between ports.</p>
<p>A component may contain one of the following behavioral specifications: Code,
<a href="../../../org.fortiss.af3.mode/html/developer/documentation.html">Mode Switch</a>,
<a href="../../../org.fortiss.af3.state/html/developer/documentation.html">State Automaton</a>,
<a href="../../../org.fortiss.af3.cosimulation/html/developer/documentation.html">Simulink</a>,
<a href="../../../org.fortiss.af3.cosimulation/html/developer/documentation.html">FMU</a>, Specifications
and <a href="../../../org.fortiss.af3.operatorpanel/html/developer/documentation.html">Operator Panel</a> for
the simulator user interface design. There are also secondary specifications as <i>Test Suite Specification</i>
and <i>Refinement Specification</i>. Every component can have at most one of the aforementioned behavioral specifications.
A component without a behavior evidently cannot generate any meaningful code, but can be
used for the further development of a project. All these specifications allow to generate code in
<i>C</i> or <i>Java</i> for the simulator, or for a hardware platform implementation.</p>
<p>A component can contain other components (sub-components), resulting into a
hierarchy of components. The superior component is called the parent
component and the inferior one, correspondingly, the child component
or the sub-component. If a component does not have another component
inside, it is called an atomic component, i. e. one that cannot be
decomposed in other components. Complex components, constituted
of many sub-components on different levels can be decomposed by the
<i>unpack</i> function and vice versa, many components can be packed in one
component by the <i>pack</i> function. The set of all components constitutes a
<i>Component Architecture</i>. The top-most component of this architecture
is called the <i>Component Architecture Root</i>.</p>
<h2>Package description</h2>
<ul>
<li><tt>component.constraint</tt>: constraint-checkers.</li>
<li><tt>component.generator.c: </tt>C-code generator.</li>
<li><tt>component.generator.component</tt>: intermediate language generator for composite components and code
specifications.</li>
<li><tt>component.generator.java</tt>: Java-code generator.</li>
<li><tt>component.generator.nusmv</tt>: a collection of transformations from this model to <i>NuSMV</i>.</li>
<li><tt>component.library</tt>: classes for dealing with the library of components.</li>
<li><tt>component.library.prototypes</tt>: prototypes for the library of components.</li>
<li><tt>component.model.behavior.common.impl</tt>: static implementations for EOperations defined by
meta-model classes in the Ecore model.</li>
<li><tt>component.simulator</tt>: handling for simulation of components.</li>
<li><tt>component.utils</tt>: utility functions for components.</li>
</ul>
<h2>Metamodel description</h2>
The <i>component metamodel</i> contains the following classes and interfaces:
<ul>
<li><tt>ComponentArchitecture</tt>: the root class of the component architecture.</li>
<li><tt></span>Component</tt>: the main concept to encapsulate behaviors. A component can be atomic,
implementing a behavior by means of any kind of behavioral specification or
hierarchical, containing sub-components with behaviors.</li>
<li><tt>Channel</tt>: a channel is a connection between two ports of a component or more
components. a channel is outgoing for an output port and is incoming for an input port.</li>
<li><tt>Port</tt>: class by means of which a component communicates with other
components. A port is connected to other input or output ports by channels.</li>
<li><tt>InputPort</tt>: an input port is connected to an output port by an incoming channel.</li>
<li><tt>OutputPort</tt>: an output port is connected to other input ports by outgoing channels.</li>
<li><tt>CausalityComponentSpecification</tt>: specifies the causality of a component. Strong causality means that
the data is passing through a component with a certain time delay. Weak causality means that data passes without a
time delay.</li>
<li><tt>PortSpecification</tt>: specifies the initial value and the type of the data propagated from
one port to another.</li>
<li><tt>ComponentRef</tt>: describes a reference to a component that is in a library of components.</li>
<li><tt>LibraryComponent</tt>: represents a library of components.</li>
<li><tt>LibraryComponentPackage</tt>: represents a package of libraries of components.</li>
<li><tt>PropagatableSpecification</tt>: describes how data can be propagated from one port to another.</li>
<li><tt>ComponentSpecificationsContainer</tt>: interface implementing methods that allow to get the specifications of a component container.</li>
<li><tt>VerifBehaviourComponentSpecification</tt>: interface implementing methods that allow to get the specifications of a component and to verify its behavior.</li>
<li><tt>IReadOnlyBehaviorSpecification</tt>: interface implementing methods that allow to get only readable specifications of a component.</li>
</ul>
The sub-package <i>annotation</i> contains:
<ul>
<li><tt>MemoryRequirement</tt>: annotation that returns the estimated memory requirement of a
component, i.e. the sum of its local memory requirement plus the memory requirements of its children.
</br><b>Note</b>: This annotation is deprecated. See <tt>RamRequirement</tt> in
<a href="../../../org.fortiss.af3.task/html/developer/documentation.html">task architecture</a> instead.</li>
</ul>
The sub-package <i>behavior</i> contains:
<ul>
<li><tt>IComponentBehaviorDefinitionSpecification</tt> interface implementing methods working with component behavior specification.</li>
<li><tt>common.DataStateVariable</tt>: internal variables that can be accessed in all states of a state
automaton. Valid types are int, double and boolean.</li>
<li><tt>common.Guard</tt>: used in a state automaton to create a conditional expression for a transition
from one state to another.</li>
<li><tt>common.Action</tt>: used in a state automaton to create an assignment expression inside of a state, which means to create an action, when this state is achieved.</li>
<li><tt>common.IDataStateVariableProvider</tt>: returns the value of the <i>Data State Variables</i> containment reference list.</li>
<li><tt>code.CodeSpecification</tt>: a way to provide behavior to a component by means of writing a
C-like code directly in the body of a component.</li>
</ul>
The sub-package <i>generator</i> contains:
<ul>
<li><tt>ComponentProgram</tt>: used to transform components into generated C-code or Java-code.</li>
<li><tt>ComponentFunction</tt>: defines the identifiers for the various component function names.</li>
<li><tt>LocalFunction</tt>: defines the identifiers for the local function names.</li>
<li><tt>PortVariable</tt>: defines the identifiers for the port variable names.</li>
<li><tt>LocalVariable</tt>: defines the identifiers for the local variable names.</li>
<li><tt>port.PortVariableOperation</tt>: interface implementing methods working with port operations. </li>
<li><tt>port.WritePortVariableStatement</tt>: interface implementing methods working with port variable statement to be written.</li>
<li><tt>port.ReadPortVariableExpression</tt>: interface implementing methods working with port variable expression to be read.</li>
<li><tt>port.TestPortVariableExpression</tt>: interface implementing methods working with port variable expression to be tested.</li>
<li><tt>port.PortVariableOperationArgument</tt>: interface implementing methods working with port operation arguments.</li>
<li><tt>port.NoValArgument</tt>: interface implementing methods working with 'no value' arguments.</li>
<li><tt>port.PortArgument</tt>: interface implementing methods working with port arguments.</li>
<li><tt>port.ValueArgument</tt>: interface implementing methods working with value arguments.</li></ul>
</body>
</html>
\ No newline at end of file
component.ecore 53e9021aab7ee4a7331e1ef3d2eb4bc2e30afe7e GREEN
component.ecore 0f73aaa543d3ba434c263bd046cdebc75f2fea86 GREEN
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment