Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
KDevelop
KDevelop
Commits
59508f28
Commit
59508f28
authored
Mar 30, 2011
by
Dmitry Risenberg
Browse files
Replace "text/x-java-source" mimetype with "text/x-java" - this is the actual mimetype for Java.
CCBUG: 269582
parent
762d018e
Changes
1
Hide whitespace changes
Inline
Side-by-side
formatters/astyle_plugin.cpp
View file @
59508f28
...
...
@@ -68,7 +68,7 @@ QString AStylePlugin::description()
QString
AStylePlugin
::
highlightModeForMime
(
const
KMimeType
::
Ptr
&
mime
)
{
if
(
mime
->
is
(
"text/x-java
-source
"
))
if
(
mime
->
is
(
"text/x-java"
))
return
"Java"
;
else
if
(
mime
->
is
(
"text/x-csharp"
))
return
"C#"
;
...
...
@@ -77,7 +77,7 @@ QString AStylePlugin::highlightModeForMime(const KMimeType::Ptr &mime)
QString
AStylePlugin
::
formatSourceWithStyle
(
SourceFormatterStyle
s
,
const
QString
&
text
,
const
KMimeType
::
Ptr
&
mime
,
const
QString
&
leftContext
,
const
QString
&
rightContext
)
{
if
(
mime
->
is
(
"text/x-java
-source
"
))
if
(
mime
->
is
(
"text/x-java"
))
m_formatter
->
setJavaStyle
();
else
if
(
mime
->
is
(
"text/x-csharp"
))
m_formatter
->
setSharpStyle
();
...
...
@@ -138,7 +138,7 @@ QList<KDevelop::SourceFormatterStyle> AStylePlugin::predefinedStyles()
KDevelop
::
SettingsWidget
*
AStylePlugin
::
editStyleWidget
(
const
KMimeType
::
Ptr
&
mime
)
{
AStylePreferences
::
Language
lang
=
AStylePreferences
::
CPP
;
if
(
mime
->
is
(
"text/x-java
-source
"
))
if
(
mime
->
is
(
"text/x-java"
))
lang
=
AStylePreferences
::
Java
;
else
if
(
mime
->
is
(
"text/x-csharp"
))
lang
=
AStylePreferences
::
CSharp
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment