diff --git a/modeling/AvatarFunctions/exampleFunctionCall.java.xml b/modeling/AvatarFunctions/exampleFunctionCall.java.xml index 39d4cc97b0a253d7609b1f6cd7014e7a160d6572..5b50e31e36d50f2a653e3537551e462e4f98a7a3 100644 --- a/modeling/AvatarFunctions/exampleFunctionCall.java.xml +++ b/modeling/AvatarFunctions/exampleFunctionCall.java.xml @@ -28,7 +28,7 @@ </CONNECTOR> <COMPONENT type="302" id="19" > <cdparam x="351" y="389" /> -<sizeparam width="409" height="97" minWidth="80" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="375" height="97" minWidth="80" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> <infoparam name="Proverif Pragma" value="#InitialSystemKnowledge Bob.skey Alice.skey @@ -731,7 +731,7 @@ <MainCode value="void __user_init() {"/> <MainCode value="}"/> <Optimized value="true" /> -<Validated value="" /> +<Validated value="SendReceiveMessage;Alice;Bob;" /> <Ignored value="" /> <CONNECTOR type="5002" id="299" > @@ -751,8 +751,8 @@ </extraparam> </CONNECTOR> <COMPONENT type="302" id="316" > -<cdparam x="351" y="389" /> -<sizeparam width="409" height="97" minWidth="80" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="350" y="372" /> +<sizeparam width="375" height="97" minWidth="80" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> <infoparam name="Proverif Pragma" value="#InitialSystemKnowledge Bob.skey Alice.skey diff --git a/simulators/c++2/src_simulator/definitions.h b/simulators/c++2/src_simulator/definitions.h index 5a01faf5c8a62098814d5e1c84369cfffd1840c7..7cfbf5b1f594f536cac06dfcb26d9ae253d6dd2d 100644 --- a/simulators/c++2/src_simulator/definitions.h +++ b/simulators/c++2/src_simulator/definitions.h @@ -89,7 +89,7 @@ using std::max; //cost of a send/wait command #define WAIT_SEND_VLEN 1 //activate tis flag to take penalties (energy mode, branch prediction, context switch) into account -#define PENALTIES_ENABLED +#undef PENALTIES_ENABLED //enables the state hash feature #undef STATE_HASH_ENABLED //enables listerns for interactive simulation, switch off for fast simulation in command line mode diff --git a/src/ui/TDiagramPanel.java b/src/ui/TDiagramPanel.java index 24931e9e52a59d4fa62d4ee9357b2bc56ac235bc..9c37f5f0a7841b8678919b7b236939f7295f4864 100755 --- a/src/ui/TDiagramPanel.java +++ b/src/ui/TDiagramPanel.java @@ -388,11 +388,11 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { for(int i=componentList.size()-1; i>=0; i--) { tgc = this.componentList.get(i); if (!tgc.isHidden()) { - TraceManager.addDev("Painting " + tgc.getName() + " x=" + tgc.getX() + " y=" + tgc.getY()); + //TraceManager.addDev("Painting " + tgc.getName() + " x=" + tgc.getX() + " y=" + tgc.getY()); tgc.draw(g); } else { - TraceManager.addDev("Ignoring " + tgc.getName() + " x=" + tgc.getX() + " y=" + tgc.getY()); + //TraceManager.addDev("Ignoring " + tgc.getName() + " x=" + tgc.getX() + " y=" + tgc.getY()); } } } diff --git a/src/ui/TMLArchiPanel.java b/src/ui/TMLArchiPanel.java index 23a4fff09b280127ccab42a736314bc4169f0f71..b66699325235d6ab070103e40ce70e8c82881bb8 100755 --- a/src/ui/TMLArchiPanel.java +++ b/src/ui/TMLArchiPanel.java @@ -80,6 +80,10 @@ public class TMLArchiPanel extends TURTLEPanel { //Class diagram tmlap = new TMLArchiDiagramPanel(mgui, toolBarTML); tmlap.setName("DIPLODOCUS architecture and mapping Diagram"); + toolBarTML.setPanel(tmlap); + // Diagram toolbar + + tmlap.tp = this; tdp = tmlap; panels.add(tmlap); // Always first in list diff --git a/src/ui/tmldd/TMLArchiArtifact.java b/src/ui/tmldd/TMLArchiArtifact.java index 7c9ab883a9072b439efa6aed775a2619104c2eab..bb40d8b9bb37391156cc1d85d775b46da6317ea2 100755 --- a/src/ui/tmldd/TMLArchiArtifact.java +++ b/src/ui/tmldd/TMLArchiArtifact.java @@ -57,7 +57,7 @@ import ui.*; import ui.window.*; import tmltranslator.modelcompiler.*; -public class TMLArchiArtifact extends TGCWithoutInternalComponent implements SwallowedTGComponent, WithAttributes { +public class TMLArchiArtifact extends TGCWithoutInternalComponent implements SwallowedTGComponent, WithAttributes, TMLArchiTask { protected int lineLength = 5; protected int textX = 5; protected int textY = 15; @@ -100,6 +100,16 @@ public class TMLArchiArtifact extends TGCWithoutInternalComponent implements Swa myImageIcon = IconManager.imgic702; } + public boolean isHidden() { + TraceManager.addDev("Am I hidden?" + getValue()); + if (tdp != null) { + if (tdp instanceof TMLArchiDiagramPanel) { + return !(((TMLArchiDiagramPanel)(tdp)).inCurrentView(this)); + } + } + return false; + } + public int getPriority() { return priority; } diff --git a/src/ui/tmldd/TMLArchiBUSNode.java b/src/ui/tmldd/TMLArchiBUSNode.java index dd078e7be45eec27814ece8037d619d3516abb16..44c0a69c86d8e3ecd0edf39c2c81be51d7d01382 100755 --- a/src/ui/tmldd/TMLArchiBUSNode.java +++ b/src/ui/tmldd/TMLArchiBUSNode.java @@ -58,7 +58,7 @@ import ui.window.*; import tmltranslator.*; -public class TMLArchiBUSNode extends TMLArchiCommunicationNode implements SwallowTGComponent, WithAttributes { +public class TMLArchiBUSNode extends TMLArchiCommunicationNode implements SwallowTGComponent, WithAttributes, TMLArchiElement { private int textY1 = 15; private int textY2 = 30; private int derivationx = 2; diff --git a/src/ui/tmldd/TMLArchiBridgeNode.java b/src/ui/tmldd/TMLArchiBridgeNode.java index 6021f0752f4faa4451434fa93e0506d64e98299e..77f812574862e4e365cb4bca793644840807de98 100755 --- a/src/ui/tmldd/TMLArchiBridgeNode.java +++ b/src/ui/tmldd/TMLArchiBridgeNode.java @@ -58,7 +58,7 @@ import ui.window.*; import tmltranslator.*; -public class TMLArchiBridgeNode extends TMLArchiCommunicationNode implements SwallowTGComponent, WithAttributes { +public class TMLArchiBridgeNode extends TMLArchiCommunicationNode implements SwallowTGComponent, WithAttributes, TMLArchiElement { private int textY1 = 15; private int textY2 = 30; private int derivationx = 2; @@ -111,7 +111,9 @@ public class TMLArchiBridgeNode extends TMLArchiCommunicationNode implements Swa myImageIcon = IconManager.imgic700; } + public void internalDrawing(Graphics g) { + Color c = g.getColor(); g.draw3DRect(x, y, width, height, true); diff --git a/src/ui/tmldd/TMLArchiDiagramPanel.java b/src/ui/tmldd/TMLArchiDiagramPanel.java index a1f8c66d4e084f08992bbec8f3eed897c859375c..2a3549a5eb68d7dee3d7c79632b666da37475e93 100755 --- a/src/ui/tmldd/TMLArchiDiagramPanel.java +++ b/src/ui/tmldd/TMLArchiDiagramPanel.java @@ -54,8 +54,16 @@ import java.util.*; import ui.*; public class TMLArchiDiagramPanel extends TDiagramPanel implements TDPWithAttributes { + + public static final int VIEW_ALL = 0; + public static final int VIEW_ARCHITECTURE_ONLY = 1; + private int masterClockFrequency = 200; // in MHz + protected int view = VIEW_ALL; + + + public TMLArchiDiagramPanel(MainGUI mgui, TToolBar _ttb) { super(mgui, _ttb); /*TDiagramMouseManager tdmm = new TDiagramMouseManager(this); @@ -377,4 +385,20 @@ public class TMLArchiDiagramPanel extends TDiagramPanel implements TDPWithAttrib return prio; } + public void setCurrentView(int _index) { + TraceManager.addDev("SelectedIndex=" + _index); + view = _index; + } + + public boolean inCurrentView(TGComponent tgc) { + switch(view) { + case VIEW_ALL: + return true; + case VIEW_ARCHITECTURE_ONLY: + return (tgc instanceof TMLArchiElement); + default: + return true; + } + } + }//End of class diff --git a/src/ui/tmldd/TMLArchiDiagramToolBar.java b/src/ui/tmldd/TMLArchiDiagramToolBar.java index f98507647cfd3b8640ce11f6eb14aee1ba98436b..2e2b345fcf3138deedc2a3e05afdef9cf6610a33 100755 --- a/src/ui/tmldd/TMLArchiDiagramToolBar.java +++ b/src/ui/tmldd/TMLArchiDiagramToolBar.java @@ -1,49 +1,49 @@ /**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille, Andrea Enrici -ludovic.apvrille AT telecom-paristech.fr -andrea.enrici AT telecom-paristech.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, -that may mean that it is complicated to manipulate, and that also -therefore means that it is reserved for developers and experienced -professionals having in-depth computer knowledge. Users are therefore -encouraged to load and test the software's suitability as regards their -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. - -/** - * Class TMLArchiDiagramToolBar - * Implements the toolbar to be used in conjunction with the panel of a TML Architecture diagram - * Creation: 18/09/2007 - * @version 1.0 18/09/2007 - * @author Ludovic APVRILLE - * @see TClassDiagramPanel - */ + ludovic.apvrille AT telecom-paristech.fr + andrea.enrici AT telecom-paristech.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, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + 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. + + /** + * Class TMLArchiDiagramToolBar + * Implements the toolbar to be used in conjunction with the panel of a TML Architecture diagram + * Creation: 18/09/2007 + * @version 1.0 18/09/2007 + * @author Ludovic APVRILLE + * @see TClassDiagramPanel + */ package ui.tmldd; @@ -52,89 +52,94 @@ import java.awt.*; import java.awt.event.*; import ui.*; +import myutil.*; + +public class TMLArchiDiagramToolBar extends TToolBar implements ActionListener { + + protected JComboBox box; + protected static String[] viewInfos = { "View all", "View architecture only", "View task mapping"}; + protected TMLArchiDiagramPanel panel; -public class TMLArchiDiagramToolBar extends TToolBar { - public TMLArchiDiagramToolBar(MainGUI _mgui) { super(_mgui); } - + protected void setActive(boolean b) { mgui.actions[TGUIAction.TMLARCHI_EDIT].setEnabled(b); mgui.actions[TGUIAction.UML_NOTE].setEnabled(b); mgui.actions[TGUIAction.CONNECTOR_COMMENT].setEnabled(b); mgui.actions[TGUIAction.TMLARCHI_LINK].setEnabled(b); mgui.actions[TGUIAction.TMLARCHI_CPUNODE].setEnabled(b); - mgui.actions[TGUIAction.TMLARCHI_HWANODE].setEnabled(b); - mgui.actions[TGUIAction.TMLARCHI_BUSNODE].setEnabled(b); - mgui.actions[TGUIAction.TMLARCHI_CPNODE].setEnabled(b); - mgui.actions[TGUIAction.TMLARCHI_BRIDGENODE].setEnabled(b); + mgui.actions[TGUIAction.TMLARCHI_HWANODE].setEnabled(b); + mgui.actions[TGUIAction.TMLARCHI_BUSNODE].setEnabled(b); + mgui.actions[TGUIAction.TMLARCHI_CPNODE].setEnabled(b); + mgui.actions[TGUIAction.TMLARCHI_BRIDGENODE].setEnabled(b); mgui.actions[TGUIAction.TMLARCHI_ARTIFACT].setEnabled(b); - mgui.actions[TGUIAction.TMLARCHI_COMMUNICATION_ARTIFACT].setEnabled(b); - mgui.actions[TGUIAction.TMLARCHI_KEY].setEnabled(b); - mgui.actions[TGUIAction.TMLARCHI_PORT_ARTIFACT].setEnabled(b); - mgui.actions[TGUIAction.TMLARCHI_EVENT_ARTIFACT].setEnabled(b); - mgui.actions[TGUIAction.TMLARCHI_MEMORYNODE].setEnabled(b); - mgui.actions[TGUIAction.TMLARCHI_DMANODE].setEnabled(b); - mgui.actions[TGUIAction.ACT_TOGGLE_ATTR].setEnabled(b); - mgui.actions[TGUIAction.ACT_TOGGLE_DIPLO_ID].setEnabled(b); - - mgui.actions[TGUIAction.ACT_SHOW_ZOOM].setEnabled(false); - - mgui.actions[TGUIAction.ACT_MODEL_CHECKING].setEnabled(b); - mgui.actions[TGUIAction.ACT_ONECLICK_LOTOS_RG].setEnabled(b); - mgui.actions[TGUIAction.ACT_SIMU_SYSTEMC].setEnabled(b); - - mgui.updateZoomInfo(); + mgui.actions[TGUIAction.TMLARCHI_COMMUNICATION_ARTIFACT].setEnabled(b); + mgui.actions[TGUIAction.TMLARCHI_KEY].setEnabled(b); + mgui.actions[TGUIAction.TMLARCHI_PORT_ARTIFACT].setEnabled(b); + mgui.actions[TGUIAction.TMLARCHI_EVENT_ARTIFACT].setEnabled(b); + mgui.actions[TGUIAction.TMLARCHI_MEMORYNODE].setEnabled(b); + mgui.actions[TGUIAction.TMLARCHI_DMANODE].setEnabled(b); + mgui.actions[TGUIAction.ACT_TOGGLE_ATTR].setEnabled(b); + mgui.actions[TGUIAction.ACT_TOGGLE_DIPLO_ID].setEnabled(b); + + mgui.actions[TGUIAction.ACT_SHOW_ZOOM].setEnabled(false); + + mgui.actions[TGUIAction.ACT_MODEL_CHECKING].setEnabled(b); + mgui.actions[TGUIAction.ACT_ONECLICK_LOTOS_RG].setEnabled(b); + mgui.actions[TGUIAction.ACT_SIMU_SYSTEMC].setEnabled(b); + + mgui.updateZoomInfo(); } - + protected void setButtons() { JButton button; - + button = this.add(mgui.actions[TGUIAction.TMLARCHI_EDIT]); button.addMouseListener(mgui.mouseHandler); - + this.addSeparator(); - + button = this.add(mgui.actions[TGUIAction.UML_NOTE]); button.addMouseListener(mgui.mouseHandler); - + button = this.add(mgui.actions[TGUIAction.CONNECTOR_COMMENT]); button.addMouseListener(mgui.mouseHandler); - + this.addSeparator(); - + button = this.add(mgui.actions[TGUIAction.TMLARCHI_LINK]); button.addMouseListener(mgui.mouseHandler); - + this.addSeparator(); - + button = this.add(mgui.actions[TGUIAction.TMLARCHI_CPUNODE]); button.addMouseListener(mgui.mouseHandler); - button = this.add(mgui.actions[TGUIAction.TMLARCHI_HWANODE]); + button = this.add(mgui.actions[TGUIAction.TMLARCHI_HWANODE]); button.addMouseListener(mgui.mouseHandler); button = this.add(mgui.actions[TGUIAction.TMLARCHI_ARTIFACT]); button.addMouseListener(mgui.mouseHandler); - + this.addSeparator(); - + button = this.add(mgui.actions[TGUIAction.TMLARCHI_DMANODE]); button.addMouseListener(mgui.mouseHandler); - - this.addSeparator(); - - button = this.add(mgui.actions[TGUIAction.TMLARCHI_BUSNODE]); + + this.addSeparator(); + + button = this.add(mgui.actions[TGUIAction.TMLARCHI_BUSNODE]); button.addMouseListener(mgui.mouseHandler); - button = this.add(mgui.actions[TGUIAction.TMLARCHI_BRIDGENODE]); + button = this.add(mgui.actions[TGUIAction.TMLARCHI_BRIDGENODE]); button.addMouseListener(mgui.mouseHandler); - button = this.add(mgui.actions[TGUIAction.TMLARCHI_MEMORYNODE]); + button = this.add(mgui.actions[TGUIAction.TMLARCHI_MEMORYNODE]); button.addMouseListener(mgui.mouseHandler); - + if (MainGUI.experimentalOn) { - button = this.add(mgui.actions[TGUIAction.TMLARCHI_CPNODE]); - button.addMouseListener(mgui.mouseHandler); - button = this.add(mgui.actions[TGUIAction.TMLARCHI_EVENT_ARTIFACT]); - button.addMouseListener(mgui.mouseHandler); + button = this.add(mgui.actions[TGUIAction.TMLARCHI_CPNODE]); + button.addMouseListener(mgui.mouseHandler); + button = this.add(mgui.actions[TGUIAction.TMLARCHI_EVENT_ARTIFACT]); + button.addMouseListener(mgui.mouseHandler); } button = this.add(mgui.actions[TGUIAction.TMLARCHI_COMMUNICATION_ARTIFACT]); button.addMouseListener(mgui.mouseHandler); @@ -145,12 +150,46 @@ public class TMLArchiDiagramToolBar extends TToolBar { this.addSeparator(); button = this.add(mgui.actions[TGUIAction.ACT_TOGGLE_ATTR]); + button = this.add(mgui.actions[TGUIAction.TMLARCHI_COMMUNICATION_ARTIFACT]); + button.addMouseListener(mgui.mouseHandler); + button = this.add(mgui.actions[TGUIAction.TMLARCHI_PORT_ARTIFACT]); + button.addMouseListener(mgui.mouseHandler); + button = this.add(mgui.actions[TGUIAction.TMLARCHI_KEY]); + button.addMouseListener(mgui.mouseHandler); + this.addSeparator(); + + button = this.add(mgui.actions[TGUIAction.ACT_TOGGLE_ATTR]); + button.addMouseListener(mgui.mouseHandler); + + button = this.add(mgui.actions[TGUIAction.ACT_TOGGLE_DIPLO_ID]); button.addMouseListener(mgui.mouseHandler); this.addSeparator(); button = this.add(mgui.actions[TGUIAction.ACT_TOGGLE_DIPLO_ID]); button.addMouseListener(mgui.mouseHandler); + + this.addSeparator(); + if (viewInfos == null) { + TraceManager.addDev("null viewInfos"); + } + box = new JComboBox(viewInfos); + this.add(box); + box.addActionListener(this); + } + + public void setPanel(TMLArchiDiagramPanel _panel) { + panel = _panel; + } + + + public void actionPerformed(ActionEvent e) { + if (e.getSource() == box) { + if (panel != null) { + panel.setCurrentView(box.getSelectedIndex()); + } + } } +} } // Class diff --git a/src/ui/tmldd/TMLArchiElement.java b/src/ui/tmldd/TMLArchiElement.java new file mode 100755 index 0000000000000000000000000000000000000000..6eecf72dbd37dbef9b451386be21ffb679c34c07 --- /dev/null +++ b/src/ui/tmldd/TMLArchiElement.java @@ -0,0 +1,61 @@ +/**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, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + 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. + + /** + * Class TMLArchiElement + * Interface of an architecture element + * Creation: 12/09/2016 + * @version 1.0 12/09/2016 + * @author Ludovic APVRILLE + * @see + */ + +package ui.tmldd; + +import java.awt.*; +import java.util.*; +import javax.swing.*; + +import org.w3c.dom.*; + +import myutil.*; +import ui.*; +import ui.window.*; +import tmltranslator.modelcompiler.*; + +public interface TMLArchiElement { +} diff --git a/src/ui/tmldd/TMLArchiNode.java b/src/ui/tmldd/TMLArchiNode.java index dab84991a282bd43cb14732cacaeb5b1f153a5fc..cc8fc6fa1e0acfb56f4bb1b511b9ed11f268d81f 100755 --- a/src/ui/tmldd/TMLArchiNode.java +++ b/src/ui/tmldd/TMLArchiNode.java @@ -59,7 +59,7 @@ import ui.window.*; import tmltranslator.*; import tmltranslator.modelcompiler.*; -public abstract class TMLArchiNode extends TGCWithInternalComponent implements SwallowTGComponent { +public abstract class TMLArchiNode extends TGCWithInternalComponent implements SwallowTGComponent, TMLArchiElement { protected int clockRatio = HwNode.DEFAULT_CLOCK_RATIO; //the return type of method getComponentType @@ -67,12 +67,23 @@ public abstract class TMLArchiNode extends TGCWithInternalComponent implements S public final static int TRANSFER = 1; public final static int CONTROLLER = 2; public final static int OTHER = 3; //for CPNodes - protected ArchUnitMEC MECType = new CpuMEC(); + protected ArchUnitMEC MECType = new CpuMEC(); public TMLArchiNode(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); } + public boolean isHidden() { + //TraceManager.addDev("Am I hidden?" + getValue()); + if (tdp != null) { + if (tdp instanceof TMLArchiDiagramPanel) { + + return !(((TMLArchiDiagramPanel)(tdp)).inCurrentView(this)); + } + } + return true; + } + public ArrayList<TMLArchiArtifact> getAllTMLArchiArtifacts() { ArrayList<TMLArchiArtifact> artifacts = new ArrayList<TMLArchiArtifact>(); @@ -91,8 +102,8 @@ public abstract class TMLArchiNode extends TGCWithInternalComponent implements S return clockRatio; } - public ArchUnitMEC getMECType() { - return MECType; - } + public ArchUnitMEC getMECType() { + return MECType; + } } diff --git a/src/ui/tmldd/TMLArchiTask.java b/src/ui/tmldd/TMLArchiTask.java new file mode 100755 index 0000000000000000000000000000000000000000..817b17631f1789926dcb26ce59781202ffdbbe0b --- /dev/null +++ b/src/ui/tmldd/TMLArchiTask.java @@ -0,0 +1,51 @@ +/**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, + that may mean that it is complicated to manipulate, and that also + therefore means that it is reserved for developers and experienced + professionals having in-depth computer knowledge. Users are therefore + encouraged to load and test the software's suitability as regards their + 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. + + /** + * Class TMLArchiTask + * Interface of a mapping task element + * Creation: 12/09/2016 + * @version 1.0 12/09/2016 + * @author Ludovic APVRILLE + * @see + */ + +package ui.tmldd; + + +public interface TMLArchiTask { +} diff --git a/tmlcode/README.txt b/tmlcode/README.txt deleted file mode 100644 index 71f85a927ac9cae37b31b2e37ea4c101f1fd34a1..0000000000000000000000000000000000000000 --- a/tmlcode/README.txt +++ /dev/null @@ -1 +0,0 @@ -This folder is used to store the TML code that is automatically generated from UML/SysMl models in TTool.