Commit 0a3a3954 authored by Letitia Li's avatar Letitia Li
Browse files

Merge branch 'master' of gitlab.enst.fr:mbe-tools/TTool into labsoc_experimental

parents e558d831 6a5811d9
12393
\ No newline at end of file
12411
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -174,7 +174,7 @@ public class AvatarModelChecker implements Runnable, myutil.Graph {
reachabilities = new ArrayList<SpecificationReachability>();
for(AvatarBlock block: spec.getListOfBlocks()) {
for(AvatarStateMachineElement elt: block.getStateMachine().getListOfElements()) {
TraceManager.addDev("null elt in state machine of block=" + block);
//TraceManager.addDev("null elt in state machine of block=" + block.getName());
if (elt.isCheckable()) {
SpecificationReachability reach = new SpecificationReachability(elt, block);
reachabilities.add(reach);
......@@ -344,7 +344,7 @@ public class AvatarModelChecker implements Runnable, myutil.Graph {
ts[i].start();
}
TraceManager.addDev("Waiting for threads termination (nb of threads:" + nbOfThreads + ")");
//TraceManager.addDev("Waiting for threads termination (nb of threads:" + nbOfThreads + ")");
for(i=0; i<nbOfThreads; i++) {
try {
ts[i].join();} catch (Exception e){TraceManager.addDev("Join on avatar model checker thread failed for thread #" + i);}
......
......@@ -54,6 +54,7 @@ import javax.swing.*;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
......@@ -1700,7 +1701,14 @@ public class TMLModelCompiler {
private void openDebugFile() {
File fileObject = new File( debugFileName );
if (!fileObject.exists())
try {
fileObject.createNewFile();
} catch (IOException e1) {
System.err.println(e1.getMessage());
}
fileObject.delete();
outputStream = null;
try {
outputStream = new PrintWriter( new FileOutputStream( debugFileName, true ) );
......
......@@ -1028,14 +1028,5 @@ public class ActionPerformer {
} else if (command.endsWith(".dot")) {
mgui.viewAutomata(command);
}
else if (command.equals(mgui.actions[TGUIAction.ACT_UP].getActionCommand())) {
tdp1.upComponent();
} else if (command.equals(mgui.actions[TGUIAction.ACT_DOWN].getActionCommand())) {
tdp1.downComponent();
} else if (command.equals(mgui.actions[TGUIAction.ACT_LEFT].getActionCommand())) {
tdp1.leftComponent();
} else if (command.equals(mgui.actions[TGUIAction.ACT_RIGHT].getActionCommand())) {
tdp1.rightComponent();
}
}
}
......@@ -472,6 +472,9 @@ public class GTURTLEModeling {
// Parse the PEC file and the library of code snippets for each DIPLODOCUS unit
applicationName = tmap.getMappedTasks().get(0).getName().split("__")[0]; // Remember that it works only for one application
CCode = new TMLModelCompiler( _title, applicationName, mgui.frame, mgui.getAllTMLCP(), tmap );
File dir = new File(ConfigurationTTool.CCodeDirectory + File.separator);
if (!dir.exists())
dir.mkdirs();
CCode.toTextFormat();
try {
if( ConfigurationTTool.CCodeDirectory.equals("") ) {
......
......@@ -107,13 +107,7 @@ public class JToolBarMainTurtle extends JToolBar implements ActionListener
button.addMouseListener(mgui.mouseHandler);
button = add(mgui.actions[TGUIAction.ACT_DELETE]);
button.addMouseListener(mgui.mouseHandler);
button = add(mgui.actions[TGUIAction.ACT_UP]);
button.addMouseListener(mgui.mouseHandler);
button = add(mgui.actions[TGUIAction.ACT_DOWN]);
button.addMouseListener(mgui.mouseHandler);
button = add(mgui.actions[TGUIAction.ACT_RIGHT]);
button.addMouseListener(mgui.mouseHandler);
button = add(mgui.actions[TGUIAction.ACT_LEFT]);
button = add(mgui.actions[TGUIAction.MOVE_ENABLED]);
button.addMouseListener(mgui.mouseHandler);
addSeparator();
......
......@@ -5100,6 +5100,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe
public void screenCapture() {
//Select file
File file = selectFileForCapture();
if (file == null)
return;
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension screenSize = toolkit.getScreenSize();
Rectangle screenRect = new Rectangle(screenSize);
......@@ -5293,6 +5295,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe
public File selectFileForCapture() {
File file = null;
int returnVal = jfcimg.showSaveDialog(frame);
if (returnVal == JFileChooser.CANCEL_OPTION)
return null;
if(returnVal == JFileChooser.APPROVE_OPTION) {
file = jfcimg.getSelectedFile();
file = FileUtils.addFileExtensionIfMissing(file, TImgFilter.getExtension());
......@@ -5311,6 +5315,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe
public File selectSVGFileForCapture() {
File file = null;
int returnVal = jfcimgsvg.showSaveDialog(frame);
if (returnVal == JFileChooser.CANCEL_OPTION)
return null;
if(returnVal == JFileChooser.APPROVE_OPTION) {
file = jfcimgsvg.getSelectedFile();
file = FileUtils.addFileExtensionIfMissing(file, TSVGFilter.getExtension());
......
......@@ -121,10 +121,7 @@ public class ModeManager {
actions[TGUIAction.ACT_GENERATE_ONTOLOGIES_ALL_DIAGRAMS].setEnabled(true);
actions[TGUIAction.ACT_DELETE].setEnabled(false);
actions[TGUIAction.ACT_SUPPR].setEnabled(false);
actions[TGUIAction.ACT_UP].setEnabled(false);
actions[TGUIAction.ACT_DOWN].setEnabled(false);
actions[TGUIAction.ACT_LEFT].setEnabled(false);
actions[TGUIAction.ACT_RIGHT].setEnabled(false);
actions[TGUIAction.MOVE_ENABLED].setEnabled(false);
if (mainBar != null) {
mainBar.activateSearch(true);
......@@ -408,10 +405,7 @@ public class ModeManager {
actions[TGUIAction.ACT_NC].setEnabled(true);
break;
case MainGUI.COMPONENT_SELECTED:
actions[TGUIAction.ACT_UP].setEnabled(true);
actions[TGUIAction.ACT_DOWN].setEnabled(true);
actions[TGUIAction.ACT_LEFT].setEnabled(true);
actions[TGUIAction.ACT_RIGHT].setEnabled(true);
actions[TGUIAction.MOVE_ENABLED].setEnabled(true);
actions[TGUIAction.ACT_DELETE].setEnabled(true);
actions[TGUIAction.ACT_SUPPR].setEnabled(true);
break;
......
package ui;
import java.awt.Cursor;
import java.awt.MouseInfo;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
......@@ -18,6 +20,24 @@ public class PanelKeyListener implements KeyListener {
@Override
public void keyPressed(KeyEvent arg0) {
if (arg0.isShiftDown() && (tdp.mode == TDiagramPanel.SELECTED_COMPONENTS || tdp.mode == TDiagramPanel.MOVING_SELECTED_COMPONENTS)) {
tdp.showSelectionZone = true;
tdp.mode = TDiagramPanel.MOVING_SELECTED_COMPONENTS;
tdp.setMovingSelectedComponents();
tdp.repaint();
if (arg0.getKeyCode() == KeyEvent.VK_UP) {
tdp.upComponents();
}
if (arg0.getKeyCode() == KeyEvent.VK_DOWN) {
tdp.downComponents();
}
if (arg0.getKeyCode() == KeyEvent.VK_LEFT) {
tdp.leftComponents();
}
if (arg0.getKeyCode() == KeyEvent.VK_RIGHT) {
tdp.rightComponents();
}
}
if (arg0.getKeyCode() == KeyEvent.VK_UP && arg0.isShiftDown())
tdp.upComponent();
if (arg0.getKeyCode() == KeyEvent.VK_DOWN && arg0.isShiftDown())
......@@ -26,13 +46,15 @@ public class PanelKeyListener implements KeyListener {
tdp.leftComponent();
if (arg0.getKeyCode() == KeyEvent.VK_RIGHT && arg0.isShiftDown())
tdp.rightComponent();
if (arg0.getKeyCode() == KeyEvent.VK_ESCAPE && tdp.mode == TDiagramPanel.ADDING_CONNECTOR) {
if (arg0.getKeyCode() == KeyEvent.VK_ESCAPE) {
if (tdp.mode == TDiagramPanel.ADDING_CONNECTOR) {
tdp.mode = TDiagramPanel.NORMAL;
tdp.stopAddingConnector(true);
tdp.getGUI().setEditMode();
tdp.repaint();
} else {
}
if (tdp.select){
tdp.tdmm.setSelection(-1, -1);
tdp.getGUI().setEditMode();
tdp.repaint();
}
......@@ -40,7 +62,15 @@ public class PanelKeyListener implements KeyListener {
}
@Override
public void keyReleased(KeyEvent arg0) {
public void keyReleased(KeyEvent arg0) {
if (!arg0.isShiftDown())
if (tdp.mode == TDiagramPanel.MOVING_SELECTED_COMPONENTS) {
tdp.showSelectionZone(tdp.currentX, tdp.currentY);
tdp.mode = TDiagramPanel.SELECTED_COMPONENTS;
tdp.setStopMovingSelectedComponents();
tdp.getGUI().changeMade(tdp, TDiagramPanel.MOVE_COMPONENT);
tdp.repaint();
}
}
@Override
......
......@@ -396,6 +396,7 @@ public class TDiagramMouseManager extends MouseAdapter {//implements MouseListen
tdp.mode = TDiagramPanel.NORMAL;
tdp.mgui.setMode(MainGUI.CUTCOPY_KO);
tdp.mgui.setMode(MainGUI.EXPORT_LIB_KO);
tdp.getMainGUI().actions[TGUIAction.MOVE_ENABLED].setEnabled(false);
tdp.unselectSelectedComponents();
tdp.repaint();
}
......
......@@ -1144,10 +1144,12 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree {
mode = NORMAL;
mgui.setMode(MainGUI.CUTCOPY_KO);
mgui.setMode(MainGUI.EXPORT_LIB_KO);
mgui.actions[TGUIAction.MOVE_ENABLED].setEnabled(false);
} else {
mode = SELECTED_COMPONENTS;
mgui.setMode(MainGUI.CUTCOPY_OK);
mgui.setMode(MainGUI.EXPORT_LIB_OK);
mgui.actions[TGUIAction.MOVE_ENABLED].setEnabled(true);
showSelectionZone = true;
xSel = Math.min(currentSelectX, initSelectX);
ySel = Math.min(currentSelectY, initSelectY);
......@@ -3445,6 +3447,26 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree {
}
}
public void upComponents() {
moveSelected(xSel, ySel - MOVE_SPEED);
repaint();
}
public void downComponents() {
moveSelected(xSel, ySel + MOVE_SPEED);
repaint();
}
public void leftComponents() {
moveSelected(xSel - MOVE_SPEED, ySel);
repaint();
}
public void rightComponents() {
moveSelected(xSel + MOVE_SPEED, ySel);
repaint();
}
public void setComponentPointed(TGComponent tgc) {
componentPointed = tgc;
}
......
......@@ -616,12 +616,9 @@ public class TGUIAction extends AbstractAction {
public static final int ACT_INTERNAL_SEARCH = 415;
//--
public static final int ACT_UP = 463;
public static final int ACT_DOWN = 464;
public static final int ACT_LEFT = 465;
public static final int ACT_RIGHT = 466;
public static final int NB_ACTION = 467;
public static final int MOVE_ENABLED = 463;
public static final int NB_ACTION = 464;
private static final TAction [] actions = new TAction[NB_ACTION];
......@@ -1232,10 +1229,7 @@ public class TGUIAction extends AbstractAction {
actions[ACT_GENERATE_ONTOLOGIES_CURRENT_SET_OF_DIAGRAMS] = new TAction("generate-ontology-current-set-of-diagrams", "Generate ontology (current set of diagrams)", IconManager.imgic338, IconManager.imgic339, "Generate ontology (current set of diagrams)", "Generate the ontology for the current set of diagrams under edition", 0);
actions[ACT_GENERATE_ONTOLOGIES_ALL_DIAGRAMS] = new TAction("generate-ontology-all-diagrams", "Generate ontology (all diagrams)", IconManager.imgic338, IconManager.imgic339, "Generate ontology (all diagrams)", "Generate the ontology for the diagrams under edition", 0);
actions[ACT_UP] = new TAction("UP", "Up", IconManager.imgic78, IconManager.imgic78, "Up (Maj-Haut)", "Up", KeyEvent.VK_UP);
actions[ACT_DOWN] = new TAction("DOWN", "Down", IconManager.imgic79, IconManager.imgic79, "Down (Maj-Bas)", "Down", KeyEvent.VK_DOWN);
actions[ACT_RIGHT] = new TAction("RIGHT", "Right", IconManager.imgic780, IconManager.imgic780, "Right (Maj-Droit)", "Right", KeyEvent.VK_RIGHT);
actions[ACT_LEFT] = new TAction("LEFT", "Left", IconManager.imgic790, IconManager.imgic790, "Left (Maj-Gauche)", "Left", KeyEvent.VK_LEFT);
actions[MOVE_ENABLED] = new TAction("Move", "Move enable", IconManager.imgic780, IconManager.imgic780, "Move enabled (shift + arrow)", "Move", 0);
}
......
/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
*
*
* ludovic.apvrille AT enst.fr
*
*
* This software is a computer program whose purpose is to allow the
* edition of TURTLE analysis, design and deployment diagrams, to
* allow the generation of RT-LOTOS or Java code from this diagram,
* and at last to allow the analysis of formal validation traces
* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
* from INRIA Rhone-Alpes.
*
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
* modify and/ or redistribute the software under the terms of the CeCILL
* license as circulated by CEA, CNRS and INRIA at the following URL
* "http://www.cecill.info".
*
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
* liability.
*
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* software by the user in light of its specific status of free software,
......@@ -31,7 +31,7 @@
* requirements in conditions enabling the security of their systems and/or
* data to be ensured and, more generally, to use and operate it in the
* same conditions as regards security.
*
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL license and that you accept its terms.
*/
......@@ -47,11 +47,11 @@ import java.util.ArrayList;
import java.util.HashMap;
/**
* Class TMLCPath
* Notion of Path. To be used to analyze the correctness of paths in the model
* Creation: 7/03/2014
* @version 1.0 7/03/2014
* @author Ludovic APVRILLE
* Class TMLCPath
* Notion of Path. To be used to analyze the correctness of paths in the model
* Creation: 7/03/2014
* @version 1.0 7/03/2014
* @author Ludovic APVRILLE
*/
public class TMLCPath {
......@@ -80,7 +80,9 @@ public class TMLCPath {
"One of more element of the path is badly connected",
"Events are not compatible with fork/join",
"Requests are not compatible with fork/join",
"Events/requests must all have the same parameters"};
"Events/requests must all have the same parameters",
"Channels and events can have only one input and one output"
};
public TMLCPath() {
cports = new ArrayList<TMLCCompositePort>();
......@@ -175,6 +177,7 @@ public class TMLCPath {
public void checkRules() {
errorNumber = -1;
//rule0: fork or join, but not both
if ((forks.size() > 0) && (joins.size() >0)) {
faultyComponent = forks.get(0);
......@@ -184,17 +187,17 @@ public class TMLCPath {
//rule1: Must have at least one producer
if (producerPorts.size() == 0) {
errorNumber = 1;
if ((consumerPorts != null) && (consumerPorts.size() > 0)) {
faultyComponent = consumerPorts.get(0);
}
if ((consumerPorts != null) && (consumerPorts.size() > 0)) {
faultyComponent = consumerPorts.get(0);
}
}
//rule2: Must have at least one receiver
if (consumerPorts.size() == 0) {
errorNumber = 2;
if ((producerPorts != null) && (producerPorts.size() > 0)) {
faultyComponent = producerPorts.get(0);
}
if ((producerPorts != null) && (producerPorts.size() > 0)) {
faultyComponent = producerPorts.get(0);
}
}
//rule3: If fork: must have only one producer
......@@ -269,7 +272,7 @@ public class TMLCPath {
if (producerPorts != null && producerPorts.size() > 0) {
TMLCPrimitivePort referencePort = producerPorts.get(0);
if (referencePort != null) {
if ((referencePort.getPortType() == 1) ||(referencePort.getPortType() == 1)) {
if ((referencePort.getPortType() == 1) ||(referencePort.getPortType() == 2)) {
// Event or request found
// We now check that they are all compatible with the reference
for(TMLCPrimitivePort porto: producerPorts) {
......@@ -292,7 +295,28 @@ public class TMLCPath {
}
}
// rule9: if no fork, no join, no request: one to one communication
boolean foundReq = true;
if ((forks.size() == 0) && (joins.size() == 0)) {
if (producerPorts != null && producerPorts.size() > 0) {
TMLCPrimitivePort referencePort = producerPorts.get(0);
if (referencePort != null) {
if (referencePort.getPortType() != 2) {
foundReq = false;
}
}
}
if (!foundReq) {
if (producerPorts.size() > 1) {
errorNumber = 9;
faultyComponent = producerPorts.get(1);
} else if (consumerPorts.size() > 1) {
errorNumber = 9;
faultyComponent = consumerPorts.get(1);
}
}
}
}
......
/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
*
*
* ludovic.apvrille AT enst.fr
*
*
* This software is a computer program whose purpose is to allow the
* edition of TURTLE analysis, design and deployment diagrams, to
* allow the generation of RT-LOTOS or Java code from this diagram,
* and at last to allow the analysis of formal validation traces
* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
* from INRIA Rhone-Alpes.
*
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
* modify and/ or redistribute the software under the terms of the CeCILL
* license as circulated by CEA, CNRS and INRIA at the following URL
* "http://www.cecill.info".
*
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
* liability.
*
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* software by the user in light of its specific status of free software,
......@@ -31,7 +31,7 @@
* requirements in conditions enabling the security of their systems and/or
* data to be ensured and, more generally, to use and operate it in the
* same conditions as regards security.
*
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL license and that you accept its terms.
*/
......@@ -60,11 +60,11 @@ import java.awt.*;
import java.util.Vector;
/**
* Class TMLCPrimitivePort
* Primitive port. To be used in TML component task diagrams
* Creation: 12/03/2008
* @version 1.0 12/03/2008
* @author Ludovic APVRILLE
* Class TMLCPrimitivePort
* Primitive port. To be used in TML component task diagrams
* Creation: 12/03/2008
* @version 1.0 12/03/2008
* @author Ludovic APVRILLE
*/
public abstract class TMLCPrimitivePort extends TGCScalableWithInternalComponent implements SwallowedTGComponent, WithAttributes {
protected Color myColor;
......@@ -112,8 +112,9 @@ public abstract class TMLCPrimitivePort extends TGCScalableWithInternalComponent
protected String conflictMessage;
protected String dataFlowType = "VOID";
protected String associatedEvent = "VOID";
public String referenceReq = "";
public String referenceReq = "";
public int verification;
public TMLCPrimitivePort(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp) {
super(_x, _y, _minX, _maxX, _minY, _maxY, _pos, _father, _tdp);
......@@ -390,7 +391,7 @@ public abstract class TMLCPrimitivePort extends TGCScalableWithInternalComponent
}
}
public void drawConfVerification(Graphics g){
int lockwidth=(int) (9*tdp.getZoom());
......@@ -548,14 +549,14 @@ public abstract class TMLCPrimitivePort extends TGCScalableWithInternalComponent
TMLCPrimitiveComponent tgc = (TMLCPrimitiveComponent)(getFather());
otherTypes = tgc.getAllRecords();
}
Vector<String> refs = new Vector<String>();
for (TGComponent req: tdp.getMGUI().getAllRequirements()){
//System.out.println("req " + req);
if (req instanceof AvatarRDRequirement){
refs.add(((AvatarRDRequirement) req).getID()+ ":" + ((AvatarRDRequirement) req).getText().trim());
}
}
Vector<String> refs = new Vector<String>();
for (TGComponent req: tdp.getMGUI().getAllRequirements()){
//System.out.println("req " + req);
if (req instanceof AvatarRDRequirement){
refs.add(((AvatarRDRequirement) req).getID()+ ":" + ((AvatarRDRequirement) req).getText().trim());
}
}
JDialogTMLCompositePort jda = new JDialogTMLCompositePort(commName, typep, list[0], list[1], list[2], list[3], list[4], isOrigin, isFinite, isBlocking, ""+maxSamples, ""+widthSamples, isLossy, lossPercentage, maxNbOfLoss, frame, "Port properties", otherTypes, dataFlowType, associatedEvent, isPrex, isPostex, checkConf, checkAuth, referenceReq, refs);
// jda.setSize(350, 700);
GraphicLib.centerOnParent(jda, 350, 700 );
......@@ -588,7 +589,7 @@ public abstract class TMLCPrimitivePort extends TGCScalableWithInternalComponent
oldTypep = typep;
typep = jda.getPortType();
checkConf = jda.checkConf;
referenceReq = jda.getReferenceReq();
referenceReq = jda.getReferenceReq();
if (checkConf){
if (checkConfStatus==NOCHECK){
checkConfStatus=TOCHECK;
......@@ -950,43 +951,43 @@ public abstract class TMLCPrimitivePort extends TGCScalableWithInternalComponent
}
public boolean hasSameParametersThan(TMLCPrimitivePort _p) {
for(int i=0; i<5; i++) {
if (!(getParamAt(i).equals(_p.getParamAt(i)))) {
return false;
}
}
return true;
for(int i=0; i<5; i++) {
if (!(getParamAt(i).equals(_p.getParamAt(i)))) {
return false;
}
}
return true;
}
public void setPortName(String s) {
for (TURTLEPanel tp: tdp.getMainGUI().tabs)
for (TDiagramPanel t: tp.getPanels()) {
for (TGComponent t2: t.getComponentList()) {
if (t2 instanceof TMLArchiCPNode) {
TMLArchiCPNode tacn = (TMLArchiCPNode) t2;
for (TGComponent tgc: tacn.getRecursiveAllInternalComponent()) {
if (tgc instanceof TMLArchiPortArtifact) {
TMLArchiPortArtifact tapi = (TMLArchiPortArtifact) tgc;
String tmp = tapi.getValue().replaceAll("(?i)" + commName + "$", s);
tapi.setValue(tmp);
}
}
}
if (t2 instanceof TMLADWriteChannel) {
TMLADWriteChannel twc = (TMLADWriteChannel) t2;
if (twc.getChannelName().equals(commName))
twc.setChannelName(s);
}
if (t2 instanceof TMLADReadChannel) {
TMLADReadChannel twc = (TMLADReadChannel) t2;
if (twc.getChannelName().equals(commName))
twc.setChannelName(s);
}
}
t.repaint();
}
for (TURTLEPanel tp: tdp.getMainGUI().tabs)
for (TDiagramPanel t: tp.getPanels()) {
for (TGComponent t2: t.getComponentList()) {
if (t2 instanceof TMLArchiCPNode) {
TMLArchiCPNode tacn = (TMLArchiCPNode) t2;
for (TGComponent tgc: tacn.getRecursiveAllInternalComponent()) {
if (tgc instanceof TMLArchiPortArtifact) {
TMLArchiPortArtifact tapi = (TMLArchiPortArtifact) tgc;
String tmp = tapi.getValue().replaceAll("(?i)" + commName + "$", s);
tapi.setValue(tmp);
}
}