source formatter settings usability

Dmitry Risenberg dmitry.risenberg at gmail.com
Sun Mar 13 17:42:38 UTC 2011


> A very simple fix would be to make the mime-types a list which is a part of
> each "configuration", and supply a few defaults. So instead of mime-type being
> toplevel, we simply use a name here. That way, say C++-hdr/C++src/C-hdr/C-src
> could use the same formatting settings, which php-* might use another set.

It would be even better to show languages, not lists, like "C/C++",
"Java", "C#". Each language can have its specific code sample to
format, because showing C++ code formatting for Java is not really
nice.

So there will be the following relations:
language <-> set of mimetypes (where to store it, currently mimetypes
are stored in plugin info)
formatter <-> set of styles (stored in config)
language <-> set of formatters (where is that stored) + selected
formatter + selected style (stored in session config) + code
sample(?).

This seems straightforward to implement, the only question is where to
store the first relationship.

Are the styles language-specific now, or can any style be applied to
any language as soon as it is supported by the formatter?

-- 
Dmitry Risenberg




More information about the KDevelop-devel mailing list