Code formatting should be done on all newly created files and on user request with a "Format" command in the edit menu.
The format styles should be set in the policy dialog. Code formatting should be a policy because different projects may follow different code style rules.
The configuration dialog should look like:
In the option categories panel should be a tree with all categorized available options.
For example:
In the option panel the user should be able to set the options he chooses. In the code preview panel a source code preview should be shown to demonstrate what the option does.
For each language a xml file should describe:
The style definition should be connected to a mime type and a code formatter and the code formatter should be able to take a property object that contains all the options with the user defined values to format a text file.
An intelligent code formatter needs to be build with a library like nrefactory to generate a DOM out of a document and this DOM needs to be printed out with a output formatter that takes the style definition.
The hard part is that it shouldn't destroy any code and that it needs to be able to handle syntax errors. The simple solution for syntax errors would be that the formatting just stops at the first syntax error and the code after the error remains unchanged.
The documentation must be left intact. This can be done with synchronizing the outputted code with the original one at lexer level.
None that I'm aware of.
It would be nice if the style settings are applied to source code on the fly while typing.
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |