osate / osate2

Open Source AADL2 Tool Environment
http://osate.org
Eclipse Public License 2.0
36 stars 8 forks source link

Formatting and indentation #504

Closed juli1 closed 9 years ago

juli1 commented 9 years ago

When writing a model, the indentation is not correct. When writing a component and pressing enter, it automatically insert a tab. This would be ok if the tab is removed when writing the "end componentname" but instead, it keeps adding tab so that the user has to remove the tab himself.

This is very inconvenient when writing several lines of AADL. Removing the automatic tab insertion would improve the user experience.

juli1 commented 9 years ago

Another suggestion would be to insert a tab when writing the following keywords: features, subcomponents, properties, flows, etc ... typically, this is when we type these keywords that we want to increase the indentation level.

This is already implemented and then, keeping the indentation after these keywords would be fine. Also, a good solution would be to have a custom formatter in the preferences so that the user could choose some formatting rules (as for Java for example)

lwrage commented 9 years ago

Fixing the indentation of 'end' requires a little work. You can always fix indentation with Ctrl+Shift+F. I agree that it would be nice to have formatting preferences.

juli1 commented 9 years ago

On the other hand, Ctrl + Shift + F reformat the complete model, not only the line and I do not want to indent the whole model and want to keep my formatting style. Anyway, agreed that this is a low priority task and more something to improve the tool usability.

lwrage commented 9 years ago

Automatic unindent should work now in the core language. Not in annexes! There are a couple of preferences that allow customization of the behavior.