Commit 8792d095 authored by Ludovic Apvrille's avatar Ludovic Apvrille

Merge branch 'revert-3fab4456' into 'master'

Revert "Merge branch 'minh_cp_config' into 'master'"

See merge request !183
parents 3fab4456 c6fa6528
......@@ -52,7 +52,10 @@ import ui.tmlad.TMLActivityDiagramPanel;
import ui.tmlcd.TMLTaskDiagramPanel;
import ui.tmlcompd.TMLCPrimitiveComponent;
import ui.tmlcompd.TMLComponentTaskDiagramPanel;
import ui.tmldd.*;
import ui.tmldd.TMLArchiArtifact;
import ui.tmldd.TMLArchiCPUNode;
import ui.tmldd.TMLArchiDiagramPanel;
import ui.tmldd.TMLArchiFirewallNode;
import ui.util.IconManager;
import javax.swing.*;
......@@ -3526,33 +3529,4 @@ public abstract class TGComponent extends AbstractCDElement implements /*CDElem
}
return tgctmp == mainTgc;
}
//#issue 196
//update the mapping configuration of Communication Pattern in Architecture Diagram
public void updateCPNodeConfigAfterRenamingHWNode(String nodeName) {
for (TGComponent _tgc: tdp.getComponentList()) {
if (_tgc instanceof TMLArchiCPNode) {
Vector<String> tmpMappedUnits = ((TMLArchiCPNode)_tgc).getMappedUnits();
for(String ss: tmpMappedUnits) {
int index = ss.indexOf(":");
int indexOfss = tmpMappedUnits.indexOf(ss);
if (index > -1) {
String[] tabOfNames = ss.substring(index+1, ss.length()).trim().split(",");
for (int i=0; i<tabOfNames.length; i++) {
String s = tabOfNames[i].trim();
if (s.length() > 0) {
if (s.equals(name)) {
ss = ss.replaceAll(" " + s, " " + nodeName);
}
}
}
}
tmpMappedUnits.set(indexOfss,ss);
((TMLArchiCPNode)_tgc).setMappedUnits(tmpMappedUnits);
}
}
}
name = nodeName;
}
}
......@@ -236,7 +236,7 @@ public class TMLArchiBUSNode extends TMLArchiCommunicationNode implements Swallo
error = true;
errors += "Name of the node ";
} else {
updateCPNodeConfigAfterRenamingHWNode(tmpName);
name = tmpName;
}
}
......
......@@ -193,7 +193,7 @@ public class TMLArchiBridgeNode extends TMLArchiCommunicationNode implements Swa
error = true;
errors += "Name of the node ";
} else {
updateCPNodeConfigAfterRenamingHWNode(tmpName);
name = tmpName;
}
}
......
......@@ -437,11 +437,6 @@ public class TMLArchiCPNode extends TMLArchiCommunicationNode implements Swallow
return mappedUnits;
}
//#issue 196
public void setMappedUnits(Vector<String> newMappedUnits) {
mappedUnits = newMappedUnits;
}
public int getCPMEC() {
if( cpMEC.equals( "Memory Copy" ) ) {
return CPMEC.CPU_MEMORY_COPY_MEC;
......
......@@ -216,7 +216,7 @@ public class TMLArchiCPUNode extends TMLArchiNode implements SwallowTGComponent,
error = true;
errors += "Name of the node ";
} else {
updateCPNodeConfigAfterRenamingHWNode(tmpName);
name = tmpName;
}
}
// TraceManager.addDev("CPU core 3");
......
......@@ -195,7 +195,7 @@ public class TMLArchiDMANode extends TMLArchiCommunicationNode implements Swallo
error = true;
errors += "Name of the node ";
} else {
updateCPNodeConfigAfterRenamingHWNode(tmpName);
name = tmpName;
}
}
......@@ -338,7 +338,7 @@ public class TMLArchiDMANode extends TMLArchiCommunicationNode implements Swallo
}
public int getComponentType() {
return CONTROLLER;
return TRANSFER;
}
}
......@@ -205,7 +205,7 @@ public class TMLArchiFPGANode extends TMLArchiNode implements SwallowTGComponent
error = true;
errors += "Name of the node ";
} else {
updateCPNodeConfigAfterRenamingHWNode(tmpName);
name = tmpName;
}
}
......
......@@ -197,7 +197,7 @@ public class TMLArchiHWANode extends TMLArchiNode implements SwallowTGComponent,
error = true;
errors += "Name of the node ";
} else {
updateCPNodeConfigAfterRenamingHWNode(tmpName);
name = tmpName;
}
}
......
......@@ -208,7 +208,7 @@ public class TMLArchiMemoryNode extends TMLArchiCommunicationNode implements Swa
error = true;
errors += "Name of the node ";
} else {
updateCPNodeConfigAfterRenamingHWNode(tmpName);
name = tmpName;
}
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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