From 458e1ccffa122b111a221eecd827779e873a1625 Mon Sep 17 00:00:00 2001 From: apvrille <ludovic.apvrille@eurecom.fr> Date: Thu, 7 Mar 2019 15:13:31 +0100 Subject: [PATCH] Update on help management --- src/main/java/ui/tree/HelpTree.java | 5 +++++ src/main/java/ui/tree/JDiagramTree.java | 6 ++++++ src/main/java/ui/window/JFrameHelp.java | 3 ++- src/main/resources/help/diplodocus.html | 4 +++- src/main/resources/help/diplodocus.md | 7 ++++++- src/main/resources/help/general.html | 7 ++++++- src/main/resources/help/general.md | 1 + src/main/resources/help/none.html | 27 +++++++++++++++++++++++++ src/main/resources/help/none.md | 6 ++++++ 9 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 src/main/resources/help/none.html create mode 100644 src/main/resources/help/none.md diff --git a/src/main/java/ui/tree/HelpTree.java b/src/main/java/ui/tree/HelpTree.java index b47f27bfa5..2405228651 100755 --- a/src/main/java/ui/tree/HelpTree.java +++ b/src/main/java/ui/tree/HelpTree.java @@ -42,6 +42,7 @@ package ui.tree; import help.HelpEntry; +import help.HelpManager; import myutil.GenericTree; import myutil.TraceManager; import ui.MainGUI; @@ -120,4 +121,8 @@ public class HelpTree implements GenericTree { return 0; } + + public HelpManager getHelpManager() { + return mgui.getHelpManager(); + } } diff --git a/src/main/java/ui/tree/JDiagramTree.java b/src/main/java/ui/tree/JDiagramTree.java index 94ffd5c009..ef61ebf5cd 100755 --- a/src/main/java/ui/tree/JDiagramTree.java +++ b/src/main/java/ui/tree/JDiagramTree.java @@ -43,6 +43,7 @@ package ui.tree; import common.*; import help.HelpEntry; +import help.HelpManager; import translator.CheckingError; import tmltranslator.TMLCheckingError; import ui.*; @@ -375,7 +376,10 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M return; } + + Object nodeInfo = tp.getLastPathComponent(); + //TraceManager.addDev("NodeInfo:" + nodeInfo); Object o; if (nodeInfo instanceof TDiagramPanel) { @@ -436,6 +440,8 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M } else if (nodeInfo instanceof HelpEntry) { mgui.openHelpFrame((HelpEntry)nodeInfo); + } else if (nodeInfo instanceof HelpTree) { + mgui.openHelpFrame(((HelpTree)nodeInfo).getHelpManager()); } } diff --git a/src/main/java/ui/window/JFrameHelp.java b/src/main/java/ui/window/JFrameHelp.java index 0961644eb2..5038f2dc5b 100644 --- a/src/main/java/ui/window/JFrameHelp.java +++ b/src/main/java/ui/window/JFrameHelp.java @@ -148,8 +148,9 @@ public class JFrameHelp extends JFrame implements ActionListener { setHelpEntry(he); - pack(); setSize(500,600); + pack(); + } diff --git a/src/main/resources/help/diplodocus.html b/src/main/resources/help/diplodocus.html index e3124a2be8..9bcb1f8ea9 100644 --- a/src/main/resources/help/diplodocus.html +++ b/src/main/resources/help/diplodocus.html @@ -16,6 +16,8 @@ <![endif]--> </head> <body> -<p>Diplodocus targets the hardware/software partitioning of embedded systems</p> +<h1 id="diplodocus">DIPLODOCUS</h1> +<p>DIPLODOCUS stands for DesIgn sPace exLoration based on fOrmal Description teChniques, Uml and SystemC.</p> +<p>Basically, DIPLODOCUS targets the partitioning of Systems-on-Chip. Partitioning a system means finding the best candidate software and hardware architecture for executing a set of functions. This selection of architecture is thus made according to given criteria, e.g., cost, power consumption, performance, safety, security, etc..</p> </body> </html> diff --git a/src/main/resources/help/diplodocus.md b/src/main/resources/help/diplodocus.md index 3ef34ca22e..ac946c75e4 100644 --- a/src/main/resources/help/diplodocus.md +++ b/src/main/resources/help/diplodocus.md @@ -1 +1,6 @@ -Diplodocus targets the hardware/software partitioning of embedded systems \ No newline at end of file +# DIPLODOCUS + +DIPLODOCUS stands for DesIgn sPace exLoration based on fOrmal Description teChniques, Uml and SystemC. + +Basically, DIPLODOCUS targets the partitioning of Systems-on-Chip. Partitioning a system means finding the best candidate software and hardware architecture for executing a set of functions. This selection of architecture is thus made according to given criteria, e.g., cost, power consumption, performance, safety, security, etc.. + diff --git a/src/main/resources/help/general.html b/src/main/resources/help/general.html index be01403cd6..21411ee04a 100644 --- a/src/main/resources/help/general.html +++ b/src/main/resources/help/general.html @@ -18,6 +18,11 @@ <body> <p>TTool is a tool for assisting designer to create the architecture and the software of embedded systems.</p> <p>TTool can be executed on Microsoft Windows, MacOS and Linux Operating Systems.</p> -<p>TTool supports the three main modeling profiles: - Diplodocus - Avatar - SysML-Sec</p> +<p>TTool supports the three main modeling profiles:</p> +<ul> +<li>Diplodocus</li> +<li>Avatar</li> +<li>SysML-Sec</li> +</ul> </body> </html> diff --git a/src/main/resources/help/general.md b/src/main/resources/help/general.md index 4fb43b5b29..d513056ddd 100644 --- a/src/main/resources/help/general.md +++ b/src/main/resources/help/general.md @@ -3,6 +3,7 @@ TTool is a tool for assisting designer to create the architecture and the softwa TTool can be executed on Microsoft Windows, MacOS and Linux Operating Systems. TTool supports the three main modeling profiles: + - Diplodocus - Avatar - SysML-Sec \ No newline at end of file diff --git a/src/main/resources/help/none.html b/src/main/resources/help/none.html new file mode 100644 index 0000000000..baecce4f33 --- /dev/null +++ b/src/main/resources/help/none.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang=""> +<head> + <meta charset="utf-8" /> + <meta name="generator" content="pandoc" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> + <title>none</title> + <style> + code{white-space: pre-wrap;} + span.smallcaps{font-variant: small-caps;} + span.underline{text-decoration: underline;} + div.column{display: inline-block; vertical-align: top; width: 50%;} + </style> + <!--[if lt IE 9]> + <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> + <![endif]--> +</head> +<body> +<h1 id="ttool-help">TTool Help</h1> +<p>The help is organized into the following main sections:</p> +<ul> +<li><a href="file://general.html">General aspects of TTool</a></li> +<li>The <a href="file://diplodocus.html">DIPLODOCUS</a> modeling environment</li> +<li>The <a href="file://avatar.html">AVATAR</a> modeling environment</li> +</ul> +</body> +</html> diff --git a/src/main/resources/help/none.md b/src/main/resources/help/none.md new file mode 100644 index 0000000000..6c1e10898a --- /dev/null +++ b/src/main/resources/help/none.md @@ -0,0 +1,6 @@ +# TTool Help +The help is organized into the following main sections: + +- [General aspects of TTool](file://general.md) +- The [DIPLODOCUS](file://diplodocus.md) modeling environment +- The [AVATAR](file://avatar.md) modeling environment \ No newline at end of file -- GitLab