Review Request: Make formatter settings configurable per language instead of mimetype

Dmitry Risenberg dmitry.risenberg at gmail.com
Wed Mar 16 21:25:28 UTC 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100868/
-----------------------------------------------------------

(Updated March 16, 2011, 9:25 p.m.)


Review request for KDevelop.


Changes
-------

Now all plugins that implement "org.kdevelop.ILanguageSupport" interface are queried for supported mimetypes. These mimetypes correspond to languages. Mimetypes not supported by any language plugins remain as they were (see screenshot).

Requires the following change to kdevelop (not worth a separate review, I think):
diff --git a/languages/cpp/kdevcppsupport.desktop b/languages/cpp/kdevcppsupport.desktop
index 5fdb6d2..197d6b6 100644
--- a/languages/cpp/kdevcppsupport.desktop
+++ b/languages/cpp/kdevcppsupport.desktop
@@ -104,7 +104,7 @@ X-KDE-PluginInfo-Category=Language Support
 X-KDevelop-Version=12
 X-KDevelop-Language=C++
 X-KDevelop-Args=CPP
-X-KDevelop-Interfaces=ILanguageSupport
+X-KDevelop-Interfaces=org.kdevelop.ILanguageSupport
 X-KDevelop-SupportedMimeTypes=text/x-chdr,text/x-c++hdr,text/x-csrc,text/x-c++src
 X-KDevelop-Mode=NoGUI
 X-KDevelop-LoadMode=AlwaysOn


Summary
-------

This patch makes formatter settings configurable per language, not mimetype (see screenshot). Currently mime <-> language mapping is hard-coded (this should be fixed somehow, suggestions are welcome).

Also changed the relations between languages, formatters and styles - now all the languages share the same style object for a style with same name, so if it is changed for one language, other languages will see the change too.

Need to clarify whether there can be no styles for a formatter (a TODO in code). With current plugins this is not the case, but is it possible at all? If it is, what should be done if this formatter is selected?


This addresses bug 230472.
    http://bugs.kde.org/show_bug.cgi?id=230472


Diffs (updated)
-----

  shell/settings/CMakeLists.txt edcf49c4f22f4b94bcffe93f9de74fbf18c2a2f4 
  shell/settings/sourceformattersettings.h c7c2a0ebfa075bae94215d1adb585a4f42bcd8a4 
  shell/settings/sourceformattersettings.cpp 15060c7417af7dfe5400cd4e1e738b1c974d6d54 
  shell/settings/sourceformattersettings.ui cc5e55c6b7d6df16f0dec09b07d63f00c7a3f128 

Diff: http://git.reviewboard.kde.org/r/100868/diff


Testing
-------

Manual testing.


Screenshots (updated)
-----------

Selecting language
  http://git.reviewboard.kde.org/r/100868/s/104/


Thanks,

Dmitry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110316/4b8ebeda/attachment.html>


More information about the KDevelop-devel mailing list