Commit ed201590 authored by Ludovic Apvrille's avatar Ludovic Apvrille

Merge branch 'latencyDetailedAnalysis' into 'master'

Latency detailed analysis

See merge request !260
parents 42f25c48 503179da
......@@ -26,6 +26,10 @@ dependencies {
compile name:'jautomata-core'
compile name:'com.microsoft.z3'
compileOnly name: 'jna-3.3.0'
compile name: 'jgrapht-core-1.3.0'
compile name: 'jgrapht-ext-1.3.0'
compile name: 'jgrapht-io-1.3.0'
compile name: 'jgraphx-3.4.1.3'
}
jar {
......
......@@ -36,7 +36,6 @@
* knowledge of the CeCILL license and that you accept its terms.
*/
package tmltranslator;
import myutil.TraceManager;
......@@ -44,8 +43,7 @@ import myutil.TraceManager;
import java.util.*;
/**
* Class TMLArchitecture
* Creation: 05/09/2007
* Class TMLArchitecture Creation: 05/09/2007
*
* @author Ludovic APVRILLE
* @version 1.1 19/05/2008
......@@ -59,7 +57,6 @@ public class TMLArchitecture {
private int hashCode;
private boolean hashCodeComputed = false;
public TMLArchitecture() {
init();
}
......@@ -70,10 +67,10 @@ public class TMLArchitecture {
}
private void computeHashCode() {
TMLArchiTextSpecification architxt = new TMLArchiTextSpecification(/*"spec.tarchi"*/);
TMLArchiTextSpecification architxt = new TMLArchiTextSpecification(/* "spec.tarchi" */);
String s = architxt.toTextFormat(this);
hashCode = s.hashCode();
//TraceManager.addDev("TARCHI hashcode = " + hashCode);
// TraceManager.addDev("TARCHI hashcode = " + hashCode);
}
public int getHashCode() {
......@@ -93,7 +90,6 @@ public class TMLArchitecture {
return masterClockFrequency;
}
public void addHwNode(HwNode _node) {
hwnodes.add(_node);
}
......@@ -137,7 +133,6 @@ public class TMLArchitecture {
addHwLink(link);
}
public boolean hasCPU() {
for (HwNode node : hwnodes) {
if (node instanceof HwCPU) {
......@@ -149,7 +144,7 @@ public class TMLArchitecture {
public boolean hasHwExecutionNode() {
for (HwNode node : hwnodes) {
if ((node instanceof HwCPU)|| (node instanceof HwA)|| (node instanceof HwFPGA)) {
if ((node instanceof HwCPU) || (node instanceof HwA) || (node instanceof HwFPGA)) {
return true;
}
}
......@@ -258,7 +253,6 @@ public class TMLArchitecture {
return list;
}
public int getNbOfCPU() {
int cpt = 0;
for (HwNode node : hwnodes) {
......@@ -279,7 +273,6 @@ public class TMLArchitecture {
return cpt;
}
public int getNbOfMem() {
int cpt = 0;
for (HwNode node : hwnodes) {
......@@ -300,9 +293,9 @@ public class TMLArchitecture {
public HwNode getHwNodeByName(String _name) {
for (HwNode node : hwnodes) {
//TraceManager.addDev("Comparing >" + node.getName() + "< vs >" + _name + "<");
// TraceManager.addDev("Comparing >" + node.getName() + "< vs >" + _name + "<");
if (node.getName().compareTo(_name) == 0) {
//TraceManager.addDev("Returning node " + node.getName());
// TraceManager.addDev("Returning node " + node.getName());
return node;
}
}
......@@ -389,7 +382,8 @@ public class TMLArchitecture {
List<HwLink> tempList = new ArrayList<HwLink>();
for (HwLink link : hwlinks) {
if (link.hwnode == node) tempList.add(link);
if (link.hwnode == node)
tempList.add(link);
}
return tempList;
......@@ -406,7 +400,8 @@ public class TMLArchitecture {
public boolean isNodeConnectedToBus(HwNode node, HwBus bus) {
for (HwLink link : hwlinks) {
if (node == link.hwnode && bus == link.bus) return true;
if (node == link.hwnode && bus == link.bus)
return true;
}
return false;
}
......@@ -415,7 +410,8 @@ public class TMLArchitecture {
List<HwLink> tempList = new ArrayList<HwLink>();
for (HwLink link : hwlinks) {
if (link.bus == bus) tempList.add(link);
if (link.bus == bus)
tempList.add(link);
}
return tempList;
......@@ -430,17 +426,17 @@ public class TMLArchitecture {
if (node instanceof HwCPU) {
HwCPU cpu = (HwCPU) node;
complexity += cpu.nbOfCores * cpu.byteDataSize * cpu.pipelineSize;
//TraceManager.addDev("complexity CPU= " + complexity);
// TraceManager.addDev("complexity CPU= " + complexity);
}
if (node instanceof HwBus) {
HwBus bus = (HwBus) node;
complexity += bus.byteDataSize * bus.pipelineSize;
//TraceManager.addDev("complexity bus= " + complexity);
// TraceManager.addDev("complexity bus= " + complexity);
}
}
//TraceManager.addDev("Complexity = " + complexity);
// TraceManager.addDev("Complexity = " + complexity);
return complexity;
}
......@@ -476,11 +472,10 @@ public class TMLArchitecture {
return false;
}
// For NoC manipulation
public void removeAllNonHwExecutionNodes() {
List<HwNode> newList = new ArrayList<HwNode>();
for(HwNode node: hwnodes) {
for (HwNode node : hwnodes) {
if (node instanceof HwExecutionNode) {
newList.add(node);
}
......@@ -489,9 +484,9 @@ public class TMLArchitecture {
}
public HwNoC getHwNoC() {
for(HwNode node: hwnodes) {
for (HwNode node : hwnodes) {
if (node instanceof HwNoC) {
return ((HwNoC)node);
return ((HwNoC) node);
}
}
return null;
......@@ -503,17 +498,60 @@ public class TMLArchitecture {
}
public boolean equalSpec(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
TMLArchitecture that = (TMLArchitecture) o;
TMLComparingMethod comp = new TMLComparingMethod();
if (!comp.isHwNodeListEquals(hwnodes, that.hwnodes)) return false;
if (!comp.isHwNodeListEquals(hwnodes, that.hwnodes))
return false;
if(!comp.isHwlinkListEquals(hwlinks, that.hwlinks)) return false;
if (!comp.isHwlinkListEquals(hwlinks, that.hwlinks))
return false;
return masterClockFrequency == that.masterClockFrequency;
}
public List<HwNode> getBUSs() {
List<HwNode> buss = new ArrayList<HwNode>();
for (HwNode node : hwnodes) {
if (node instanceof HwBus) {
buss.add(node);
}
}
return buss;
}
public List<HwMemory> getMemories() {
List<HwMemory> list = new ArrayList<HwMemory>();
for (HwNode node : hwnodes) {
if (node instanceof HwMemory) {
HwMemory memory = (HwMemory) node;
list.add(memory);
}
}
return list;
}
public List<HwBridge> getHwBridge() {
List<HwBridge> bridgeList = new ArrayList<HwBridge>();
for (HwNode node : hwnodes) {
if (node instanceof HwBridge) {
HwBridge bridge = (HwBridge) node;
bridgeList.add(bridge);
}
}
return bridgeList;
}
}
This diff is collapsed.
This diff is collapsed.
......@@ -36,7 +36,6 @@
* knowledge of the CeCILL license and that you accept its terms.
*/
package ui;
import common.ConfigurationTTool;
......@@ -48,19 +47,16 @@ import javax.swing.*;
//import java.awt.*;
//import java.awt.event.*;
/**
* Class JMenuBarTurtle
* Creation: 09/12/2003
* Version 1.0 09/12/2003
* Version 1.5 11/10/2018
* Class JMenuBarTurtle Creation: 09/12/2003 Version 1.0 09/12/2003 Version 1.5
* 11/10/2018
*
* @author Ludovic APVRILLE, Arthur VUAGNIAUX
*/
public class JMenuBarTurtle extends JMenuBar {
private JMenu menugraph;
//Menu
// Menu
private JMenu file, saveLastGraph, diagram, cd, ad, iod, ucd, sd, edit, vAndV, codeG, view, tool, capture, ontologies, help;
public JMenuBarTurtle(MainGUI mgui) {
......@@ -80,7 +76,6 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.addActionListener(mgui);
}
public void makeFileMenu(MainGUI mgui) {
JMenuItem menuItem;
......@@ -172,8 +167,9 @@ public class JMenuBarTurtle extends JMenuBar {
if (ConfigurationTTool.LastOpenFileDefined) {
file.addSeparator();
for(int i=0; i<ConfigurationTTool.LastOpenFiles.length;i++){
//TraceManager.addDev("Considering last open file: " + ConfigurationTTool.LastOpenFiles[i]);
for (int i = 0; i < ConfigurationTTool.LastOpenFiles.length; i++) {
// TraceManager.addDev("Considering last open file: " +
// ConfigurationTTool.LastOpenFiles[i]);
if ((ConfigurationTTool.LastOpenFiles[i] != null) && (ConfigurationTTool.LastOpenFiles[i].length() > 0)) {
menuItem = file.add(mgui.actionsLast[i]);
menuItem.addMouseListener(mgui.mouseHandler);
......@@ -203,7 +199,7 @@ public class JMenuBarTurtle extends JMenuBar {
JMenuItem menuItem;
makeFileMenu(mgui);
//Edit
// Edit
menuItem = edit.add(mgui.actions[TGUIAction.ACT_CUT]);
menuItem.setName("Edit Cut");
menuItem.addMouseListener(mgui.mouseHandler);
......@@ -290,10 +286,12 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem = iod.add(mgui.actions[TGUIAction.IOD_PARALLEL]);
menuItem.setName("Iod Parallel");
menuItem.addMouseListener(mgui.mouseHandler);
/*menuItem = iod.add(mgui.actions[TGUIAction.IOD_SEQUENCE]);
menuItem.addMouseListener(mgui.mouseHandler);
menuItem = iod.add(mgui.actions[TGUIAction.IOD_PREEMPTION]);
menuItem.addMouseListener(mgui.mouseHandler);*/
/*
* menuItem = iod.add(mgui.actions[TGUIAction.IOD_SEQUENCE]);
* menuItem.addMouseListener(mgui.mouseHandler); menuItem =
* iod.add(mgui.actions[TGUIAction.IOD_PREEMPTION]);
* menuItem.addMouseListener(mgui.mouseHandler);
*/
menuItem = iod.add(mgui.actions[TGUIAction.IOD_CHOICE]);
menuItem.setName("Iod Choice");
menuItem.addMouseListener(mgui.mouseHandler);
......@@ -528,7 +526,6 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("V&V Gen RTLOTOS");
menuItem.addMouseListener(mgui.mouseHandler);
if (MainGUI.lotosOn) {
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_LOTOS]);
menuItem.setName("V&V Gen LOTOS");
......@@ -547,10 +544,12 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("V&V Gen Design");
menuItem.addMouseListener(mgui.mouseHandler);
/*vAndV.addSeparator();
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_JAVA]);
menuItem.addMouseListener(mgui.mouseHandler);*/
/*
* vAndV.addSeparator();
*
* menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_JAVA]);
* menuItem.addMouseListener(mgui.mouseHandler);
*/
vAndV.addSeparator();
......@@ -592,13 +591,15 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("V&V Saved Aut");
menuItem.addMouseListener(mgui.mouseHandler);
/*vAndV.addSeparator();
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_AUT]);
menuItem.addMouseListener(mgui.mouseHandler);
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_AUTPROJ]);
menuItem.addMouseListener(mgui.mouseHandler);
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_SAVED_AUT]);
menuItem.addMouseListener(mgui.mouseHandler);*/
/*
* vAndV.addSeparator(); menuItem =
* vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_AUT]);
* menuItem.addMouseListener(mgui.mouseHandler); menuItem =
* vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_AUTPROJ]);
* menuItem.addMouseListener(mgui.mouseHandler); menuItem =
* vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_SAVED_AUT]);
* menuItem.addMouseListener(mgui.mouseHandler);
*/
vAndV.addSeparator();
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_AVATAR_SIM]);
......@@ -614,13 +615,13 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("V&V Avatar Static Analysis");
menuItem.addMouseListener(mgui.mouseHandler);
/*vAndV.addSeparator();
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_DEADLOCK_SEEKER_AUT]);
menuItem.addMouseListener(mgui.mouseHandler);
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_DEADLOCK_SEEKER_SAVED_AUT]);
menuItem.addMouseListener(mgui.mouseHandler);*/
/*
* vAndV.addSeparator(); menuItem =
* vAndV.add(mgui.actions[TGUIAction.ACT_DEADLOCK_SEEKER_AUT]);
* menuItem.addMouseListener(mgui.mouseHandler); menuItem =
* vAndV.add(mgui.actions[TGUIAction.ACT_DEADLOCK_SEEKER_SAVED_AUT]);
* menuItem.addMouseListener(mgui.mouseHandler);
*/
// Code generation
......@@ -646,6 +647,13 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("CodeG Executable");
menuItem.addMouseListener(mgui.mouseHandler);
if (mgui.isExperimentalOn()) {
vAndV.addSeparator();
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_LATENCY_GRAPH]);
menuItem.setName("Latency Detailed Analysis");
menuItem.addMouseListener(mgui.mouseHandler);
}
// View
menuItem = view.add(mgui.actions[TGUIAction.ACT_VIEW_BIRDEYES_EMB]);
menuItem.setName("View Hide Birdeye");
......@@ -704,14 +712,12 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("View Saved Graph");
menuItem.addMouseListener(mgui.mouseHandler);
/*if (MainGUI.systemcOn) {
view.addSeparator();
menuItem = view.add(mgui.actions[TGUIAction.ACT_VIEW_WAVE]);
menuItem.addMouseListener(mgui.mouseHandler);
view.addSeparator();
menugraph = new JMenu("View generated automata");
view.add(menugraph);
}*/
/*
* if (MainGUI.systemcOn) { view.addSeparator(); menuItem =
* view.add(mgui.actions[TGUIAction.ACT_VIEW_WAVE]);
* menuItem.addMouseListener(mgui.mouseHandler); view.addSeparator(); menugraph
* = new JMenu("View generated automata"); view.add(menugraph); }
*/
// Tool
capture = new JMenu("Capture");
......@@ -739,7 +745,6 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("Capture Selected");
menuItem.addMouseListener(mgui.mouseHandler);
ontologies = new JMenu("Ontologies");
tool.add(ontologies);
menuItem = ontologies.add(mgui.actions[TGUIAction.ACT_GENERATE_ONTOLOGIES_CURRENT_DIAGRAM]);
......@@ -777,7 +782,6 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("Tool Search");
menuItem.addMouseListener(mgui.mouseHandler);
// HELP
menuItem = help.add(mgui.actions[TGUIAction.ACT_INTEGRATED_HELP]);
menuItem.setName("Help");
......@@ -806,14 +810,14 @@ public class JMenuBarTurtle extends JMenuBar {
// MenuBar
add(file);
add(edit);
//add(diagram);
// add(diagram);
add(vAndV);
add(codeG);
add(view);
add(tool);
add(help);
//menuItem.setName("Menu Item");
// menuItem.setName("Menu Item");
}
} // Class
This diff is collapsed.
......@@ -183,6 +183,7 @@ public class ModeManager {
actions[TGUIAction.ACT_GEN_AUT].setEnabled(true);
actions[TGUIAction.ACT_GEN_AUTS].setEnabled(true);
actions[TGUIAction.ACT_GEN_UPPAAL].setEnabled(true);
actions[TGUIAction.ACT_GEN_LATENCY_GRAPH].setEnabled(true);
break;
case MainGUI.AVATAR_SYNTAXCHECKING_OK:
actions[TGUIAction.ACT_AVATAR_SIM].setEnabled(true);
......@@ -252,6 +253,7 @@ public class ModeManager {
actions[TGUIAction.ACT_AVATAR_FV_PROVERIF].setEnabled(false);
actions[TGUIAction.ACT_AVATAR_FV_STATICANALYSIS].setEnabled(false);
actions[TGUIAction.ACT_AVATAR_EXECUTABLE_GENERATION].setEnabled(false);
actions[TGUIAction.ACT_GEN_LATENCY_GRAPH].setEnabled(false);
break;
case MainGUI.METHO_CHANGED:
actions[TGUIAction.ACT_GEN_RTLOTOS].setEnabled(false);
......@@ -300,6 +302,7 @@ public class ModeManager {
actions[TGUIAction.ACT_AVATAR_FV_PROVERIF].setEnabled(false);
actions[TGUIAction.ACT_AVATAR_FV_STATICANALYSIS].setEnabled(false);
actions[TGUIAction.ACT_AVATAR_EXECUTABLE_GENERATION].setEnabled(false);
actions[TGUIAction.ACT_GEN_LATENCY_GRAPH].setEnabled(false);
break;
case MainGUI.MODEL_SAVED:
......
......@@ -678,6 +678,8 @@ public class TGUIAction extends AbstractAction {
public static final int MOVE_ENABLED = 463;
public static final int FIRST_DIAGRAM = 464;
public static final int ACT_GEN_LATENCY_GRAPH = 519;
public static final int NB_ACTION = 525;
private static final TAction [] actions = new TAction[NB_ACTION];
......@@ -1405,6 +1407,7 @@ public class TGUIAction extends AbstractAction {
actions[MOVE_ENABLED] = new TAction("Move", "Move enabled", IconManager.imgic780, IconManager.imgic780, "Move enabled (shift + arrow)", "Move", 0);
actions[FIRST_DIAGRAM] = new TAction("FirstDiagram", "First Diagram", IconManager.imgic142, IconManager.imgic142, "Switch the the first diagram", "Switch to the first diagram", 0);
actions[ACT_GEN_LATENCY_GRAPH] = new TAction("generate-latency-graph", "Analyze Latency Graph", IconManager.imgic1118, IconManager.imgic1118, "Analyze Latency Graph", "Analyze Latency Graph", '0');
}
public String getActionCommand() {
......
This diff is collapsed.
This diff is collapsed.
/* 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.
*/
package ui.directedgraph;
import ui.util.IconManager;
import ui.TAction;
import javax.swing.*;
import javax.swing.event.EventListenerList;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* Class LatencyDetailedAnalysisActions: actions related to the latency detail
* analysis and directed graph generation
*
* 23/09/2019
*
* @author Maysam Zoor
*/
public class LatencyDetailedAnalysisActions extends AbstractAction {
// Actions
public static final int ACT_SHOW_GRAPH = 0;
public static final int ACT_SAVE_TRACE_PNG = 1;
public static final int ACT_STOP_AND_CLOSE_ALL = 2;
public static final int ACT_SAVE_TRACE_GRAPHML = 3;
public static final int ACT_LOAD_SIMULATION_TRACES = 4;
public static final int ACT_DETAILED_ANALYSIS = 5;
public static final int ACT_Import_ANALYSIS = 6;
public static final int NB_ACTION = 7;
private static final TAction[] actions = new TAction[NB_ACTION];
private EventListenerList listeners;
public static final String JLF_IMAGE_DIR = "";
public static final String LARGE_ICON = "LargeIcon";
public LatencyDetailedAnalysisActions(int id) {
if (actions[0] == null) {
init();
}
if (actions[id] == null) {
return;
}
putValue(Action.NAME, actions[id].NAME);
putValue(Action.SMALL_ICON, actions[id].SMALL_ICON);
putValue(LARGE_ICON, actions[id].LARGE_ICON);
putValue(Action.SHORT_DESCRIPTION, actions[id].SHORT_DESCRIPTION);
putValue(Action.LONG_DESCRIPTION, actions[id].LONG_DESCRIPTION);
// putValue(Action.MNEMONIC_KEY, new Integer(actions[id].MNEMONIC_KEY));
if (actions[id].MNEMONIC_KEY != 0) {
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(actions[id].MNEMONIC_KEY, java.awt.event.InputEvent.CTRL_MASK));
}
putValue(Action.ACTION_COMMAND_KEY, actions[id].ACTION_COMMAND_KEY);
}
public void setName(int index, String name) {
actions[index].NAME = name;
putValue(Action.NAME, actions[index].NAME);
}
public void init() {
actions[ACT_SAVE_TRACE_PNG] = new TAction("save-trace_as_PNG", "Save Directed Graph", IconManager.imgic341, IconManager.imgic341,
"Save Directed Graph", "Save Directed Graph", 'S');
actions[ACT_SAVE_TRACE_GRAPHML] = new TAction("save-trace_as_graphml", "Save Directed Graph as graphml", IconManager.imgic341,
IconManager.imgic341, "Save Directed Graph as graphml", "Save Directed Graph as graphml", 'S');
actions[ACT_SHOW_GRAPH] = new TAction("show_graph", "Show Directed Graph", IconManager.imgic53, IconManager.imgic53, "Show Directed Graph",
"Show Directed Graph", 'C');
actions[ACT_STOP_AND_CLOSE_ALL] = new TAction("stop-and-close-all", "Terminate Latency Analysis", IconManager.imgic27, IconManager.imgic27,
"Terminate Latency Analysis", "Terminate Latency Analysis window", 'T');
actions[ACT_LOAD_SIMULATION_TRACES] = new TAction("load_simulation_traces", "Load Simulation Traces", IconManager.imgic29,
IconManager.imgic29, "Load Simulation Traces", "Load Simulation Traces", 'T');
actions[ACT_DETAILED_ANALYSIS] = new TAction("start_detailed_analysis", "Detailed Analysis", IconManager.imgic29, IconManager.imgic29,
"show detailed analysis tables", "show detailed analysis tables", 'T');
actions[ACT_Import_ANALYSIS] = new TAction("import-trace", "Save Directed Graph", IconManager.imgic341, IconManager.imgic341,
"import Directed Graph", "Import Directed Graph", 'S');
}
public String getActionCommand() {
return (String) getValue(Action.ACTION_COMMAND_KEY);
}
public String getShortDescription() {
return (String) getValue(Action.SHORT_DESCRIPTION);
}
public String getLongDescription() {
return (String) getValue(Action.LONG_DESCRIPTION);
}
public void actionPerformed(ActionEvent evt) {
//
if (listeners != null) {
Object[] listenerList = listeners.getListenerList();
// Recreate the ActionEvent and stuff the value of the ACTION_COMMAND_KEY
ActionEvent e = new ActionEvent(evt.getSource(), evt.getID(), (String) getValue(Action.ACTION_COMMAND_KEY));
for (int i = 0; i <= listenerList.length - 2; i += 2) {
((ActionListener) listenerList[i + 1]).actionPerformed(e);
}
}
}
public void addActionListener(ActionListener l) {
if (listeners == null) {
listeners = new EventListenerList();
}
listeners.add(ActionListener.class, l);
}
public void removeActionListener(ActionListener l) {
if (listeners == null) {
return;
}
listeners.remove(ActionListener.class, l);
}
}
/* 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.
*/
package ui.directedgraph;
import javax.swing.JToolBar;
import javax.swing.SwingConstants;
/**
* Class LatencyDetailedAnalysisBar: toolbar used for latency detail analysis
* and directed graph generation