Skip to content

Commit

Permalink
Updated to Modelio 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
juancadavid committed Jan 30, 2024
1 parent d6d8335 commit c043746
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}
2 changes: 1 addition & 1 deletion README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ image:readme//example.png[]
== **Dependencies**

* link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html[Java 8 JDK]
* link:https://github.com/ModelioOpenSource/Modelio/[Modelio 4.1]
* link:https://github.com/ModelioOpenSource/Modelio/[Modelio 5.4]

== **Contributing**

Expand Down
9 changes: 5 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<!-- definition -->
<groupId>org.modelio.module</groupId>
<artifactId>attacktreedesigner</artifactId>
<version>1.0.00</version>
<version>2.0.1
</version>
<name>AttackTreeDesigner</name>
<repositories>
<repository>
Expand All @@ -31,7 +32,7 @@
<dependency>
<groupId>org.modelio</groupId>
<artifactId>MDAKit</artifactId>
<version>[4.1.0,4.1.1)</version>
<version>[5.4,5.5)</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
Expand All @@ -57,7 +58,7 @@
<plugin>
<groupId>org.modelio</groupId>
<artifactId>modelio-maven-plugin</artifactId>
<version>4.1.0.00</version>
<version>5.4.0.00</version>
<executions>
<execution>
<id>ModuleValidation</id>
Expand Down Expand Up @@ -181,7 +182,7 @@
modelio-maven-plugin
</artifactId>
<versionRange>
[4.1.0.00,)
[5.4.0.00,)
</versionRange>
<goals>
<goal>
Expand Down
2 changes: 1 addition & 1 deletion src/main/conf/module.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Module id="${project.name}" class="org.modelio.module.attacktreedesigner.impl.AttackTreeDesignerModule" binaryversion="4.1.0" version="${project.version}" schema-level="2" uid="e9061c29-1a92-4608-891f-1e3d3b2f2bd6" author="Softeam" image="" url="">
<Module id="${project.name}" class="org.modelio.module.attacktreedesigner.impl.AttackTreeDesignerModule" binaryversion="5.4.0" version="${project.version}" schema-level="2" uid="e9061c29-1a92-4608-891f-1e3d3b2f2bd6" author="Softeam" image="" url="">
<ClassPath>
<PathEntry path="lib/${project.artifactId}-${project.version}.jar"/>
</ClassPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.modelio.api.modelio.diagram.IDiagramGraphic;
import org.modelio.api.modelio.diagram.IDiagramHandle;
import org.modelio.api.modelio.diagram.IDiagramLink.LinkRouterKind;
import org.modelio.api.modelio.diagram.ILinkPath;
import org.modelio.api.modelio.diagram.ILinkRoute;
import org.modelio.api.modelio.diagram.tools.DefaultLinkTool;
import org.modelio.api.modelio.model.IModelingSession;
import org.modelio.api.modelio.model.ITransaction;
Expand Down Expand Up @@ -31,7 +31,7 @@ public boolean acceptSecondElement(IDiagramHandle diagramHandle, IDiagramGraphic
}

@Override
public void actionPerformed(IDiagramHandle diagramHandle, IDiagramGraphic originNode, IDiagramGraphic targetNode, LinkRouterKind touterType, ILinkPath path) {
public void actionPerformed(IDiagramHandle diagramHandle, IDiagramGraphic originNode, IDiagramGraphic targetNode, LinkRouterKind touterType, ILinkRoute path) {
createThreatAnalysisDependency(diagramHandle, originNode, targetNode);
}

Expand Down Expand Up @@ -63,4 +63,5 @@ public static Dependency createThreatAnalysisDependency(IDiagramHandle diagramHa
return threatAnalysisDependency;
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.modelio.api.modelio.diagram.IDiagramGraphic;
import org.modelio.api.modelio.diagram.IDiagramHandle;
import org.modelio.api.modelio.diagram.IDiagramLink.LinkRouterKind;
import org.modelio.api.modelio.diagram.ILinkPath;
import org.modelio.api.modelio.diagram.ILinkRoute;
import org.modelio.api.modelio.diagram.tools.DefaultMultiLinkTool;
import org.modelio.metamodel.diagrams.AbstractDiagram;
import org.modelio.metamodel.uml.infrastructure.Dependency;
Expand Down Expand Up @@ -70,7 +70,7 @@ public boolean acceptLastElement(IDiagramHandle diagramHandle, List<IDiagramGrap
}

@Override
public void actionPerformed(IDiagramHandle diagramHandle, IDiagramGraphic lastNode, List<IDiagramGraphic> otherNodes, List<LinkRouterKind> routerKinds, List<ILinkPath> paths, Rectangle rectangle) {
public void actionPerformed(IDiagramHandle diagramHandle, IDiagramGraphic lastNode, List<IDiagramGraphic> otherNodes, List<LinkRouterKind> routerKinds, List<ILinkRoute> paths, Rectangle rectangle) {
ElementCreationManager.createOperatorElement(diagramHandle, otherNodes, rectangle, AttackTreeStereotypes.AND);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.modelio.api.modelio.diagram.IDiagramGraphic;
import org.modelio.api.modelio.diagram.IDiagramHandle;
import org.modelio.api.modelio.diagram.IDiagramLink.LinkRouterKind;
import org.modelio.api.modelio.diagram.ILinkPath;
import org.modelio.api.modelio.diagram.ILinkRoute;
import org.modelio.api.modelio.diagram.tools.DefaultLinkTool;
import org.modelio.api.modelio.model.IModelingSession;
import org.modelio.api.modelio.model.ITransaction;
Expand Down Expand Up @@ -69,7 +69,7 @@ public boolean acceptSecondElement(IDiagramHandle diagramHandle, IDiagramGraphic
}

@Override
public void actionPerformed(IDiagramHandle diagramHandle, IDiagramGraphic originNode, IDiagramGraphic targetNode, LinkRouterKind touterType, ILinkPath path) {
public void actionPerformed(IDiagramHandle diagramHandle, IDiagramGraphic originNode, IDiagramGraphic targetNode, LinkRouterKind touterType, ILinkRoute path) {
createConnection(diagramHandle, originNode, targetNode);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.modelio.api.modelio.diagram.IDiagramHandle;
import org.modelio.api.modelio.diagram.IDiagramLink.LinkRouterKind;
import org.modelio.api.modelio.diagram.IDiagramNode;
import org.modelio.api.modelio.diagram.ILinkPath;
import org.modelio.api.modelio.diagram.ILinkRoute;
import org.modelio.api.modelio.diagram.tools.DefaultAttachedBoxTool;
import org.modelio.api.modelio.model.IModelingSession;
import org.modelio.api.modelio.model.ITransaction;
Expand Down Expand Up @@ -36,7 +36,7 @@ public boolean acceptElement(IDiagramHandle diagramHandle, IDiagramGraphic targe
}

@Override
public void actionPerformed(IDiagramHandle diagramHandle, IDiagramGraphic originNode, LinkRouterKind routerType, ILinkPath path, Point point) {
public void actionPerformed(IDiagramHandle diagramHandle, IDiagramGraphic originNode, LinkRouterKind routerType, ILinkRoute path, Point point) {
createCounterMeasure(diagramHandle, originNode, point);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.modelio.api.modelio.diagram.IDiagramGraphic;
import org.modelio.api.modelio.diagram.IDiagramHandle;
import org.modelio.api.modelio.diagram.IDiagramLink.LinkRouterKind;
import org.modelio.api.modelio.diagram.ILinkPath;
import org.modelio.api.modelio.diagram.ILinkRoute;
import org.modelio.api.modelio.diagram.tools.DefaultMultiLinkTool;
import org.modelio.metamodel.diagrams.AbstractDiagram;
import org.modelio.metamodel.uml.infrastructure.Dependency;
Expand Down Expand Up @@ -70,7 +70,7 @@ public boolean acceptLastElement(IDiagramHandle diagramHandle, List<IDiagramGrap
}

@Override
public void actionPerformed(IDiagramHandle diagramHandle, IDiagramGraphic lastNode, List<IDiagramGraphic> otherNodes, List<LinkRouterKind> routerKinds, List<ILinkPath> paths, Rectangle rectangle) {
public void actionPerformed(IDiagramHandle diagramHandle, IDiagramGraphic lastNode, List<IDiagramGraphic> otherNodes, List<LinkRouterKind> routerKinds, List<ILinkRoute> paths, Rectangle rectangle) {
ElementCreationManager.createOperatorElement(diagramHandle, otherNodes, rectangle, AttackTreeStereotypes.OR);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ public AbstractDiagram actionPerformed(ModelElement owner, String diagramName, S
}
return diagram;
}

@Override
/*
*
@Override
public String getLabel() {
return Messages.getString ("Ui.Command.AttackTreeDiagramExplorerCommand.Label");
}
Expand All @@ -83,16 +84,16 @@ public String getDetails() {
public String getHelpUrl() {
return null;
}

public Image getIcon() {
return new Image(Display.getDefault(),AttackTreeResourcesManager.getInstance().getImage("attacktreediagram.png"));
}

@Override
public String getInformation() {
return Messages.getString ("Ui.Command.AttackTreeDiagramExplorerCommand.Information");
}
*/

public Image getIcon() {
return new Image(Display.getDefault(),AttackTreeResourcesManager.getInstance().getImage("attacktreediagram.png"));
}
public boolean accept(MObject selectedElt) {
return ((selectedElt != null)
&& (selectedElt.getStatus().isModifiable())
Expand Down

0 comments on commit c043746

Please sign in to comment.