|
From: <got...@us...> - 2009-09-26 12:40:27
|
Revision: 379
http://scstudio.svn.sourceforge.net/scstudio/?rev=379&view=rev
Author: gotthardp
Date: 2009-09-26 12:40:09 +0000 (Sat, 26 Sep 2009)
Log Message:
-----------
New feature: Help system is now integrated into the Visio add-on.
Modified Paths:
--------------
trunk/doc/CMakeLists.txt
trunk/doc/help/acyclic/acyclic.html
trunk/doc/help/fifo/fifo.html
trunk/doc/help/localchoice/localchoice.html
trunk/doc/help/membership/membership_documentation.html
trunk/src/check/boundedness/universal_boundedness_checker.h
trunk/src/check/liveness/deadlock_checker.h
trunk/src/check/liveness/livelock_checker.h
trunk/src/check/localchoice/local_choice_checker.h
trunk/src/check/order/acyclic_checker.h
trunk/src/check/order/fifo_checker.h
trunk/src/check/race/race_checker.h
trunk/src/check/realizability/realizability_checker.h
trunk/src/check/structure/name_checker.h
trunk/src/check/time/constrain_check.h
trunk/src/data/checker.h
trunk/src/view/visio/addon/addon.cpp
trunk/src/view/visio/addon/dllmodule.cpp
trunk/src/view/visio/addon/dllmodule.h
trunk/src/view/visio/addon/dllmodule.rc
trunk/src/view/visio/addon/document.cpp
trunk/src/view/visio/addon/document.h
trunk/src/view/visio/addon/reportview.cpp
trunk/src/view/visio/addon/reportview.h
trunk/src/view/visio/scstudio.nsi
Added Paths:
-----------
trunk/doc/help/
trunk/doc/help/CMakeLists.txt
trunk/doc/help/acyclic/
trunk/doc/help/algorithms.html
trunk/doc/help/fifo/
trunk/doc/help/help.css
trunk/doc/help/hhc.cmake
trunk/doc/help/localchoice/
trunk/doc/help/membership/
trunk/doc/help/scstudio.hhc
trunk/doc/help/scstudio.hhp
Removed Paths:
-------------
trunk/doc/acyclic/
trunk/doc/fifo/
trunk/doc/localChoice/
trunk/doc/membership/
Modified: trunk/doc/CMakeLists.txt
===================================================================
--- trunk/doc/CMakeLists.txt 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/doc/CMakeLists.txt 2009-09-26 12:40:09 UTC (rev 379)
@@ -25,3 +25,8 @@
ADD_PDFLATEX_DOCUMENT(beautify)
ADD_PDFLATEX_DOCUMENT(memb_alg)
ENDIF(PDFLATEX_COMPILER)
+
+
+ADD_SUBDIRECTORY(help)
+
+# $Id$
Property changes on: trunk/doc/help
___________________________________________________________________
Added: svn:ignore
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
Added: trunk/doc/help/CMakeLists.txt
===================================================================
--- trunk/doc/help/CMakeLists.txt (rev 0)
+++ trunk/doc/help/CMakeLists.txt 2009-09-26 12:40:09 UTC (rev 379)
@@ -0,0 +1,20 @@
+FIND_PACKAGE(HTMLHelp)
+
+IF(HTML_HELP_COMPILER)
+ ADD_CUSTOM_TARGET(help ALL
+ DEPENDS scstudio.chm
+ )
+ ADD_CUSTOM_COMMAND(
+ OUTPUT scstudio.chm
+ COMMAND ${CMAKE_COMMAND} -DHTML_HELP_COMPILER=${HTML_HELP_COMPILER} -P ${CMAKE_CURRENT_SOURCE_DIR}/hhc.cmake
+ DEPENDS
+ help.css
+ algorithms.html
+ localChoice/localchoice.html
+ membership/membership_documentation.html
+ fifo/fifo.html
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ )
+ENDIF(HTML_HELP_COMPILER)
+
+# $Id$
Property changes on: trunk/doc/help/CMakeLists.txt
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Modified: trunk/doc/help/acyclic/acyclic.html
===================================================================
--- trunk/doc/acyclic/acyclic.html 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/doc/help/acyclic/acyclic.html 2009-09-26 12:40:09 UTC (rev 379)
@@ -4,9 +4,7 @@
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
<TITLE>Acyclic property</TITLE>
<meta name="author" content="Martin Chmelik">
- <META NAME="CREATED" CONTENT="20090924;16150000">
- <STYLE TYPE="text/css">
- </STYLE>
+ <LINK href="../help.css" rel="stylesheet" type="text/css"/>
</HEAD>
<BODY>
<H1>Acyclic property</H1>
Added: trunk/doc/help/algorithms.html
===================================================================
--- trunk/doc/help/algorithms.html (rev 0)
+++ trunk/doc/help/algorithms.html 2009-09-26 12:40:09 UTC (rev 379)
@@ -0,0 +1,15 @@
+<html>
+<head>
+<link href="help.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<h1>Algorithms</h1>
+The following verification algorithms are supported:
+<ul>
+<li><a href="acyclic/acyclic.html">Acyclic property</a></li>
+<li><a href="fifo/fifo.html">FIFO property</a></li>
+<li><a href="localChoice/localchoice.html">Nonlocal Choice</a></li>
+<li><a href="membership/membership_documentation.html">Membership</a></li>
+</ul>
+</body>
+</html>
Property changes on: trunk/doc/help/algorithms.html
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Modified: trunk/doc/help/fifo/fifo.html
===================================================================
--- trunk/doc/fifo/fifo.html 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/doc/help/fifo/fifo.html 2009-09-26 12:40:09 UTC (rev 379)
@@ -4,9 +4,7 @@
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
<TITLE>FIFO</TITLE>
<meta name="author" content="Martin Chmelik">
- <META NAME="CREATED" CONTENT="20090924;16150000">
- <STYLE TYPE="text/css">
- </STYLE>
+ <LINK href="../help.css" rel="stylesheet" type="text/css"/>
</HEAD>
<BODY>
<H1>FIFO property</H1>
Added: trunk/doc/help/help.css
===================================================================
--- trunk/doc/help/help.css (rev 0)
+++ trunk/doc/help/help.css 2009-09-26 12:40:09 UTC (rev 379)
@@ -0,0 +1,14 @@
+body {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 0.7em;
+ color: #000000;
+}
+h1 {
+ font-size: 1.2em;
+}
+h2 {
+ font-size: 1.0em;
+}
+h3 {
+ font-size: 1.0em;
+}
Property changes on: trunk/doc/help/help.css
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/doc/help/hhc.cmake
===================================================================
--- trunk/doc/help/hhc.cmake (rev 0)
+++ trunk/doc/help/hhc.cmake 2009-09-26 12:40:09 UTC (rev 379)
@@ -0,0 +1,6 @@
+# hhc.exe always returns nonzero exit codes
+# indicect hhc.exe execution is to avoid build error in visual studio
+EXECUTE_PROCESS(
+ COMMAND ${HTML_HELP_COMPILER} scstudio.hhp
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+)
Property changes on: trunk/doc/help/hhc.cmake
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Modified: trunk/doc/help/localchoice/localchoice.html
===================================================================
--- trunk/doc/localChoice/localchoice.html 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/doc/help/localchoice/localchoice.html 2009-09-26 12:40:09 UTC (rev 379)
@@ -4,16 +4,7 @@
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
<TITLE>Non-local choice</TITLE>
<meta name="author" content="Martin Chmelik">
- <META NAME="CREATED" CONTENT="20090924;16150000">
- <STYLE TYPE="text/css">
- .gallery table { float: left; margin: 0 5px 20px 0; }
- .gallery table { border-collapse: collapse; }
- .gallery table td { padding: 0; }
- .gallery table caption { font-size: 80%; }
- .vary .caption { height: 4em; vertical-align: top; }
- .vary table { width: 200px; }
- </STYLE>
-
+ <LINK href="../help.css" rel="stylesheet" type="text/css"/>
</HEAD>
<BODY>
<H1>Non-local choice</H1>
Modified: trunk/doc/help/membership/membership_documentation.html
===================================================================
--- trunk/doc/membership/membership_documentation.html 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/doc/help/membership/membership_documentation.html 2009-09-26 12:40:09 UTC (rev 379)
@@ -3,14 +3,7 @@
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
<TITLE>membership documentation</TITLE>
- <STYLE TYPE="text/css">
- .gallery table { float: left; margin: 0 5px 20px 0; }
- .gallery table { border-collapse: collapse; }
- .gallery table td { padding: 0; }
- .gallery table caption { font-size: 80%; }
- .vary .caption { height: 4em; vertical-align: top; }
- .vary table { width: 200px; }
- </STYLE>
+ <LINK href="../help.css" rel="stylesheet" type="text/css"/>
</HEAD>
<BODY LANG="en-US" DIR="LTR" STYLE="border: none; padding: 0in">
<h1>Membership</FONT></h1>
@@ -23,19 +16,19 @@
<DIV class="gallery vary">
<table><caption align="bottom"><i>Input bMSC</i></caption><tr><td>
-<img src="memebership_documentation2.png" width="265" height="265" border="0" alt="" title="Input bMSC">
+<img src="memebership_documentation2.png" border="0" alt="" title="Input bMSC">
</tr></td></table>
<table><caption align="bottom"><i>Input HMSC</i></caption><tr><td>
-<img src="memebership_documentation1.png" width="265" height="265" border="0" alt="" title="Input HMSC">
+<img src="memebership_documentation1.png" border="0" alt="" title="Input HMSC">
</tr></td></table>
<table><caption align="bottom"><i>bMSC01</i></caption><tr><td>
-<img src="memebership_documentation3.png" width="265" height="265" border="0" alt="" title="bMSC01">
+<img src="memebership_documentation3.png" border="0" alt="" title="bMSC01">
</tr></td></table>
<table><caption align="bottom"><i>bMSC02</i></caption><tr><td>
-<img src="memebership_documentation4.png" width="265" height="265" border="0" alt="" title="bMSC02">
+<img src="memebership_documentation4.png" border="0" alt="" title="bMSC02">
</tr></td></table>
</div>
<br clear="all">
@@ -71,35 +64,35 @@
<DIV class="gallery vary">
<table><caption align="bottom"><i>Input bMSC</i></caption><tr><td>
-<img src="memebership_documentation11.png" width="265" height="265" border="0" alt="" title="bMSC1">
+<img src="memebership_documentation11.png" border="0" alt="" title="bMSC1">
</tr></td></table>
<table><caption align="bottom"><i>Input HMSC</i></caption><tr><td>
-<img src="memebership_documentation5.png" width="265" height="265" border="0" alt="" title="Input HMSC" >
+<img src="memebership_documentation5.png" border="0" alt="" title="Input HMSC" >
</tr></td></table>
<table><caption align="bottom"><i>bMSC1</i></caption><tr><td>
-<img src="memebership_documentation6.png" width="265" height="265" border="0" alt="" title="bMSC2">
+<img src="memebership_documentation6.png" border="0" alt="" title="bMSC2">
</tr></td></table>
<table><caption align="bottom"><i>bMSC2</i></caption><tr><td>
-<img src="memebership_documentation7.png" width="265" height="265" border="0" alt="" title="bMSC2">
+<img src="memebership_documentation7.png" border="0" alt="" title="bMSC2">
</tr></td></table>
<table><caption align="bottom"><i>bMSC3</i></caption><tr><td>
-<img src="memebership_documentation8.png" width="265" height="265" border="0" alt="" title="bMSC3">
+<img src="memebership_documentation8.png" border="0" alt="" title="bMSC3">
</tr></td></table>
<table><caption align="bottom"><i>bMSC4</i></caption><tr><td>
-<img src="memebership_documentation9.png" width="265" height="265" border="0" alt="" title="bMSC4">
+<img src="memebership_documentation9.png" border="0" alt="" title="bMSC4">
</tr></td></table>
<table><caption align="bottom"><i>bMSC5</i></caption><tr><td>
-<img src="memebership_documentation10.png" width="265" height="265" border="0" alt="" title="bMSC5">
+<img src="memebership_documentation10.png" border="0" alt="" title="bMSC5">
</tr></td></table>
<table><caption align="bottom"><i>Result</i></caption><tr><td>
-<img src="memebership_documentation12.png" width="265" height="265" border="0" alt="" title="result">
+<img src="memebership_documentation12.png" border="0" alt="" title="result">
</tr></td></table>
</div>
<br clear="all">
Added: trunk/doc/help/scstudio.hhc
===================================================================
--- trunk/doc/help/scstudio.hhc (rev 0)
+++ trunk/doc/help/scstudio.hhc 2009-09-26 12:40:09 UTC (rev 379)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<HTML>
+<HEAD>
+<meta name="GENERATOR" content="Microsoft® HTML Help Workshop 4.1">
+<!-- Sitemap 1.0 -->
+</HEAD><BODY>
+<OBJECT type="text/site properties">
+ <param name="ImageType" value="Folder">
+</OBJECT>
+<UL>
+ <LI> <OBJECT type="text/sitemap">
+ <param name="Name" value="Algorithms">
+ <param name="Local" value="algorithms.html">
+ </OBJECT>
+ <UL>
+ <LI> <OBJECT type="text/sitemap">
+ <param name="Name" value="Acyclic property">
+ <param name="Local" value="acyclic\acyclic.html">
+ </OBJECT>
+ <LI> <OBJECT type="text/sitemap">
+ <param name="Name" value="FIFO property">
+ <param name="Local" value="fifo\fifo.html">
+ </OBJECT>
+ <LI> <OBJECT type="text/sitemap">
+ <param name="Name" value="Nonlocal Choice">
+ <param name="Local" value="localchoice\localchoice.html">
+ </OBJECT>
+ <LI> <OBJECT type="text/sitemap">
+ <param name="Name" value="Membership">
+ <param name="Local" value="membership\membership_documentation.html">
+ </OBJECT>
+ </UL>
+</UL>
+</BODY></HTML>
Property changes on: trunk/doc/help/scstudio.hhc
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/doc/help/scstudio.hhp
===================================================================
--- trunk/doc/help/scstudio.hhp (rev 0)
+++ trunk/doc/help/scstudio.hhp 2009-09-26 12:40:09 UTC (rev 379)
@@ -0,0 +1,11 @@
+[OPTIONS]
+Compatibility=1.1 or later
+Compiled file=scstudio.chm
+Contents file=scstudio.hhc
+Display compile progress=No
+Language=0x409 Angli\xE8tina (Spojen\xE9 st\xE1ty)
+Title=Sequence Chart Studio
+
+
+[INFOTYPES]
+
Property changes on: trunk/doc/help/scstudio.hhp
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Modified: trunk/src/check/boundedness/universal_boundedness_checker.h
===================================================================
--- trunk/src/check/boundedness/universal_boundedness_checker.h 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/check/boundedness/universal_boundedness_checker.h 2009-09-26 12:40:09 UTC (rev 379)
@@ -144,6 +144,12 @@
virtual std::wstring get_property_name() const
{ return L"Universal Boundedness"; }
+ /**
+ * Ralative path to a HTML file displayed as help.
+ */
+ virtual std::wstring get_help_filename() const
+ { return L""; }
+
virtual PreconditionList get_preconditions(MscPtr msc) const;
/**
Modified: trunk/src/check/liveness/deadlock_checker.h
===================================================================
--- trunk/src/check/liveness/deadlock_checker.h 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/check/liveness/deadlock_checker.h 2009-09-26 12:40:09 UTC (rev 379)
@@ -131,6 +131,12 @@
virtual std::wstring get_property_name() const
{ return L"Deadlock Free"; }
+ /**
+ * Ralative path to a HTML file displayed as help.
+ */
+ virtual std::wstring get_help_filename() const
+ { return L""; }
+
virtual PreconditionList get_preconditions(MscPtr msc) const;
/**
Modified: trunk/src/check/liveness/livelock_checker.h
===================================================================
--- trunk/src/check/liveness/livelock_checker.h 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/check/liveness/livelock_checker.h 2009-09-26 12:40:09 UTC (rev 379)
@@ -105,6 +105,12 @@
virtual std::wstring get_property_name() const
{ return L"Livelock Free"; }
+ /**
+ * Ralative path to a HTML file displayed as help.
+ */
+ virtual std::wstring get_help_filename() const
+ { return L""; }
+
virtual PreconditionList get_preconditions(MscPtr msc) const;
static LivelockCheckerPtr instance();
Modified: trunk/src/check/localchoice/local_choice_checker.h
===================================================================
--- trunk/src/check/localchoice/local_choice_checker.h 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/check/localchoice/local_choice_checker.h 2009-09-26 12:40:09 UTC (rev 379)
@@ -133,6 +133,12 @@
virtual std::wstring get_property_name() const
{ return L"Local Choice"; }
+ /**
+ * Ralative path to a HTML file displayed as help.
+ */
+ virtual std::wstring get_help_filename() const
+ { return L"localchoice/localchoice.html"; }
+
virtual PreconditionList get_preconditions(MscPtr msc) const;
/**
Modified: trunk/src/check/order/acyclic_checker.h
===================================================================
--- trunk/src/check/order/acyclic_checker.h 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/check/order/acyclic_checker.h 2009-09-26 12:40:09 UTC (rev 379)
@@ -69,6 +69,12 @@
virtual std::wstring get_property_name() const
{ return L"Acyclic"; }
+ /**
+ * Ralative path to a HTML file displayed as help.
+ */
+ virtual std::wstring get_help_filename() const
+ { return L"acyclic/acyclic.html"; }
+
virtual PreconditionList get_preconditions(MscPtr msc) const;
/**
Modified: trunk/src/check/order/fifo_checker.h
===================================================================
--- trunk/src/check/order/fifo_checker.h 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/check/order/fifo_checker.h 2009-09-26 12:40:09 UTC (rev 379)
@@ -82,6 +82,12 @@
virtual std::wstring get_property_name() const
{ return L"FIFO"; }
+ /**
+ * Ralative path to a HTML file displayed as help.
+ */
+ virtual std::wstring get_help_filename() const
+ { return L"fifo/fifo.html"; }
+
virtual PreconditionList get_preconditions(MscPtr msc) const;
/**
Modified: trunk/src/check/race/race_checker.h
===================================================================
--- trunk/src/check/race/race_checker.h 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/check/race/race_checker.h 2009-09-26 12:40:09 UTC (rev 379)
@@ -228,6 +228,12 @@
virtual std::wstring get_property_name() const
{ return L"Race Free"; }
+ /**
+ * Ralative path to a HTML file displayed as help.
+ */
+ virtual std::wstring get_help_filename() const
+ { return L""; }
+
virtual PreconditionList get_preconditions(MscPtr msc) const;
BMscPtr check_bmsc(BMscPtr bmsc, ChannelMapperPtr mapper);
Modified: trunk/src/check/realizability/realizability_checker.h
===================================================================
--- trunk/src/check/realizability/realizability_checker.h 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/check/realizability/realizability_checker.h 2009-09-26 12:40:09 UTC (rev 379)
@@ -48,6 +48,12 @@
virtual std::wstring get_property_name() const
{ return L"Strong realizability"; }
+ /**
+ * Ralative path to a HTML file displayed as help.
+ */
+ virtual std::wstring get_help_filename() const
+ { return L""; }
+
virtual PreconditionList get_preconditions(MscPtr msc) const;
/**
Modified: trunk/src/check/structure/name_checker.h
===================================================================
--- trunk/src/check/structure/name_checker.h 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/check/structure/name_checker.h 2009-09-26 12:40:09 UTC (rev 379)
@@ -135,6 +135,12 @@
virtual std::wstring get_property_name() const
{ return L"Unique instance names"; }
+ /**
+ * Ralative path to a HTML file displayed as help.
+ */
+ virtual std::wstring get_help_filename() const
+ { return L""; }
+
virtual PreconditionList get_preconditions(MscPtr msc) const;
/**
Modified: trunk/src/check/time/constrain_check.h
===================================================================
--- trunk/src/check/time/constrain_check.h 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/check/time/constrain_check.h 2009-09-26 12:40:09 UTC (rev 379)
@@ -130,6 +130,12 @@
return L"Time Constraints";
}
+ /**
+ * Ralative path to a HTML file displayed as help.
+ */
+ virtual std::wstring get_help_filename() const
+ { return L""; }
+
virtual Checker::PreconditionList get_preconditions(MscPtr msc) const;
/**
Modified: trunk/src/data/checker.h
===================================================================
--- trunk/src/data/checker.h 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/data/checker.h 2009-09-26 12:40:09 UTC (rev 379)
@@ -50,6 +50,11 @@
*/
virtual std::wstring get_property_name() const = 0;
+ /**
+ * Ralative path to a HTML file displayed as help.
+ */
+ virtual std::wstring get_help_filename() const = 0;
+
//! List of properties that must be satisfied before executing the check.
typedef std::vector<PrerequisiteCheck> PreconditionList;
Modified: trunk/src/view/visio/addon/addon.cpp
===================================================================
--- trunk/src/view/visio/addon/addon.cpp 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/view/visio/addon/addon.cpp 2009-09-26 12:40:09 UTC (rev 379)
@@ -72,55 +72,6 @@
return VAORC_SUCCESS;
}
-const int _FILE_PATH_SIZE = _MAX_PATH * 4;
-
-_bstr_t GetVisioModulePath()
-{
- TCHAR szPath[_FILE_PATH_SIZE];
- TCHAR szDrive[_MAX_PATH];
- TCHAR szDir[_FILE_PATH_SIZE];
- TCHAR szFileName[_MAX_PATH];
- TCHAR szExt[_MAX_PATH];
- std::basic_string<TCHAR> strDir;
- std::basic_string<TCHAR>::size_type uiPosition;
-
- // Get the full path including the Addon name.
- GetModuleFileName(GetModuleHandle(LoadStringResource(IDS_VSL_NAME).c_str()),
- szPath, sizeof(szPath) / sizeof(TCHAR));
-
- // Extract the path name of the Addon.
- if (szPath)
- {
- _tsplitpath(szPath, szDrive, szDir, szFileName, szExt);
- strDir = szDrive;
- strDir += szDir;
-
- // Extract the source path from the path name, since the path name
- // that was extracted will be for the Debug or Release version,
- // based on the project settings.
- uiPosition = strDir.rfind('\\');
-
- // If this is the last character in the string,
- // then find the next ('\\').
- if ((uiPosition != -1) && (uiPosition == strDir.size() - 1))
- {
- uiPosition = strDir.rfind('\\', uiPosition - 1);
- }
-
- // If it was the last character, then the position will be
- // next found ('\\'). If it was not the last character,
- // then this is the end of the actual Add-on path.
- if (uiPosition != -1)
- {
- // Include the last ('\\') in the path.
- strDir.resize(uiPosition + 1);
- }
-
- } // end szPath
-
- return _bstr_t(strDir.c_str());
-}
-
VAORC CStudioAddon::Run(LPVAOV2LSTRUCT pV2L)
{
TRACE("CStudioAddon::Run() called");
Modified: trunk/src/view/visio/addon/dllmodule.cpp
===================================================================
--- trunk/src/view/visio/addon/dllmodule.cpp 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/view/visio/addon/dllmodule.cpp 2009-09-26 12:40:09 UTC (rev 379)
@@ -77,6 +77,33 @@
return csRet;
}
+static const int _FILE_PATH_SIZE = _MAX_PATH * 4;
+
+std::basic_string<TCHAR> GetVisioModulePath()
+{
+ TCHAR szPath[_FILE_PATH_SIZE];
+ TCHAR szDrive[_MAX_PATH];
+ TCHAR szDir[_FILE_PATH_SIZE];
+ TCHAR szFileName[_MAX_PATH];
+ TCHAR szExt[_MAX_PATH];
+ std::basic_string<TCHAR> strDir;
+ std::basic_string<TCHAR>::size_type uiPosition;
+
+ // get the full path including the Addon name
+ GetModuleFileName(GetModuleHandle(LoadStringResource(IDS_VSL_NAME).c_str()),
+ szPath, sizeof(szPath) / sizeof(TCHAR));
+
+ // extract the path name of the Addon
+ if (szPath)
+ {
+ _tsplitpath(szPath, szDrive, szDir, szFileName, szExt);
+ strDir = szDrive;
+ strDir += szDir;
+ }
+
+ return strDir;
+}
+
class RegistryValueNotFound
{ };
Modified: trunk/src/view/visio/addon/dllmodule.h
===================================================================
--- trunk/src/view/visio/addon/dllmodule.h 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/view/visio/addon/dllmodule.h 2009-09-26 12:40:09 UTC (rev 379)
@@ -23,6 +23,7 @@
std::wstring LoadStringResource(UINT uiID);
std::wstring GetVersionInfo(const LPWSTR block);
+std::basic_string<TCHAR> GetVisioModulePath();
DWORD GetRegistryDWORD(const TCHAR* subkey, const TCHAR* parameter, DWORD default_value);
int SetRegistryDWORD(HKEY key, const TCHAR* subkey, const TCHAR* parameter, DWORD value);
Modified: trunk/src/view/visio/addon/dllmodule.rc
===================================================================
--- trunk/src/view/visio/addon/dllmodule.rc 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/view/visio/addon/dllmodule.rc 2009-09-26 12:40:09 UTC (rev 379)
@@ -171,7 +171,7 @@
BEGIN
IDS_ADDON_NAME "Sequence Chart Studio"
IDS_ERROR_VISIO_VERSION "This application requires Microsoft Office Visio 2003 or later."
- IDS_VSL_NAME "msc.vsl"
+ IDS_VSL_NAME "scstudio.vsl"
IDS_REPORT_VIEW "Verification Report"
END
Modified: trunk/src/view/visio/addon/document.cpp
===================================================================
--- trunk/src/view/visio/addon/document.cpp 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/view/visio/addon/document.cpp 2009-09-26 12:40:09 UTC (rev 379)
@@ -38,6 +38,8 @@
#include <boost/graph/breadth_first_search.hpp>
#include <boost/graph/topological_sort.hpp>
+#include <htmlhelp.h>
+
Visio::IVPagePtr GetOrCreatePage(Visio::IVPagesPtr pages, const TCHAR* name)
{
Visio::IVPagePtr page;
@@ -654,7 +656,8 @@
if(!all_preconditions)
{
m_reportView->Print(RS_WARNING, stringize() << vsoPage->Name << ": "
- << msc_checker->get_property_name() << " skipped. Required prerequisites not satisfied.");
+ << msc_checker->get_property_name()
+ << " skipped. Required prerequisites not satisfied.", msc_checker->get_help_filename());
if(boost::get(max_priority_map, *cpos) == PrerequisiteCheck::PP_REQUIRED)
error_count++;
@@ -674,7 +677,8 @@
if(!all_preconditions)
{
m_reportView->Print(RS_WARNING, stringize() << vsoPage->Name << ": "
- << msc_checker->get_property_name() << " skipped. Required prerequisites not satisfied.");
+ << msc_checker->get_property_name()
+ << " skipped. Required prerequisites not satisfied.", msc_checker->get_help_filename());
if(boost::get(max_priority_map, *cpos) == PrerequisiteCheck::PP_REQUIRED)
error_count++;
@@ -704,7 +708,8 @@
if(boost::get(max_priority_map, *cpos) == PrerequisiteCheck::PP_REQUIRED)
{
m_reportView->Print(RS_ERROR, stringize() << vsoPage->Name << ": "
- << msc_checker->get_property_name() << " violated.", result);
+ << msc_checker->get_property_name()
+ << " violated.", result, msc_checker->get_help_filename());
error_count++;
}
@@ -713,7 +718,8 @@
&& output_level >= OL_WARNING)
{
m_reportView->Print(RS_WARNING, stringize() << vsoPage->Name << ": "
- << msc_checker->get_property_name() << " violated.", result);
+ << msc_checker->get_property_name()
+ << " violated.", result, msc_checker->get_help_filename());
}
}
else
@@ -728,7 +734,8 @@
&& output_level >= OL_NOTIFY)
{
m_reportView->Print(RS_NOTICE, stringize() << vsoPage->Name << ": "
- << msc_checker->get_property_name() << " satisfied.");
+ << msc_checker->get_property_name()
+ << " satisfied.", msc_checker->get_help_filename());
}
}
@@ -1225,6 +1232,16 @@
return 0;
}
+int CDocumentMonitor::InvokeHelp(const std::wstring& filename)
+{
+ std::basic_string<TCHAR> path = GetVisioModulePath();
+ path += _T("scstudio.chm::/");
+ path += filename;
+
+ m_vsoApp->InvokeHelp(path.c_str(), HH_DISPLAY_TOPIC, 1);
+ return 0;
+}
+
Visio::IVShapePtr CDocumentMonitor::FindShape(const _bstr_t& id)
{
for(int i = 1; i <= m_vsoDocument->Pages->Count; i++)
Modified: trunk/src/view/visio/addon/document.h
===================================================================
--- trunk/src/view/visio/addon/document.h 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/view/visio/addon/document.h 2009-09-26 12:40:09 UTC (rev 379)
@@ -57,6 +57,7 @@
void ExportActiveDocument(const ExportFormatterPtr& formatter, std::ostream& stream);
int DisplayDocument(const MscPtr& msc);
+ int InvokeHelp(const std::wstring& filename);
Visio::IVShapePtr FindShape(const _bstr_t& id);
int SelectShapes(const std::vector<_bstr_t>& ids);
Modified: trunk/src/view/visio/addon/reportview.cpp
===================================================================
--- trunk/src/view/visio/addon/reportview.cpp 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/view/visio/addon/reportview.cpp 2009-09-26 12:40:09 UTC (rev 379)
@@ -47,9 +47,20 @@
int line = LineFromChar(ch);
TRACE("CRichList::OnLButtonDblClk() called at line " << line);
- return m_reporter->OnLineDblClk(line);
+ return m_reporter->OnLineShow(line);
}
+LRESULT CRichList::OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+ LONG ch1, ch2;
+ // get caret position
+ GetSel(ch1, ch2);
+ int line = LineFromChar((ch1+ch2)/2);
+
+ TRACE("CRichList::OnHelp() called at line " << line);
+ return m_reporter->OnLineHelp(line);
+}
+
CReportView::CReportView(CDocumentMonitor *monitor)
: m_edit(this)
{
@@ -116,8 +127,19 @@
std::wstring m_text;
};
-int CReportView::__Print(TReportSeverity severity, const std::wstring& message, int hasLink)
+void SetSelection(CRichList& edit, const std::pair<int,int>& pos)
{
+ edit.SetSel(pos.first, pos.second);
+ CHARFORMAT2 cf;
+ cf.cbSize = sizeof(cf);
+ cf.dwMask = CFM_LINK;
+ cf.dwEffects = CFE_LINK;
+ edit.SetSelectionCharFormat(cf);
+}
+
+int CReportView::__Print(Reference& reference,
+ TReportSeverity severity, const std::wstring& message)
+{
// display the report view
m_documentMonitor->ShowReportView();
@@ -154,8 +176,14 @@
break;
}
- if(hasLink)
+ // determine what hyperlinks to display
+ bool hasShow = !reference.shapes.empty() || reference.drawing != NULL;
+ bool hasHelp = !reference.help.empty();
+
+ if(hasShow)
sstr << " [show]";
+ if(hasHelp)
+ sstr << " [?]";
sstr << "\\line" << rtfSuffix;
@@ -166,49 +194,71 @@
// append RTF to the list
long res = m_edit.StreamIn(SF_RTF | SFF_SELECTION, es);
- if(hasLink)
+ // position after the last character
+ int cpos = m_edit.GetTextLengthEx(GTL_NUMCHARS)-1;
+
+ if(hasHelp)
{
- int linkpos = m_edit.GetTextLengthEx(GTL_NUMCHARS);
+ reference.help_pos = std::make_pair<int,int>(cpos-2, cpos-1);
+ SetSelection(m_edit, reference.help_pos);
+ cpos -= 4; // length of " [?]"
+ }
- m_edit.SetSel(linkpos-6, linkpos-2);
- CHARFORMAT2 cf;
- cf.cbSize = sizeof(cf);
- cf.dwMask = CFM_LINK;
- cf.dwEffects = CFE_LINK;
- m_edit.SetSelectionCharFormat(cf);
+ if(hasShow)
+ {
+ reference.show_pos = std::make_pair<int,int>(cpos-5, cpos-1);
+ SetSelection(m_edit, reference.show_pos);
}
m_edit.LineScroll(1);
return 0;
}
-int CReportView::Print(TReportSeverity severity, const std::wstring& message, const std::vector<_bstr_t>& shapelist)
+int CReportView::Print(TReportSeverity severity, const std::wstring& message,
+ const std::wstring& help)
{
- __Print(severity, message, !shapelist.empty());
+ Reference reference;
+ reference.help = help;
+ __Print(reference, severity, message);
+
+ m_references.push_back(reference);
+ return 0;
+}
+
+int CReportView::Print(TReportSeverity severity, const std::wstring& message,
+ const std::vector<_bstr_t>& shapelist, const std::wstring& help)
+{
Reference reference;
reference.shapes = shapelist;
- // append new line to the list of references
+ reference.help = help;
+
+ __Print(reference, severity, message);
+
m_references.push_back(reference);
-
return 0;
}
-int CReportView::Print(TReportSeverity severity, const std::wstring& message, const MscPtr& msc)
+int CReportView::Print(TReportSeverity severity, const std::wstring& message,
+ const MscPtr& msc, const std::wstring& help)
{
- __Print(severity, message, msc != NULL);
-
Reference reference;
reference.drawing = msc;
- // append new line to the list of references
+ reference.help = help;
+
+ __Print(reference, severity, message);
+
m_references.push_back(reference);
-
return 0;
}
int CReportView::print(TReportSeverity severity, const std::wstring& message)
{
- __Print(severity, message, false);
+ Reference reference;
+
+ __Print(reference, severity, message);
+
+ m_references.push_back(reference);
return 0;
}
@@ -243,15 +293,24 @@
if (link->msg == WM_LBUTTONDOWN)
{
int line = m_edit.LineFromChar(link->chrg.cpMin);
+ TRACE("CReportView::OnLink() called on line " << line);
- TRACE("CReportView::OnLink() called on line " << line);
- OnLineDblClk(line);
+ if(link->chrg.cpMin >= m_references[line].show_pos.first &&
+ link->chrg.cpMax <= m_references[line].show_pos.second)
+ {
+ OnLineShow(line);
+ }
+ else if(link->chrg.cpMin >= m_references[line].help_pos.first &&
+ link->chrg.cpMax <= m_references[line].help_pos.second)
+ {
+ OnLineHelp(line);
+ }
}
return 0;
}
-LRESULT CReportView::OnLineDblClk(size_t line)
+LRESULT CReportView::OnLineShow(size_t line)
{
// the user might have clicked beyond the last line
if(line >= m_references.size())
@@ -266,6 +325,15 @@
return 0;
}
+LRESULT CReportView::OnLineHelp(size_t line)
+{
+ if(line >= m_references.size())
+ return 0;
+
+ m_documentMonitor->InvokeHelp(m_references[line].help);
+ return 0;
+}
+
void CReportView::OnFinalMessage(HWND hWnd)
{
TRACE("CReportView::OnFinalMessage() called");
Modified: trunk/src/view/visio/addon/reportview.h
===================================================================
--- trunk/src/view/visio/addon/reportview.h 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/view/visio/addon/reportview.h 2009-09-26 12:40:09 UTC (rev 379)
@@ -42,6 +42,7 @@
BEGIN_MSG_MAP(CRichList)
MESSAGE_HANDLER(WM_CREATE, OnCreate)
MESSAGE_HANDLER(WM_LBUTTONDBLCLK, OnLButtonDblClk)
+ MESSAGE_HANDLER(WM_HELP, OnHelp)
END_MSG_MAP()
// Handler prototypes:
@@ -51,6 +52,7 @@
LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnLButtonDblClk(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+ LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
private:
CReportView *m_reporter;
@@ -83,8 +85,13 @@
void Reset();
int Print(TReportSeverity severity, const std::wstring& message,
- const std::vector<_bstr_t>& shapelist = std::vector<_bstr_t>());
- int Print(TReportSeverity severity, const std::wstring& message, const MscPtr& msc);
+ const std::wstring& help = std::wstring());
+ int Print(TReportSeverity severity, const std::wstring& message,
+ const std::vector<_bstr_t>& shapelist,
+ const std::wstring& help = std::wstring());
+ int Print(TReportSeverity severity, const std::wstring& message,
+ const MscPtr& msc,
+ const std::wstring& help = std::wstring());
virtual int print(TReportSeverity severity, const std::wstring& message);
@@ -105,7 +112,8 @@
LRESULT OnLink(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
- LRESULT OnLineDblClk(size_t line);
+ LRESULT OnLineShow(size_t line);
+ LRESULT OnLineHelp(size_t line);
void OnFinalMessage(HWND hWnd);
private:
@@ -114,14 +122,24 @@
int m_statistics[__RS_LAST];
- int __Print(TReportSeverity severity, const std::wstring& message, int hasLink);
-
struct Reference
{
+ Reference()
+ {
+ show_pos = std::make_pair<int,int>(0, 0);
+ help_pos = std::make_pair<int,int>(0, 0);
+ }
+
std::vector<_bstr_t> shapes; // shapes to select
MscPtr drawing; // drawing to display
+ std::wstring help; // help to display
+
+ std::pair<int,int> show_pos;
+ std::pair<int,int> help_pos;
};
+ int __Print(Reference& reference, TReportSeverity severity, const std::wstring& message);
+
typedef std::vector<Reference> ReferenceList;
// UniqueID's of shapes referenced by lines in this report
ReferenceList m_references;
Modified: trunk/src/view/visio/scstudio.nsi
===================================================================
--- trunk/src/view/visio/scstudio.nsi 2009-09-25 20:45:29 UTC (rev 378)
+++ trunk/src/view/visio/scstudio.nsi 2009-09-26 12:40:09 UTC (rev 379)
@@ -21,7 +21,7 @@
; -- General ---------------------------
-!define VERSION "0.3.11"
+!define VERSION "0.3.12"
Name "Sequence Chart Studio"
OutFile "scstudio-setup-${VERSION}.exe"
@@ -122,6 +122,7 @@
SetOutPath $INSTDIR\bin
File "addon\Release\scstudio.vsl"
+ File "..\..\..\doc\help\scstudio.chm"
File "..\..\..\Release\*.dll"
${AppendRegStr} ${Visio11RegPath} "Application" "AddonsPath" "$INSTDIR\bin"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|