NassiShneiderman plugin: Difference between revisions
From Code::Blocks
Created page with 'NassiShneiderman plugin allows the creation of [http://en.wikipedia.org/wiki/Nassi%E2%80%93Shneiderman_diagram Nassi Shneiderman diagrams] within Code::Blocks. =Create a diagra…' |
m moved NassiShneiderman to NassiShneiderman plugin: Added "plugin" as suffix. |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
NassiShneiderman plugin allows the creation of [ | [[Category: Code::Blocks Contrib Plugins]] | ||
{{Infobox_Plugin| | |||
name = NassiShneiderman | | |||
logo = [[File:Generic-plugin.png]] | | |||
developer = Daniel Anselmi | | |||
maintainer = | | |||
version = 0.1 | |||
}} | |||
NassiShneiderman plugin allows the creation of [[wikipedia:Nassi-Shneiderman diagram|Nassi Shneiderman diagrams]] within Code::Blocks. | |||
| Line 5: | Line 13: | ||
There are two possibilities to create a diagram. | There are two possibilities to create a diagram. | ||
# To create an empty diagram select the menu options "File"->"New"->"Nassi Shneiderman diagram". | # To create an empty diagram select the menu options "File"->"New"->"Nassi Shneiderman diagram". | ||
# The second option creates a diagram from C/C++ source code. | # The second option is to creates a diagram from C/C++ source code. | ||
In an editor window highlight some code to create the diagram from. For example the body of a function/method from the opening braces till the closing brace. Then right click the selection and choose "Nassi Shneiderman"->" | In an editor window highlight some code to create the diagram from. For example the body of a function/method from the opening braces till the closing brace. Then right click the selection and choose "Nassi Shneiderman"->"Create diagram". | ||
[[File:NassiShneidermanCreate1.png]]<br /> | [[File:NassiShneidermanCreate1.png]]<br /> | ||
You should get a new diagram:<br /> | You should get a new diagram:<br /> | ||
| Line 31: | Line 39: | ||
# Drag'n'Drop the diagram (or parts of it) to other tools. For example to OpenOffice Writer to get an image in your documentation. | # Drag'n'Drop the diagram (or parts of it) to other tools. For example to OpenOffice Writer to get an image in your documentation. | ||
If the | If the chosen diagram has a selection, the export or code-generation takes only this part of the diagram. | ||
| Line 38: | Line 46: | ||
# break has a special brick with an "right-arrow" | # break has a special brick with an "right-arrow" | ||
# continue has a special brick with a "left-arrow" | # continue has a special brick with a "left-arrow" | ||
# To be able to create diagrams from c/c++ switch statements, the selection does not | # To be able to create diagrams from c/c++ switch statements, the selection does not implicitly break before a case. The different cases are vertically aligned. | ||
Latest revision as of 19:17, 11 September 2011
NassiShneiderman plugin allows the creation of Nassi Shneiderman diagrams within Code::Blocks.
Create a diagram
There are two possibilities to create a diagram.
- To create an empty diagram select the menu options "File"->"New"->"Nassi Shneiderman diagram".
- The second option is to creates a diagram from C/C++ source code.
In an editor window highlight some code to create the diagram from. For example the body of a function/method from the opening braces till the closing brace. Then right click the selection and choose "Nassi Shneiderman"->"Create diagram".

You should get a new diagram:
The parser has some limitations:
- Comments can not be at the end of a branch.
- From a definition of a function it is only able to parse the body, not the declaration.
- For sure, you will find a lot more...
Editing structograms
What to do with a diagram?
You can do a lot of things with a structogram:
- Store for later usage. The diagram can be stored "File"->"Save file" or "File"->"Save file as...".
- It is possible to export to different formats "File"->"Export"->
- "Export source..." to save as C source file.
- "StrukTeX" to use in your documentation in LaTeX.
- "PNG" or "PS" and eventually "SVG" to have a diagram in an image format known by a lot of other tools.
- Directly insert the code into the editor: Open or create a diagram. Back in an editor window right click and choose "Nassi Shneiderman"->"insert from xy" (You get a list with all open diagrams here).
- Drag'n'Drop the diagram (or parts of it) to other tools. For example to OpenOffice Writer to get an image in your documentation.
If the chosen diagram has a selection, the export or code-generation takes only this part of the diagram.
Extensions
The NassiShneiderman plugin supports some extensions of Nassi-Shneiderman diagrams:
- break has a special brick with an "right-arrow"
- continue has a special brick with a "left-arrow"
- To be able to create diagrams from c/c++ switch statements, the selection does not implicitly break before a case. The different cases are vertically aligned.

