Bug 269582 - Incorrect language names in 'Formatting Styles'
Summary: Incorrect language names in 'Formatting Styles'
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Unclassified
Component: Astyle (show other bugs)
Version: git master
Platform: Gentoo Packages Linux
: NOR normal (vote)
Target Milestone: 4.2.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-28 02:19 UTC by Andrey Batyiev
Modified: 2011-03-29 22:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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