Bug 269582

Summary: Incorrect language names in 'Formatting Styles'
Product: [Applications] kdevelop Reporter: Andrey Batyiev <batyiev>
Component: AstyleAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: git master   
Target Milestone: 4.2.0   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Andrey Batyiev 2011-03-28 02:19:17 UTC
Version:           git master (using KDE 4.6.1) 
OS:                Linux

Hello

I've just noticed that in code format preferences I can select formatting for three "languages": "C++", "text/x-java" and "text/x-csharp".

AStyle plugin source contains checks for "text/x-java-source" and "text/x-csharp", but "C#" doesn't appear in language combobox (and I don't know what's correct mime type for Java).

BTW, "C++" is for C sources too, right?

Reproducible: Always



Expected Results:  
"C++" (or "C/C++"), "C#", "Java"
Comment 1 Dmitry 2011-03-29 22:38:31 UTC
Git commit f53bf29b4603cd67d52eaa94008bd965bc55e71e by Dmitry Risenberg.
Committed on 29/03/2011 at 22:20.
Pushed by risenberg into branch 'master'.

Use ISourceFormatter::highlightModeForMime to find language names instead of ILanguage::name.

This is consistent with Kate.
BUG: 269582

M  +27   -46   shell/settings/sourceformattersettings.cpp     
M  +1    -0    shell/settings/sourceformattersettings.h     

http://commits.kde.org/kdevplatform/f53bf29b4603cd67d52eaa94008bd965bc55e71e
Comment 2 Dmitry 2011-03-29 22:45:09 UTC
Git commit 59508f283e28b59703635efe92cdfc2594c93ed7 by Dmitry Risenberg.
Committed on 29/03/2011 at 22:08.
Pushed by risenberg into branch '4.2'.

Replace "text/x-java-source" mimetype with "text/x-java" - this is the actual mimetype for Java.

CCBUG: 269582

M  +3    -3    formatters/astyle_plugin.cpp     

http://commits.kde.org/kdevelop/59508f283e28b59703635efe92cdfc2594c93ed7