Skip to content

Commit c2dea73

Browse files
Merge pull request #1 from HammerMaximilian/development
development --> master
2 parents 2721545 + 2e29c0a commit c2dea73

File tree

472 files changed

+61380
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

472 files changed

+61380
-1
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 HammerMaximilian
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,55 @@
1-
# fUML-Java
1+
<img src="logo.png" width="264"/>
2+
3+
# fUML Reference Implementation for *Java*
4+
This software is an open source reference implementation of the *Semantics of a Foundational Subset for Executable UML Models* (fUML) specifications by the *Object Management Group* (OMG) (see [fUML](https://www.omg.org/spec/FUML/1.5/About-FUML)). The fUML implementation of this software is a ont-on-one port of the original Java fUML reference implementation developed by
5+
*Model Driven Solutions* (see [https://github.com/ModelDriven/fUML-Reference-Implementation](https://github.com/ModelDriven/fUML-Reference-Implementation))
6+
7+
## Licensing
8+
For licensing information, please see the [LICENSE](LICENSE) file.
9+
10+
## Prerequisites
11+
For detailed information, please see the [User Guide](fUML-Java_User_Guide.pdf) section *1. Prerequisites*.
12+
### 1. Required Software
13+
* *Java Runtime Environment*
14+
* *Eclipse IDE for Java Developers*
15+
### 2. Recommended but optional Software
16+
* *Eclipse Modeling Tools* for creating UML models
17+
* *Eclipse Papyrus* for more sophisticated and graphical modeling of UML models
18+
* *Acceleo* to be able to use the code generator for executable models
19+
20+
## Setup
21+
For detailed information, please see the [User Guide](fUML-Java_User_Guide.pdf) section *2. Setup*.
22+
### 1. Setting up Eclipse
23+
* Import fUML-Java root project *fUML-Java* into your workspace
24+
* Import nested projects *uml* and *fuml*
25+
26+
## Building
27+
For detailed information, please see the [User Guide](fUML-Java_User_Guide.pdf) section *3. Build*.
28+
* No further build required, compilation is done automatically by the *Eclipse IDE*[^1]
29+
[^1]: Instructions for external build, i.e., without any IDE, will be added in the future.
30+
31+
## Usage
32+
For detailed information, please see the [User Guide](fUML-Java_User_Guide.pdf) section *4. Usage*.
33+
### 1. Creating executable models using source code
34+
* Create new Java project (see `"<fUML-Java-rootdir>\examples\helloworld"` as a reference project)
35+
* NOTE: it is suggested to store user-defined source code projects in common directory `"<fUML-Java-rootdir>\usersrc"`
36+
* The *usersrc* directory may contain arbitrary nested subdirectories
37+
* Add the *uml* and *fuml* projects to the classpath of your project
38+
* Create a `<model-name>Environment` class by extending class `utils.environmentfuml.Environment`
39+
* Create a `<model-name>Model` class by extending class `utils.environment.InMemoryModel` (this class will contain all of your model elements)
40+
* Create a class containing a main method and call `<model-name>Environment.instance().execute("<behavior-name>");` for each behavior you want to execute in subsequent order
41+
* Run your project as a Java application within the *Eclipse IDE*
42+
### 2. Generating executable models from *.uml* models (*Acceleo* plugin for Eclipse has to be installed)
43+
* Create new *.uml* model with a modeling tool of your choice (*Eclipse Papyrus* is suggested)
44+
* NOTE: it is suggested to store user-defined models in common directory `"<fUML-Java-rootdir>\usermodels"`
45+
* The *usermodels* directory may contain arbitrary nested subdirectories
46+
* Import nested project *generator* within fUML-Java root project
47+
* Navigate to file `\generator\src\fuml.generator.main\generate.mtl` in the project explorer
48+
* Right click `generate.mtl` and choose `Run as`-->`Run configurations...`
49+
* Configure and run Acceleo Application accordingly:
50+
* Choose `fuml.generator.main.Generate`
51+
* Choose your model file
52+
* Choose a target directory for the generated source code (`"<fUML-Java-rootdir>\usersrc\<model-name>"` is suggested)
53+
* Import newly generated Java project within fUML-Java root project and configure a run configuration
54+
* Add program arguments to define behaviors to be executed using `<behavior-name> [<behavior-name> <behavior-name> <behavior-name> <...>]`
55+
* Run as Java application within the *Eclipse IDE*

fUML-Java/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/usermodels/
2+
/usersrc/

fUML-Java/.project

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>fUML-Java</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
</buildSpec>
9+
<natures>
10+
</natures>
11+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.uml.architecture.Profile"/>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_-FlOsLSlEe6mgZP5iH_Gzg" type="PapyrusUMLProfileDiagram" name="Profile Diagram" measurementUnit="Pixel">
3+
<children xmi:type="notation:Shape" xmi:id="_IOta0LSmEe6mgZP5iH_Gzg" type="Stereotype_Shape">
4+
<children xmi:type="notation:DecorationNode" xmi:id="_IOta0rSmEe6mgZP5iH_Gzg" type="Stereotype_NameLabel"/>
5+
<children xmi:type="notation:BasicCompartment" xmi:id="_IOuB4LSmEe6mgZP5iH_Gzg" type="Stereotype_AttributeCompartment">
6+
<styles xmi:type="notation:TitleStyle" xmi:id="_IOuB4bSmEe6mgZP5iH_Gzg"/>
7+
<styles xmi:type="notation:SortingStyle" xmi:id="_IOuB4rSmEe6mgZP5iH_Gzg"/>
8+
<styles xmi:type="notation:FilteringStyle" xmi:id="_IOuB47SmEe6mgZP5iH_Gzg"/>
9+
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_IOuB5LSmEe6mgZP5iH_Gzg"/>
10+
</children>
11+
<children xmi:type="notation:BasicCompartment" xmi:id="_IOuB5bSmEe6mgZP5iH_Gzg" type="Stereotype_OperationCompartment">
12+
<styles xmi:type="notation:TitleStyle" xmi:id="_IOuB5rSmEe6mgZP5iH_Gzg"/>
13+
<styles xmi:type="notation:SortingStyle" xmi:id="_IOuB57SmEe6mgZP5iH_Gzg"/>
14+
<styles xmi:type="notation:FilteringStyle" xmi:id="_IOuB6LSmEe6mgZP5iH_Gzg"/>
15+
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_IOuB6bSmEe6mgZP5iH_Gzg"/>
16+
</children>
17+
<element xmi:type="uml:Stereotype" href="extensions.profile.uml#_IOsMsLSmEe6mgZP5iH_Gzg"/>
18+
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_IOta0bSmEe6mgZP5iH_Gzg" x="80" y="140"/>
19+
</children>
20+
<children xmi:type="notation:Shape" xmi:id="_XxzVQbSmEe6mgZP5iH_Gzg" type="Class_MetaclassShape">
21+
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_XxzVRbSmEe6mgZP5iH_Gzg" source="Stereotype_Annotation">
22+
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XxzVRrSmEe6mgZP5iH_Gzg" key="StereotypeWithQualifiedNameList" value=""/>
23+
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XxzVR7SmEe6mgZP5iH_Gzg" key="StereotypeList" value="StandardProfile::Metaclass"/>
24+
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XxzVSLSmEe6mgZP5iH_Gzg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
25+
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XxzVSbSmEe6mgZP5iH_Gzg" key="PropStereoDisplay" value=""/>
26+
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XxzVSrSmEe6mgZP5iH_Gzg" key="StereotypePropertyLocation" value="Compartment"/>
27+
</eAnnotations>
28+
<children xmi:type="notation:DecorationNode" xmi:id="_XxzVQ7SmEe6mgZP5iH_Gzg" type="Class_MetaclassNameLabel"/>
29+
<element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#CallOperationAction"/>
30+
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_XxzVRLSmEe6mgZP5iH_Gzg" x="80" y="20"/>
31+
</children>
32+
<children xmi:type="notation:Shape" xmi:id="_LivQALSpEe6BLIM139JPJA" type="StereotypeComment">
33+
<styles xmi:type="notation:TitleStyle" xmi:id="_LivQAbSpEe6BLIM139JPJA"/>
34+
<styles xmi:type="notation:EObjectValueStyle" xmi:id="_LivQA7SpEe6BLIM139JPJA" name="BASE_ELEMENT">
35+
<eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#CallOperationAction"/>
36+
</styles>
37+
<element xsi:nil="true"/>
38+
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_LivQArSpEe6BLIM139JPJA" x="280" y="20"/>
39+
</children>
40+
<styles xmi:type="notation:StringValueStyle" xmi:id="_-FlOsbSlEe6mgZP5iH_Gzg" name="diagram_compatibility_version" stringValue="1.4.0"/>
41+
<styles xmi:type="notation:DiagramStyle" xmi:id="_-FlOsrSlEe6mgZP5iH_Gzg"/>
42+
<styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_-FlOs7SlEe6mgZP5iH_Gzg" diagramKindId="org.eclipse.papyrus.uml.diagram.profile">
43+
<owner xmi:type="uml:Profile" href="extensions.profile.uml#_-FkAkLSlEe6mgZP5iH_Gzg"/>
44+
</styles>
45+
<element xmi:type="uml:Profile" href="extensions.profile.uml#_-FkAkLSlEe6mgZP5iH_Gzg"/>
46+
<edges xmi:type="notation:Connector" xmi:id="_iDEJsLSmEe6mgZP5iH_Gzg" type="Extension_Edge" source="_IOta0LSmEe6mgZP5iH_Gzg" target="_XxzVQbSmEe6mgZP5iH_Gzg">
47+
<styles xmi:type="notation:FontStyle" xmi:id="_iDEJsbSmEe6mgZP5iH_Gzg"/>
48+
<element xmi:type="uml:Extension" href="extensions.profile.uml#_iCxOwLSmEe6mgZP5iH_Gzg"/>
49+
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_iDEJsrSmEe6mgZP5iH_Gzg" points="[140, 140, -643984, -643984]$[140, 70, -643984, -643984]"/>
50+
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_iDXrsLSmEe6mgZP5iH_Gzg" id="(0.49586776859504134,0.0)"/>
51+
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_iDhcsLSmEe6mgZP5iH_Gzg" id="(0.5,1.0)"/>
52+
</edges>
53+
<edges xmi:type="notation:Connector" xmi:id="_Liv3ELSpEe6BLIM139JPJA" type="StereotypeCommentLink" source="_XxzVQbSmEe6mgZP5iH_Gzg" target="_LivQALSpEe6BLIM139JPJA">
54+
<styles xmi:type="notation:FontStyle" xmi:id="_Liv3EbSpEe6BLIM139JPJA"/>
55+
<styles xmi:type="notation:EObjectValueStyle" xmi:id="_Liv3FbSpEe6BLIM139JPJA" name="BASE_ELEMENT">
56+
<eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#CallOperationAction"/>
57+
</styles>
58+
<element xsi:nil="true"/>
59+
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Liv3ErSpEe6BLIM139JPJA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
60+
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Liv3E7SpEe6BLIM139JPJA"/>
61+
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Liv3FLSpEe6BLIM139JPJA"/>
62+
</edges>
63+
</notation:Diagram>

0 commit comments

Comments
 (0)