Commit 538bc155 authored by Ludovic Apvrille's avatar Ludovic Apvrille

Adding first sketch of verification tracking structure

parent 502a4892
......@@ -1152,6 +1152,26 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per
return index;
}
private int addVerificationPropertyPanel(String name, int index, boolean addDefaultElements) {
if (index == -1) {
index = tabs.size();
}
//TraceManager.addDev("New SysMLSec Methodopanel");
VerificationPanel dp = new VerificationPanel(this);
tabs.add(index, dp);
mainTabbedPane.add(dp.tabbedPane, index);
mainTabbedPane.setToolTipTextAt(index, "Open Verification Tracking");
mainTabbedPane.setTitleAt(index, name);
mainTabbedPane.setIconAt(index, IconManager.imgic99);
//mainTabbedPane.addTab(name, IconManager.imgic14, dp.tabbedPane, "Opens design diagrams");
dp.init(name);
if (addDefaultElements) {
dp.initElements();
}
//ystem.out.println("Design added");
return index;
}
private int addTMLComponentDesignPanel(String name, int index) {
if (index == -1) {
......@@ -1609,6 +1629,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per
return index;
}
public int createVerificationProperty(String name) {
int index = addVerificationPropertyPanel(name, -1, false);
mainTabbedPane.setSelectedIndex(index);
return index;
}
public int createTMLDesign(String name) {
int index = addTMLDesignPanel(name, -1);
mainTabbedPane.setSelectedIndex(index);
......@@ -2022,6 +2048,15 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per
//frame.repaint();
}
public void newVerificationPropertyPanel() {
//TraceManager.addDev("NEW DESIGN");
addVerificationPropertyPanel("Verification Tracking", -1, true);
tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0);
mainTabbedPane.setSelectedIndex(tabs.size() - 1);
//paneAction(null);
//frame.repaint();
}
public void newTMLComponentDesign() {
//TraceManager.addDev("NEW DESIGN");
addTMLComponentDesignPanel("Application", -1);
......@@ -6642,6 +6677,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per
tp.tabbedPane.setTitleAt(0, name);
}
public void setVerificationPropertyDiagramName(int indexDesign, String name) {
TURTLEPanel tp = tabs.elementAt(indexDesign);
tp.tabbedPane.setTitleAt(0, name);
}
public void setTMLTaskDiagramName(int indexDesign, String name) {
TURTLEPanel tp = tabs.elementAt(indexDesign);
tp.tabbedPane.setTitleAt(0, name);
......@@ -9288,7 +9328,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per
private JPopupMenu menu;
private JMenuItem rename, remove, moveRight, moveLeft, newDesign, newAnalysis, newDeployment, newRequirement/*, newTMLDesign*/, newTMLComponentDesign, newTMLArchi, newProactiveDesign, newTURTLEOSDesign,
newNCDesign, sort, clone, newAttackTree, newFaultTree, newAVATARBD, newAVATARRequirement, newMAD, newTMLCP, newTMLMethodo, newAvatarMethodo, newAVATARDD, newSysmlsecMethodo, newSysCAMS, newELN;
newNCDesign, sort, clone, newAttackTree, newFaultTree, newAVATARBD, newAVATARRequirement, newMAD, newTMLCP, newTMLMethodo,
newAvatarMethodo, newAVATARDD, newSysmlsecMethodo, newSysCAMS, newELN, newVerificationProperty;
private JMenuItem newAVATARAnalysis;
public PopupListener(MainGUI _mgui) {
......@@ -9358,6 +9399,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per
newAVATARDD = createMenuItem("New Deployment Diagram");
newAvatarMethodo = createMenuItem("New AVATAR Methodology");
newSysmlsecMethodo = createMenuItem("New SysML-Sec Methodology");
newVerificationProperty = createMenuItem("New Verification Tracking");
menu = new JPopupMenu("Views");
menu.add(moveLeft);
......@@ -9455,6 +9498,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per
}
}
menu.addSeparator();
menu.add(newVerificationProperty);
}
......@@ -9589,6 +9636,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per
} else if (e.getSource() == newELN) {
ModeManager.setMode(CREATE_NEW_PANEL, actions, mainBar, mgui);
mgui.newELN();
} else if (e.getSource() == newVerificationProperty) {
ModeManager.setMode(CREATE_NEW_PANEL, actions, mainBar, mgui);
mgui.newVerificationPropertyPanel();
}
}
};
......
/* 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.verificationpd;
import myutil.TraceManager;
import org.w3c.dom.Element;
import ui.*;
/**
* Class VerificationPropertyDiagramPanel
* Panel for tracking verifications
* Creation: 10/04/2019
* @version 1.0 10/04/2019
* @author Ludovic APVRILLE
*/
public class VerificationPropertyDiagramPanel extends TDiagramPanel implements TDPWithAttributes {
//public Vector validated, ignored;
public VerificationPropertyDiagramPanel(MainGUI mgui, TToolBar _ttb) {
super(mgui, _ttb);
//TraceManager.addDev("Sysmlsec metho diagram created");
/*TDiagramMouseManager tdmm = new TDiagramMouseManager(this);
addMouseListener(tdmm);
addMouseMotionListener(tdmm);*/
}
public boolean actionOnDoubleClick(TGComponent tgc) {
return true;
}
public boolean actionOnAdd(TGComponent tgc) {
/*if (tgc instanceof TCDTClass) {
TCDTClass tgcc = (TCDTClass)(tgc);
mgui.addTClass(tgcc.getClassName());
return true;
}*/
return false;
}
public boolean actionOnRemove(TGComponent tgc) {
/*if (tgc instanceof TCDTClass) {
TCDTClass tgcc = (TCDTClass)(tgc);
mgui.removeTClass(tgcc.getClassName());
resetAllInstancesOf(tgcc);
return true;
}*/
return false;
}
public boolean actionOnValueChanged(TGComponent tgc) {
/*if (tgc instanceof TCDTClass) {
return actionOnDoubleClick(tgc);
}*/
return false;
}
public String getXMLHead() {
return "<VerificationPropertyDiagramPanel name=\"" + name + "\"" + sizeParam() + zoomParam() + " >";
}
public String getXMLTail() {
return "</VerificationPropertyDiagramPanel>";
}
public String getXMLSelectedHead() {
return "<VerificationPropertyDiagramPanelCopy name=\"" + name + "\" xSel=\"" + xSel + "\" ySel=\"" + ySel + "\" widthSel=\"" + widthSel +
"\" heightSel=\"" + heightSel + "\" >";
}
public String getXMLSelectedTail() {
return "</VerificationPropertyDiagramPanelCopy>";
}
public String getXMLCloneHead() {
return "<VerificationPropertyDiagramPanelCopy name=\"" + name + "\" xSel=\"" + 0 + "\" ySel=\"" + 0 + "\" widthSel=\"" + 0 + "\" heightSel=\""
+ 0 + "\" >";
}
public String getXMLCloneTail() {
return "</VerificationPropertyDiagramPanelCopy>";
}
public void makePostLoadingProcessing() throws MalformedModelingException {
}
public void enhance() {
autoAdjust();
}
public void loadExtraParameters(Element elt) {
}
}
/* 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.verificationpd;
import ui.MainGUI;
import ui.TGUIAction;
import ui.TToolBar;
import javax.swing.*;
//import java.awt.*;
//import java.awt.event.*;
/**
* Class VerificationPropertyDiagramToolbar
* Implements the toolbar to be used in conjunction with the tracking verification
* Creation: 10/04/2019
* @version 1.0 10/04/2019
* @author Ludovic APVRILLE
*/
public class VerificationPropertyDiagramToolbar extends TToolBar {
public VerificationPropertyDiagramToolbar(MainGUI _mgui) {
super(_mgui);
}
protected void setActive(boolean b) {
mgui.actions[TGUIAction.ACT_ZOOM_MORE].setEnabled(b);
mgui.actions[TGUIAction.ACT_ZOOM_LESS].setEnabled(b);
mgui.actions[TGUIAction.ACT_SHOW_ZOOM].setEnabled(b);
mgui.updateZoomInfo();
//mgui.actions[TGUIAction.ARD_EDIT].setEnabled(b);
mgui.actions[TGUIAction.UML_NOTE].setEnabled(b);
mgui.actions[TGUIAction.CONNECTOR_COMMENT].setEnabled(b);
/*mgui.actions[TGUIAction.ARD_REQUIREMENT].setEnabled(b);
mgui.actions[TGUIAction.ARD_PROPERTY].setEnabled(b);
mgui.actions[TGUIAction.ARD_VERIFY_CONNECTOR].setEnabled(b);
mgui.actions[TGUIAction.ARD_DERIVE_CONNECTOR].setEnabled(b);
mgui.actions[TGUIAction.ARD_REFINE_CONNECTOR].setEnabled(b);
mgui.actions[TGUIAction.ARD_COPY_CONNECTOR].setEnabled(b);
mgui.actions[TGUIAction.ARD_COMPOSITION_CONNECTOR].setEnabled(b);
mgui.actions[TGUIAction.ACT_TOGGLE_ATTR].setEnabled(b);
mgui.actions[TGUIAction.ACT_ENHANCE].setEnabled(b);*/
//mgui.actions[TGUIAction.ACT_MODEL_CHECKING].setEnabled(!b);
}
protected void setButtons() {
JButton button;
/*button = this.add(mgui.actions[TGUIAction.ARD_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();
}
} // Class
/* 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.verificationpd;
import ui.*;
import ui.verificationpd.VerificationPropertyGeneric;
/**
* Class VerificationPropertySafety
* Safety verification tracking
* Creation: 10/04/2019
* @version 1.0 10/04/2019
* @author Ludovic APVRILLE
*/
public class VerificationPropertySafety extends VerificationPropertyGeneric {
public VerificationPropertySafety(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);
initScaling(180, 70);
nbConnectingPoint = 0;
connectingPoint = new TGConnectingPoint[nbConnectingPoint];
//connectingPoint[0] = new SysmlsecMethodologyConnectingPoint(this, 0, 0, false, true, 0.5, 0, TGConnectingPoint.WEST);
typeOfReference = PROPERTY;
addTGConnectingPointsCommentTop();
}
public int getType() {
return TGComponentManager.SYSMLSEC_METHODOLOGY_REF_PROPERTIES;
}
public boolean isAValidPanelType(TURTLEPanel panel) {
return panel instanceof AvatarRequirementPanel;
}
}
......@@ -45,6 +45,7 @@ import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.Date;
import java.util.Vector;
......@@ -63,10 +64,10 @@ public class Property {
public PropertyResultType resultType;
public String result;
public Object reference;
public Date date;
public Property() {
date = new Date();
}
}
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