Mscgen / trace2uml input file generator from source code - input

is there a way to generate Mscgen / trace2uml compatible input files (description files/text) from source code, to be able to later generate the sequence diagrams? The project homepages mention Message Sequence Chart descriptions that no program seem to generate. I would hate to go over the entire code and create the sequence descriptors myself. Other tools that would let me generate sequence diagrams from source code would help too..

"generating sequence charts from source code" is not possible. Because a state chart is not a statically view to the program, but a view to an example of a program RUN.
But you can "trace" a program, while it is running, and use the trace output for the diagram. Thats the reason, why Trace2UML is called "trace to uml" ;-)
All you need is a trace framework (class) that does the correct trace formate.
A good one is "Trace2UML.cpp" you can find in the Astade distribution.
e.g.: http://daily.astade.de/2011-08-25/astade-1.1.4-dev-2375.tar.gz

Related

syntax editor - how to write dynamic language xml definition file?

So I want to create my own programming language in vb.net 2013 and I see SyntaxEditor by actipro software fits, but how do I write xml definition file that tells which words how to be colored? is there a tutorial somewhere?
Also, how do I make the syntax editor to display the number of the line?
SCREENSHOOT OF MY PROGRAM
Showing the line number is just a property of the SyntaxEditor-control: in WPF-version it is "IsLineNumberMarginVisible". you have to set it to "true". I assume the property in WinForms-version has the same name.
when you install Actipro then there are a lot of samples included. Just look for files named *.langdef and you will find a lot of files where you can see how they shall look like.
There is also a tool "LanguageDesigner.exe" delivered with SyntaxEditor. It gives you a nice UI to create and edit the language file.
Generally I recommend to take a look at the sample projects, specially the SampleBrowser-Project with the "GettingStarted01" to "GettingStarted15" controls.

generate programmatically text-symbols with ABAP

I've created a program with FM: TR_TADIR_POPUP_ENTRY_E071. I am trying to generate at the same time text-symbols for this program.
Any ideas how to do that?
I think there's no standard interface for that. Check the ABAP statement INSERT TEXTPOOL. Documentation is placed here.
Before anything I recommend you to manually create a local program with text-symbols and in another program read the texts with READ TEXTPOOL command to see what's the data structure. In that way you can build up the input data.
SAPLINK uses this technique also.

Custom GUI template script creator

My app currently reads a script containing instructions on what the app should do next. Think of it this way ---> My app is like an orchestra, and when it is passed sheet music (the script), it knows what to do. The sheet defines what different parts of the orchestra do at different times.
Currently, writing the script by hand is tedious. I want to be able to define chunks, which I can drag and drop from my gui to the script. I was wondering if there already is tools which let you do something like this, or if I should write my own tool.
Basically, when I click on something in the gui, it should insert a template into my plist, which I can tweak.
EDIT: It looks like the ability to create "Property list Structure Definitions" is what I am after. I have tried searching the apple site, but I can't find any documentation.
Two things come to mind:
You don't mention what format the input is in, nor what you want the GUI tool to do beyond letting you "drag chunks". But if you can define your format into an XML schema, then you can use any number of XML authoring tools that customize their interface based on schema. Also gives you the ability to make it easy to let the UI enter parameters/customization, which your script language likely has. Final bonus: you might be able to convert script directly into a plist with a simple XSLT file.
Check out Briefs, which is a prototyping application for iOS apps that has a similar architecture.

CDash Custom Dynamic Analysis

I'm trying to integrate custom dynamic analysis tools to CDash. Such as KWStyle, CppCheck and Visual Leak Detector.
I'v figured out that I need to generate a DynamicAnalysis.xml file and submit it to CDash, from CTest scripts.
I think I know how to run the external tool as a part of the ctest script.
Either by using these variables to change how ctest_memcheck() works
CTEST_MEMORYCHECK_COMMAND
CTEST_MEMORYCHECK_SUPPRESSIONS_FILE
CTEST_MEMORYCHECK_COMMAND_OPTIONS
or by running the tool from the execute_process() command.
But I'm a bit uncertain which one to use.
The main problem I think I have is, how can I extract errors from the output of the custom tool and include that information into the DynamicAnalysis.xml to submit?
The extreme solution i see is that i'd need to make a program that generates a valid DynamicAnalysis.xml file.
But the problem is that I don't know the syntax of the DefectList element in the XML file. I have found no answer from google and even the XML Schema for that file is unhelpful.
EDIT:
Looking at this:
http://www.cdash.org/CDash/viewDynamicAnalysis.php?buildid=987149
What draws my attention are the labels, especially the empty ones. I don't see how these would come from the DynamicAnalysis.xml file. Maybe it tracks any labels that have ever appearred? Can i create my own custom labels somehow?
Does CDash create the labels automatically, depending on the tool type? Does this block custom defect types?
I'm just guessing here, so the question is; can i create custom labels for my custom tool, just by generating a DynamicAnalysis.xml - file.
It occurred to me that the amount of different errors from CppCheck (static code analysis) is huge, compared to valgrind for instance. I'm not that certain that I should use the dynamic analysis. Maybe a custom build type (Continuous / Experimental / Nightly) thing would work better. Like this:
http://www.cdash.org/CDash/buildSummary.php?buildid=930174
I have no idea how to do this, i guess it requires meddling around with CDash code?
Which one would work better?
If you are using valgrind, you can simply set CTEST_MEMORYCHECK_COMMAND to the full path to valgrind, and ctest will generate the DynamicAnalysis.xml file for you from the valgrind output when you call ctest_memcheck.
The best way to understand the possible values that can appear in the DynamicAnalysis.xml file is to analyze the source code of CTest.
The file CMake/Source/CTest/cmCTestMemCheckHandler.cxx has the list of defect types in a variable named "cmCTestMemCheckResultLongStrings". Search through that file for references to that variable to see what the possible values are and how they are used to generate "<Defect/>" xml elements.
EDIT (for additional information):
You can also easily see what XML elements CDash is expecting by inspecting its source code. Specifically, the file "CDash/xml_handlers/dynamic_analysis_handler.php".
From what I'v learned so far, is that for a tool that runs on the tests made in the cmake script, the Dynamic Analysis is the thing.
For tools that run on the entire program, a custom Build.xml is the thing you need.
I found out that i can commit those files from the ctest_submit command by using the FILES parameter.
I also found out that you can add custom "build names" to the side of Continuous, Nightly, and others.
And that you can set the builds from certain machines to be automatically transferred under these.
The custom labels under DynamicAnalysis did come from somewhere in CDash, i can't remember where anymore.

script generation in GMF

i have created my own graphical editor using GMF.
i want to generate code based on the diagram created by editor? any pointers how to proceed
This might help you:
http://www.vogella.de/articles/EclipseBuilder/article.html
That page doesn't have the actual code example but the points to the necessary concepts: Builders. For example, the java compiler is hooked in through a builder that's registered for the .java type.