fesch / Structorizer.Desktop

Structorizer is a little tool which you can use to create Nassi-Schneiderman Diagrams (NSD).
https://structorizer.fisch.lu
GNU General Public License v3.0
65 stars 20 forks source link

Solution approach for four known shortcomings on Java source file import #1136

Closed codemanyak closed 8 months ago

codemanyak commented 8 months ago

There are four known shortcomings of the Java source import, related to type arguments:

All of these shortcomings can of course be overcome by deriving a manually modificied copy of the source file before importing it, where disturbing type parameters are effaced or enclosed by comments, but it is tedious and cumbersome.

Therefore Structorizer might mitigate at least the first and the third of them via automatic file preprocessing. The second one, however, is more tricky, but it should be possible to separate closing angular brackets in a heuristic approach with sufficient likelihood of appropriateness. It seems safer, though, to offer it only optionally (i.e., leaving it to a new Java-specific import option), because it may be easier to manually fill in the blanks where actually needed (before the import) than to find a way to prevent or circumvent a mistaken automatic splitting of mis-conceived real shift operators (if the file preprocessing mechanism overdoes).