Reorder languages in Configure Source Formatter UI
ClangSupport::name()
returns "clang" rather than "C" or "C++". So the
languages KDevelop supports best are never found in active or loaded
languages. As a result, the items of the Language combobox are always
sorted alphabetically. When kdev-python plugin is installed, "Python"
appears at the top of the combobox list, while "Python 3" is placed at
the bottom, because Python::LanguageSupport::name()
returns "Python".
The resulting Language list order is therefore unsatisfactory:
unsupported "C#" is above best-supported "C++"; "Python" is always at
the top; "Python 3" is very far from "Python" and can be easily missed.
It is possible to fix this issue by analyzing MIME types supported by
active and loaded language plugins. But runtime language order changes
can confuse the user and make understanding this configuration UI even
more difficult (see BUG 358798). Stable and predictable language list
order makes more sense to me. So this commit drops the dependency on
ILanguageController
and ILanguageSupport
, keeps the alphabetical order,
but moves unsupported "C#" and "Java" to the bottom of the list.