Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: eckard_klotz on June 21, 2013, 08:20:45 am

Title: Moritz plugin
Post by: eckard_klotz on June 21, 2013, 08:20:45 am
Hello ToApolytoXaos.

I'm the developer behind the two sourceforge projects:

Moritz : http://sourceforge.net/projects/moritz/
MuLanPa : http://sourceforge.net/projects/mulanpa/

Both are open-source freeware-projects and should be used as an extension of Doxygen to create algorithm describing diagrams like nassi shneiderman or uml activity diagrams by analysing the existing source code.

I want to publish with the next snapshot my C::B project files also but until now the current snapshots may not fit your needs without the knowledge about the needed sources for one specific binary.

But the sources-container in the official distributions contain only those sources for one binary. Thus please download one of them and add all sources in there to one project.

Src_xml2abc_2013_03_26.zip ->
http://sourceforge.net/projects/moritz/files/Moritz_2.x/Moritz_1.9.07/


Src_abc2xml_2013_03_26.zip ->
http://sourceforge.net/projects/mulanpa/files/MuLanPa_0/MuLanPa_0_09_02/

Note this are only my C++ based hobby-projects. In my company I work still with C based projects and there you have really long lists of functions, variables, macros, ...
But I'm not allowed to provide them as an example. I hope you understand this.

Best regards,
                     Eckard.

PS.: Since my internet-resources may be limited at the week-end please accept my apologize if I respond to your next questions on Monday.

Edit: changed the title.
Title: Re: Moritz plugin
Post by: MortenMacFly on June 21, 2013, 01:15:13 pm
Moritz : http://sourceforge.net/projects/moritz/
Interesting! I am using this one myself. Great work! ;)

Edit: changed the title.
Title: Re: Moritz plugin
Post by: eckard_klotz on June 21, 2013, 01:36:21 pm
Hello Morten.

Currently I have still a lot to to finish my work for releasing Moritz 2.0.0. But since I do the development with C::B I asked my self it it would be also interesting to have a C::B Plugin for it.

What do you think?

Best regards,
                  Eckard.

Edit: changed the title.
Title: Re: Moritz plugin
Post by: MortenMacFly on June 21, 2013, 03:51:13 pm
I asked my self it it would be also interesting to have a C::B Plugin for it.
Depends on what it should do: We have a doxygen plugin as well as a nassi shneiderman plugin. So if you plan a plugin to help setting up the control files and inputs for moritz, look at the first one. If you think about visualisation, take a look at the second one. If you think of more: Integrating the parser, whats-o-ever... please explain. :-)

Edit: changed the title.
Title: Re: Moritz plugin
Post by: eckard_klotz on June 22, 2013, 01:48:22 pm
Hello Morten.

First of all thank you for your interest. Second if the content of this post is not really fitting to the forum I used please feel free to move it. But I wanted not to open a new plug-in topic without your agreement that the idea behind is worth to be discussed there.

I know that a nassi shneiderman diagram editor already exists as plug in as well as a plug in for Doxygen.  But first side I understand the existing nsd plug-in more as a tool to  describe what you want to implement while Moritz is a tool to describe what you have implemnted. And second side Moritz_2 is completely new developed and is not using Doxygen as parser any more, it has its own parser now (even the outputs of Moritz should still be usable with Doxygen).

Moritz_2 contains two binaries abc2xml and xml2abc. The first one is a parser that transfers a source-text into a xml-file. The second tool transfers the content of a xml-file into a text-file that normaly describes diagrams. Both tools are highly configurable. The binary abx2xml uses external text-files (attachment a2x) to learn how to parse the source. The binary xml2abc uses external text-files (attachment x2a) which contain text-snippets to learn how to build its textual output.

Both tools read this text-files while run time:


Moritz_2 is much more powerful than Moritz_1 but unfortunately much more complex to configure also. Thus there is the need of a wizard tool that helps to use only those parts of the configuration the user really needs and that offers all other configurations on special expert tabs. The binaries them self should be still independent tools and the configuration-files created by the plug-in should be usable in a in independent batch-run without C::B too.

But more may be thinkable in the future:
But note this are only possibilities we may think about later (from my perspective much later).

As I wrote before, currently I'm still busy with the final work on the binaries them self. I hope that I'm able to publish Moritz 2.0.0 in autumn 2013. This version will not contain everything I have planed but I think it is good enough to show the audience how the future of Moritz should look like. All main changes in the way of how to configure the tools should be done. This means than it is the right time to think about a graphical wizard.

Best Regards,
                  Eckard.

Edit: changed the title.
Title: Re: Moritz plugin
Post by: MortenMacFly on June 22, 2013, 07:47:13 pm
Ok - If you think of a plugin in terms of a graphical wizard its a new one. I don't know how flexible the interface of the Nassi Shneiderman plugin is, but maybe the MIME handler does allow opening these diagrams from another plugin. For running the Moritz tool from within the wizard I see no issue. For extracting functions... this might be different, cause CC has no public API you can query. This is a long-term discussion meanwhile because we see it would be nice, but I'm afraid it won't be implemented any time soon. that's why other plugin like Doxygen and/or the HeaderFixup plugin have their own parsers for functions you may be able to re-use.

In fact I have to admit that I am still sticking with Moritz1, so for me it was (is) still an extension to Doxygen. Maybe I should look into Moritz2 so that things getting clearer.
Title: Re: Moritz plugin
Post by: danselmi on June 23, 2013, 06:09:17 pm
Hi

The  Nassi Shneiderman plugin is also able to generate a diagram from code. It uses boost::spirit to parse the code. It is able to parse parts of C language. It is possible to edit these diagrams and take back into code.

Sure, it is possible to change it's parser (it is not very good atm). So if you have some questions, don't hesitate to ask.

regards, danselmi
Title: Re: Moritz plugin
Post by: eckard_klotz on June 24, 2013, 08:04:23 am
Hello Danselmi.

Please don't take me wrong. I don't want to replace your plug-in. The focus of Moritz is still to generate additional input for tools like Doxygen. But since it is using its own binaries to parse the code and to generate diagram describing text-files it is possible to use it for other purposes also. That's why I asked  if the C::B team would be interested.

But I see it like Morten:
Quote
This is a long-term discussion meanwhile
...
Quote
but I'm afraid it won't be implemented any time soon.

For me the most important functionality would be a plug-in that helps the user to configure the parser (abc2xml) and the generator (xml2abc) like C::B offers as preferences dialogue for Doxygen.  A toolbar to insert special commands (comments with special content) and to run the tools and to show its shell output may be nice.

Once I was able to implement this and you accept my work as usable plug-in we may discuss what may be possible and useful also.

Best regards,
                     Eckard.
Title: Re: Moritz plugin
Post by: eckard_klotz on September 16, 2013, 03:53:48 pm
Hello Everybody.

After 4 years of refactoring the first milestone having the next major release is nearly reached. The completely new developed Moritz2 presents with the demo-version 8 its first release-candidate (under https://www.moritz.sourceforge.net or https://www.sourceforge.net/projects/moritz/ use “Browse All Files”).

Most of the features already known from the older Moritz1 are still available:
1. Generation of Nassi-Shneiderman diagrams based on HTML.
2. Control of the diagrams by using special commands inside of comments.
Furthermore new features are available:
1.Generation of uml-like activity-diagrams based on dot( http://www.graphviz.org ).
2.Support of more programming-languages (C/Cpp, Python, Matlab, Pascal)

Another new feature is an own parser. Thus Moritz can be used independently from other tools to generate its output. Furthermore the xml-output created by the parser represents the parser-tree of the source in other words the algorithm and not the document-structure.
The new release contains one windows-distribution and one linux-distribution together with documentation-files (please use “Browse All Files” and ignore the download-proposal).
To use Moritz for different source projects an user-project is available, that contains only the needed output-folders and templates for the basic configurations. It should be copied near to the source-project and combined with the distribution (please refer the page „User-Project “ of the documentation)
If you want to build the binaries (abc2xml and xml2abc) by your self, you will find the sources of xml2abc in the current release of Moritz and the sources of abc2xml in the current release of its partner-project MuLanPa (under https://www.mulanpa.sourceforge.net or https://www.sourceforge.net/projects/mulanpa/ )

If you have questions or doubts you will find in both projects forum-places:
Source-Parser:
Discussion: https://sourceforge.net/p/mulanpa/discussion/
Bugs: https://sourceforge.net/p/mulanpa/tickets/
Diagram-Generator:
Discussion: https://sourceforge.net/p/moritz/discussion/
Bugs: https://sourceforge.net/p/moritz/bugs/
Even the development has reached a nearly stable point this means not that it is perfect. Thus please don't hesitate to use the forum.

One of the next steps for me will be to start the development of the Code::Blocks plug-in to support the use of the simple user-project like promised before. But since I’m new in writing plug-ins for C::B and in parallel I still have to do some work in finishing the release please be patient.

Best Regards,
                   Eckard Klotz.