From 5bbd057ba71c23708343140c8b4fe7d9365f917e Mon Sep 17 00:00:00 2001 From: apvrille <ludovic.apvrille@eurecom.fr> Date: Mon, 14 May 2018 17:06:44 +0200 Subject: [PATCH] Update on configuration and TMLTask --- .idea/misc.xml | 2 +- doc/config.xml | 54 +++ doc/config_linux.xml | 1 + doc/config_macosx.xml | 1 + doc/config_windows.xml | 1 + src/main/java/common/ConfigurationTTool.java | 2 +- src/main/java/tmltranslator/TMLTask.java | 3 + src/main/java/ui/DocumentationGenerator.java | 329 +++++++++---------- 8 files changed, 219 insertions(+), 174 deletions(-) create mode 100755 doc/config.xml diff --git a/.idea/misc.xml b/.idea/misc.xml index 51e5191ed4..b755d8ca46 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -38,7 +38,7 @@ <property name="caretWidth" class="java.lang.Integer" /> </properties> </component> - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="false" project-jdk-name="1.7" project-jdk-type="JavaSDK"> <output url="file://$PROJECT_DIR$/build" /> </component> </project> \ No newline at end of file diff --git a/doc/config.xml b/doc/config.xml new file mode 100755 index 0000000000..1306d59b20 --- /dev/null +++ b/doc/config.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> + +<TURTLECONFIGURATION> +<DOTTYPath data="/bin/dotty" /> +<DOTTYHost data="localhost" /> +<FILEPath data="../modeling/" /> +<DownloadedFILEPath data="../modeling/" /> +<LIBPath data="../lib" /> +<IMGPath data="../figures" /> +<IMGPath data="../doc" /> +<LOTOSPath data="../lotos/" /> +<GGraphPath data="../graphs" /> +<TGraphPath data="../graphs" /> +<TToolUpdateProxy data="false" /> +<TToolUpdateProxyPort data="8080" /> +<TToolUpdateProxyHost data="To Be Completed" /> +<JavaCodeDirectory data="../javacode" /> +<JavaCompilerPath data="/usr/bin/javac" /> +<TToolClassPath data="../javacode" /> +<JavaExecutePath data="/usr/bin/java" /> +<JavaHeader data="import java.sql.*;" /> +<SystemCCodeDirectory data="../simulators/c++2/" /> +<SystemCHost data="localhost"/> +<SystemCCodeCompileCommand data="make" /> +<SystemCCodeExecuteCommand data="../simulators/c++2/run.x -ovcd ../simulators/c++2/vcddump.vcd" /> +<SystemCCodeInteractiveExecuteCommand data="../simulators/c++2/run.x -server" /> +<TMLCodeDirectory data="../tmlcode/" /> +<GTKWavePath data="/usr/bin/gtkwave" /> +<VCDPath data="../vcd/" /> +<UPPAALCodeDirectory data="../uppaal/" /> +<UPPAALVerifierPath data="../../uppaal/bin-Linux/verifyta" /> +<UPPAALVerifierHost data="localhost" /> +<ProVerifCodeDirectory data="../proverif/" /> +<ProVerifVerifierPath data="../../proverif/proverif" /> +<ProVerifVerifierHost data="localhost" /> +<AVATARExecutableCodeDirectory data="../executablecode/" /> +<AVATARMPSoCCodeDirectory data="../MPSoC/" /> +<AVATARExecutableCodeHost data="localhost"/> +<AVATARExecutableCodeCompileCommand data="make" /> +<AVATARExecutableCodeExecuteCommand data="run.x" /> +<AVATARExecutableSoclibCodeCompileCommand data="make -C ../executablecode updategeneratedcode compilesoclib" /> +<AVATARExecutableSoclibCodeExecuteCommand data="make -C ../executablecode runsoclib" /> + + +<ExternalCommand1Host data="localhost"/> +<ExternalCommand1 data="/usr/bin/gtkwave ../simulators/c++2/vcddump.vcd"/> + + +<ExternalServer data="localhost:12345"/> + +<LastWindowAttributes x="240" y="107" width="1414" height="777" max="false" /> + + +</TURTLECONFIGURATION> diff --git a/doc/config_linux.xml b/doc/config_linux.xml index 22e478ab98..1306d59b20 100755 --- a/doc/config_linux.xml +++ b/doc/config_linux.xml @@ -7,6 +7,7 @@ <DownloadedFILEPath data="../modeling/" /> <LIBPath data="../lib" /> <IMGPath data="../figures" /> +<IMGPath data="../doc" /> <LOTOSPath data="../lotos/" /> <GGraphPath data="../graphs" /> <TGraphPath data="../graphs" /> diff --git a/doc/config_macosx.xml b/doc/config_macosx.xml index f1b9ed8ca0..bf93b4152c 100755 --- a/doc/config_macosx.xml +++ b/doc/config_macosx.xml @@ -7,6 +7,7 @@ <DownloadedFILEPath data="../modeling/" /> <LIBPath data="../lib" /> <IMGPath data="../figures" /> +<DocGenPath data="../doc" /> <LOTOSPath data="../lotos/" /> <GGraphPath data="../graphs" /> <TGraphPath data="../graphs" /> diff --git a/doc/config_windows.xml b/doc/config_windows.xml index 33da8b3b5a..464829aa54 100755 --- a/doc/config_windows.xml +++ b/doc/config_windows.xml @@ -7,6 +7,7 @@ <DownloadedFILEPath data="../modeling/" /> <LIBPath data="../lib" /> <IMGPath data="../figures" /> +<DocGenPath data="../doc" /> <LOTOSPath data="../lotos/" /> <GGraphPath data="../graphs" /> <TGraphPath data="../graphs" /> diff --git a/src/main/java/common/ConfigurationTTool.java b/src/main/java/common/ConfigurationTTool.java index 6e321ddebb..99c6710f1a 100755 --- a/src/main/java/common/ConfigurationTTool.java +++ b/src/main/java/common/ConfigurationTTool.java @@ -83,7 +83,7 @@ public class ConfigurationTTool { public static String LOTOSPath = ""; public static String LIBPath = ""; public static String IMGPath = ""; - public static String DocGenPath = ""; + public static String DocGenPath = "."; public static String GGraphPath = ""; public static String TGraphPath = ""; public static String TToolUpdateURL = ""; diff --git a/src/main/java/tmltranslator/TMLTask.java b/src/main/java/tmltranslator/TMLTask.java index 8ded67bc9f..97c0ab92ed 100755 --- a/src/main/java/tmltranslator/TMLTask.java +++ b/src/main/java/tmltranslator/TMLTask.java @@ -51,15 +51,18 @@ import java.util.*; */ public class TMLTask extends TMLElement { private TMLActivity activity; + private boolean isRequested = false; private TMLRequest request; private List<TMLAttribute> attributes; private boolean mustExit = false; private int priority; + private Set<TMLChannel> channelsList; private Set<TMLChannel> readTMLChannelsList; private Set<TMLChannel> writeTMLChannelsList; private Set<TMLEvent> eventsList; + private int operationType; private boolean isAttacker; diff --git a/src/main/java/ui/DocumentationGenerator.java b/src/main/java/ui/DocumentationGenerator.java index c7883afab8..a5933533ab 100644 --- a/src/main/java/ui/DocumentationGenerator.java +++ b/src/main/java/ui/DocumentationGenerator.java @@ -37,15 +37,10 @@ */ - - - package ui; -import myutil.Conversion; -import myutil.FileException; -import myutil.FileUtils; -import myutil.SteppedAlgorithm; +import common.SpecConfigTTool; +import myutil.*; import ui.ad.TActivityDiagramPanel; import ui.avatarsmd.AvatarSMDPanel; import ui.dd.TDeploymentDiagramPanel; @@ -56,10 +51,6 @@ import ui.util.DefaultText; import javax.imageio.ImageIO; import javax.swing.*; - -import common.ConfigurationTTool; -import common.SpecConfigTTool; - import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; @@ -73,8 +64,9 @@ import java.util.Vector; * Class DocumentationGenerator * Generation of documentation from TTool diagrams * Creation: 19/09/2008 - * @version 2.0 02/03/2016 + * * @author Ludovic APVRILLE + * @version 2.0 02/03/2016 */ public class DocumentationGenerator implements SteppedAlgorithm, StoppableGUIElement { @@ -91,7 +83,7 @@ public class DocumentationGenerator implements SteppedAlgorithm, StoppableGUIEle private String texIncludeFileNameSvg = "diagsvg.tex"; private final String path; - private String projectName; + private String projectName; private int cpt, total; // For loops -> to know at which point it is of its algorithm private boolean finished = false; @@ -114,7 +106,7 @@ public class DocumentationGenerator implements SteppedAlgorithm, StoppableGUIEle projectName = _projectName; //int i,j; - for( int i=0; i<panels.size(); i++) { + for (int i = 0; i < panels.size(); i++) { TURTLEPanel tp = panels.elementAt(i); total += tp.panels.size(); } @@ -127,10 +119,10 @@ public class DocumentationGenerator implements SteppedAlgorithm, StoppableGUIEle public String getDocumentation() { return doc; } - + public String getPath() { - return path; - } + return path; + } public String getMainLatexDocumentation() { return mainLatexDoc; @@ -153,7 +145,7 @@ public class DocumentationGenerator implements SteppedAlgorithm, StoppableGUIEle go = true; } - public void stopElement(){ + public void stopElement() { go = false; } @@ -175,7 +167,7 @@ public class DocumentationGenerator implements SteppedAlgorithm, StoppableGUIEle } public boolean generateDocumentation() { - int i,j; + int i, j; cpt = 0; BufferedImage image; String svgImg; @@ -183,48 +175,49 @@ public class DocumentationGenerator implements SteppedAlgorithm, StoppableGUIEle TDiagramPanel tdp; File file1; //String tmp, tmpForRef; - - final File docFolder = new File( getPath() ); - - if ( !docFolder.exists() ) { - docFolder.mkdir(); - - final String makefileName = File.separator + "Makefile"; - final File makeFile = new File( SpecConfigTTool.IMGPath + makefileName ); - - try { - if ( makeFile.exists() ) { - Files.copy( makeFile.toPath(), new File( getPath() + makefileName ).toPath() ); - } - - final String mliFileName = File.separator + "mli.mk"; - final File mliFile = new File( SpecConfigTTool.IMGPath + mliFileName ); - - if ( mliFile.exists() ) { - Files.copy( mliFile.toPath(), new File( getPath() + mliFileName ).toPath() ); - } - } - catch( final IOException ex ) { - ex.printStackTrace(); - } + + TraceManager.addDev("Path=" + getPath()); + + final File docFolder = new File(getPath()); + + if (!docFolder.exists()) { + docFolder.mkdir(); + + final String makefileName = File.separator + "Makefile"; + final File makeFile = new File(SpecConfigTTool.IMGPath + makefileName); + + try { + if (makeFile.exists()) { + Files.copy(makeFile.toPath(), new File(getPath() + makefileName).toPath()); + } + + final String mliFileName = File.separator + "mli.mk"; + final File mliFile = new File(SpecConfigTTool.IMGPath + mliFileName); + + if (mliFile.exists()) { + Files.copy(mliFile.toPath(), new File(getPath() + mliFileName).toPath()); + } + } catch (final IOException ex) { + ex.printStackTrace(); + } } - mainLatexDoc = getLatexDocumentationHeader(projectName); - includeLatexDoc = getIncludeLatexDocumentationHeader(projectName); - mainLatexDocSvg = getLatexDocumentationHeaderSvg(projectName); - includeLatexDocSvg = getIncludeLatexDocumentationHeaderSvg(projectName); - + mainLatexDoc = getLatexDocumentationHeader(projectName); + includeLatexDoc = getIncludeLatexDocumentationHeader(projectName); + mainLatexDocSvg = getLatexDocumentationHeaderSvg(projectName); + includeLatexDocSvg = getIncludeLatexDocumentationHeaderSvg(projectName); + doc = ""; doc += "<html>\n"; doc += getDocumentationHeader(projectName); doc += "<body>\n"; - doc +="<center><h1>" + title + "</h1></center>\n"; - doc +="<center><b><h1>" + projectName + "</h1></b></center>\n<br><br>\n"; + doc += "<center><h1>" + title + "</h1></center>\n"; + doc += "<center><b><h1>" + projectName + "</h1></b></center>\n<br><br>\n"; docSvg = doc; - - for(i=0; i<panels.size(); i++) { + + for (i = 0; i < panels.size(); i++) { tp = panels.elementAt(i); String mainTitle = mainTabbedPane.getTitleAt(i); @@ -240,13 +233,11 @@ public class DocumentationGenerator implements SteppedAlgorithm, StoppableGUIEle tmp = "DIPLODOCUS Architecture / Mapping Modeling: " + tmp; }*/ if (tp instanceof DesignPanel) { - mainTitle = "TURTLE Design"; - } - else if (tp instanceof AnalysisPanel) { - mainTitle = "TURTLE Analysis"; - } - else if (tp instanceof DeploymentPanel) { - mainTitle = "TURTLE Deployment"; + mainTitle = "TURTLE Design"; + } else if (tp instanceof AnalysisPanel) { + mainTitle = "TURTLE Analysis"; + } else if (tp instanceof DeploymentPanel) { + mainTitle = "TURTLE Deployment"; } // Issue #32: This should only be done for Latex @@ -258,144 +249,138 @@ public class DocumentationGenerator implements SteppedAlgorithm, StoppableGUIEle // Latex // Issue #32: This should only be done for Latex - final String latexMainTitle = Conversion.replaceAllChar( mainTitle, '_', "\\_" ); - includeLatexDoc += "\\section{" + latexMainTitle + "}\n"; - includeLatexDocSvg += "\\section{" + latexMainTitle + "}\n"; - - for(j=0; j<tp.panels.size(); j++) { + final String latexMainTitle = Conversion.replaceAllChar(mainTitle, '_', "\\_"); + includeLatexDoc += "\\section{" + latexMainTitle + "}\n"; + includeLatexDocSvg += "\\section{" + latexMainTitle + "}\n"; + + for (j = 0; j < tp.panels.size(); j++) { if (go == false) { return false; } tdp = tp.panels.elementAt(j); - String subTitle = tp.tabbedPane.getTitleAt(j); + String subTitle = tp.tabbedPane.getTitleAt(j); - String tmpForRef = Conversion.replaceAllChar( subTitle, '_', "" ); - tmpForRef += tmpForRef + i + j; + String tmpForRef = Conversion.replaceAllChar(subTitle, '_', ""); + tmpForRef += tmpForRef + i + j; // tmp = Conversion.replaceAllChar(tmp, '_', "\\_"); if (tdp instanceof TMLActivityDiagramPanel) { - subTitle = "Behavior of Task: " + subTitle; - } - else if (tdp instanceof AvatarSMDPanel) { - subTitle = "Behavior of Block: " + subTitle; - } - else if (tdp instanceof TActivityDiagramPanel) { - subTitle = "Behavior of TClass: " + subTitle; - } - else if (tdp instanceof TMLTaskDiagramPanel) { - subTitle = "Task and communications between tasks"; - } - else if (tdp instanceof TMLArchiDiagramPanel) { - subTitle = "Architecture or Mapping of " + panelName; - } - else if (tdp instanceof TDeploymentDiagramPanel) { - subTitle = ""; + subTitle = "Behavior of Task: " + subTitle; + } else if (tdp instanceof AvatarSMDPanel) { + subTitle = "Behavior of Block: " + subTitle; + } else if (tdp instanceof TActivityDiagramPanel) { + subTitle = "Behavior of TClass: " + subTitle; + } else if (tdp instanceof TMLTaskDiagramPanel) { + subTitle = "Task and communications between tasks"; + } else if (tdp instanceof TMLArchiDiagramPanel) { + subTitle = "Architecture or Mapping of " + panelName; + } else if (tdp instanceof TDeploymentDiagramPanel) { + subTitle = ""; } - String imgName = "img_" + i + "_" + j + ".png"; - - // Issue #32: Wrong name - String imgNameSvg = "img_" + i + "_" + j; - - // HTML - doc += "<h" + (firstHeadingNumber+1) + ">" + subTitle + "</h" + (firstHeadingNumber+1) + ">\n"; - docSvg += "<h" + (firstHeadingNumber+1) + ">" + subTitle + "</h" + (firstHeadingNumber+1) + ">\n"; - - // Latex - final String latexSubtitle = Conversion.replaceAllChar( subTitle, '_', "\\_"); - includeLatexDoc += "\\subsection{" + latexSubtitle + "}\n"; - includeLatexDoc += "Figures \\ref{fig:" + tmpForRef + "} presents ...\n"; - includeLatexDoc += "\\begin{figure*}[htb]\n\\centering\n"; - includeLatexDoc += "\\includegraphics[width=\\textwidth]{" + imgName + "}\n"; - includeLatexDoc += "\\caption{Diagram \"" + latexSubtitle + "\"}\n\\label{fig:" + tmpForRef + "}\n\\end{figure*}\n\n"; - - includeLatexDocSvg += "\\subsection{" + latexSubtitle + "}\n"; - includeLatexDocSvg += "Figures \\ref{fig:" + tmpForRef + "} presents ...\n"; - includeLatexDocSvg += "\\begin{figure*}[htb]\n\\centering\n"; - includeLatexDocSvg += "\\includegraphics[width=\\textwidth]{" + imgNameSvg + "-svg.pdf}\n"; - includeLatexDocSvg += "\\caption{Diagram \"" + latexSubtitle + "\"}\n\\label{fig:" + tmpForRef + "}\n\\end{figure*}\n\n"; - - // Capturing the diagram + String imgName = "img_" + i + "_" + j + ".png"; + + // Issue #32: Wrong name + String imgNameSvg = "img_" + i + "_" + j; + + // HTML + doc += "<h" + (firstHeadingNumber + 1) + ">" + subTitle + "</h" + (firstHeadingNumber + 1) + ">\n"; + docSvg += "<h" + (firstHeadingNumber + 1) + ">" + subTitle + "</h" + (firstHeadingNumber + 1) + ">\n"; + + // Latex + final String latexSubtitle = Conversion.replaceAllChar(subTitle, '_', "\\_"); + includeLatexDoc += "\\subsection{" + latexSubtitle + "}\n"; + includeLatexDoc += "Figures \\ref{fig:" + tmpForRef + "} presents ...\n"; + includeLatexDoc += "\\begin{figure*}[htb]\n\\centering\n"; + includeLatexDoc += "\\includegraphics[width=\\textwidth]{" + imgName + "}\n"; + includeLatexDoc += "\\caption{Diagram \"" + latexSubtitle + "\"}\n\\label{fig:" + tmpForRef + "}\n\\end{figure*}\n\n"; + + includeLatexDocSvg += "\\subsection{" + latexSubtitle + "}\n"; + includeLatexDocSvg += "Figures \\ref{fig:" + tmpForRef + "} presents ...\n"; + includeLatexDocSvg += "\\begin{figure*}[htb]\n\\centering\n"; + includeLatexDocSvg += "\\includegraphics[width=\\textwidth]{" + imgNameSvg + "-svg.pdf}\n"; + includeLatexDocSvg += "\\caption{Diagram \"" + latexSubtitle + "\"}\n\\label{fig:" + tmpForRef + "}\n\\end{figure*}\n\n"; + + // Capturing the diagram image = tdp.performMinimalCapture(); svgImg = tdp.svgCapture(); - file1 = new File(path+imgName); - + file1 = new File(path + imgName); + try { // save captured image to PNG file ImageIO.write(image, "png", file1); - FileUtils.saveFile(path+imgNameSvg+".svg", svgImg); + FileUtils.saveFile(path + imgNameSvg + ".svg", svgImg); //doc += "<center><img src=\"img_" + i + "_" + j + ".png\" align=\"middle\" title=\"" + tmp + "\"></center>\n"; - doc += "<center><img src=\"img_" + i + "_" + j + ".png\" align=\"middle\" title=\"" + subTitle + "\"></center>\n"; - docSvg += "<center><img src=\"img_" + i + "_" + j + ".svg\" align=\"middle\" title=\"" + subTitle + "\"></center>\n"; - } - catch (Exception e) { + doc += "<center><img src=\"img_" + i + "_" + j + ".png\" align=\"middle\" title=\"" + subTitle + "\"></center>\n"; + docSvg += "<center><img src=\"img_" + i + "_" + j + ".svg\" align=\"middle\" title=\"" + subTitle + "\"></center>\n"; + } catch (Exception e) { System.out.println("Image (" + i + ", " + j + ") could not be captured"); e.printStackTrace(); } - - cpt ++; + + cpt++; } } - doc+="</body>\n</html>"; - docSvg+="</body>\n</html>"; + doc += "</body>\n</html>"; + docSvg += "</body>\n</html>"; try { - FileUtils.saveFile(path+fileName, doc); + FileUtils.saveFile(path + fileName, doc); } catch (FileException fe) { - fe.printStackTrace(); + fe.printStackTrace(); System.out.println("HTML file could not be saved"); return false; } try { - FileUtils.saveFile(path+fileNameSvg, docSvg); + FileUtils.saveFile(path + fileNameSvg, docSvg); } catch (FileException fe) { - fe.printStackTrace(); - System.out.println("HTML file with svg img could not be saved"); + fe.printStackTrace(); + System.out.println("HTML file with svg img could not be saved"); - return false; + return false; } try { - FileUtils.saveFile(path+texFileName, mainLatexDoc); + FileUtils.saveFile(path + texFileName, mainLatexDoc); } catch (FileException fe) { - fe.printStackTrace(); + fe.printStackTrace(); System.out.println("Main latex file could not be saved"); return false; } - try { - FileUtils.saveFile(path+texIncludeFileName, includeLatexDoc); + try { + FileUtils.saveFile(path + texIncludeFileName, includeLatexDoc); } catch (FileException fe) { - fe.printStackTrace(); + fe.printStackTrace(); System.out.println("Include latex file could not be saved"); - return false; + return false; } - - try { - FileUtils.saveFile(path+texFileNameSvg, mainLatexDocSvg); + + try { + FileUtils.saveFile(path + texFileNameSvg, mainLatexDocSvg); } catch (FileException fe) { - fe.printStackTrace(); + fe.printStackTrace(); System.out.println("Main latex svg file could not be saved"); return false; } - try { - FileUtils.saveFile(path+texIncludeFileNameSvg, includeLatexDocSvg); + try { + FileUtils.saveFile(path + texIncludeFileNameSvg, includeLatexDocSvg); } catch (FileException fe) { - fe.printStackTrace(); - System.out.println("include latex svg file could not be saved"); + fe.printStackTrace(); + System.out.println("included svg file could not be saved"); return false; } - + finished = true; @@ -403,55 +388,55 @@ public class DocumentationGenerator implements SteppedAlgorithm, StoppableGUIEle } public int getPercentage() { - return (cpt*100) / total; + return (cpt * 100) / total; } - public String getDocumentationHeader(String _projectName) { - GregorianCalendar calendar = (GregorianCalendar)GregorianCalendar.getInstance(); + public String getDocumentationHeader(String _projectName) { + GregorianCalendar calendar = (GregorianCalendar) GregorianCalendar.getInstance(); Date date = calendar.getTime(); SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy HH:mm"); String formattedDate = formatter.format(date); - String tmpdoc=""; + String tmpdoc = ""; tmpdoc += "<!----- Automatically generated by TTool version "; tmpdoc += DefaultText.getVersion(); tmpdoc += " generation date: " + formattedDate; tmpdoc += "---->\n"; tmpdoc += "\n<head>\n<title>"; - tmpdoc += getTitle() + ": " +_projectName; + tmpdoc += getTitle() + ": " + _projectName; tmpdoc += "</title>\n</head>\n"; return tmpdoc; } - - public String getLatexDocumentationHeader(String _projectName) { - GregorianCalendar calendar = (GregorianCalendar)GregorianCalendar.getInstance(); + + public String getLatexDocumentationHeader(String _projectName) { + GregorianCalendar calendar = (GregorianCalendar) GregorianCalendar.getInstance(); Date date = calendar.getTime(); SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy HH:mm"); String formattedDate = formatter.format(date); - String tmpdoc=""; + String tmpdoc = ""; tmpdoc += "%----- Automatically generated by TTool version "; tmpdoc += DefaultText.getVersion(); tmpdoc += " generation date: " + formattedDate; tmpdoc += "----\n"; - tmpdoc += "\\documentclass[11pt,a4paper]{article}\n\n\\usepackage{graphicx}\n\n\\begin{document}\n"; - tmpdoc += "\\extrafloats{750}\n"; - tmpdoc += "\\title{" + Conversion.replaceAllString(projectName, "_", "\\_") + "}\n"; - tmpdoc += "\\date{\\today}\n"; - tmpdoc += "\\maketitle\n\n"; - tmpdoc += "\\input{"+texIncludeFileName+"}\n"; - tmpdoc += "\\end{document}\n\n"; + tmpdoc += "\\documentclass[11pt,a4paper]{article}\n\n\\usepackage{graphicx}\n\n\\begin{document}\n"; + //tmpdoc += "\\extrafloats{750}\n"; + tmpdoc += "\\title{" + Conversion.replaceAllString(projectName, "_", "\\_") + "}\n"; + tmpdoc += "\\date{\\today}\n"; + tmpdoc += "\\maketitle\n\n"; + tmpdoc += "\\input{" + texIncludeFileName + "}\n"; + tmpdoc += "\\end{document}\n\n"; return tmpdoc; } - public String getIncludeLatexDocumentationHeader(String _projectName) { - GregorianCalendar calendar = (GregorianCalendar)GregorianCalendar.getInstance(); + public String getIncludeLatexDocumentationHeader(String _projectName) { + GregorianCalendar calendar = (GregorianCalendar) GregorianCalendar.getInstance(); Date date = calendar.getTime(); SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy HH:mm"); String formattedDate = formatter.format(date); - String tmpdoc=""; + String tmpdoc = ""; tmpdoc += "%----- Automatically generated by TTool version "; tmpdoc += DefaultText.getVersion(); tmpdoc += " generation date: " + formattedDate; @@ -459,35 +444,35 @@ public class DocumentationGenerator implements SteppedAlgorithm, StoppableGUIEle return tmpdoc; } - public String getLatexDocumentationHeaderSvg(String _projectName) { - GregorianCalendar calendar = (GregorianCalendar)GregorianCalendar.getInstance(); + public String getLatexDocumentationHeaderSvg(String _projectName) { + GregorianCalendar calendar = (GregorianCalendar) GregorianCalendar.getInstance(); Date date = calendar.getTime(); SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy HH:mm"); String formattedDate = formatter.format(date); - String tmpdoc=""; + String tmpdoc = ""; tmpdoc += "%----- Automatically generated by TTool version "; tmpdoc += DefaultText.getVersion(); tmpdoc += " generation date: " + formattedDate; tmpdoc += "----\n"; - tmpdoc += "% To be compiled as follows: make all. Relies on https://github.com/pacalet/mli.git\n"; - tmpdoc += "\\documentclass[11pt,a4paper]{article}\n\n\\usepackage{graphicx}\n\n\\begin{document}\n"; - tmpdoc += "\\extrafloats{750}\n"; - tmpdoc += "\\title{" + Conversion.replaceAllString(projectName, "_", "\\_") + "}\n"; - tmpdoc += "\\date{\\today}\n"; - tmpdoc += "\\maketitle\n\n"; - tmpdoc += "\\input{"+texIncludeFileNameSvg+"}\n"; - tmpdoc += "\\end{document}\n\n"; + tmpdoc += "% To be compiled as follows: make all. Relies on https://github.com/pacalet/mli.git\n"; + tmpdoc += "\\documentclass[11pt,a4paper]{article}\n\n\\usepackage{graphicx}\n\n\\begin{document}\n"; + //tmpdoc += "\\extrafloats{750}\n"; + tmpdoc += "\\title{" + Conversion.replaceAllString(projectName, "_", "\\_") + "}\n"; + tmpdoc += "\\date{\\today}\n"; + tmpdoc += "\\maketitle\n\n"; + tmpdoc += "\\input{" + texIncludeFileNameSvg + "}\n"; + tmpdoc += "\\end{document}\n\n"; return tmpdoc; } - public String getIncludeLatexDocumentationHeaderSvg(String _projectName) { - GregorianCalendar calendar = (GregorianCalendar)GregorianCalendar.getInstance(); + public String getIncludeLatexDocumentationHeaderSvg(String _projectName) { + GregorianCalendar calendar = (GregorianCalendar) GregorianCalendar.getInstance(); Date date = calendar.getTime(); SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy HH:mm"); String formattedDate = formatter.format(date); - String tmpdoc=""; + String tmpdoc = ""; tmpdoc += "%----- Automatically generated by TTool version "; tmpdoc += DefaultText.getVersion(); tmpdoc += " generation date: " + formattedDate; -- GitLab