Home Download Buy Blog Forum Support

[ST3?] Another Java syntax highlighting bug

[ST3?] Another Java syntax highlighting bug

Postby mtaran on Wed Apr 24, 2013 1:54 am

Try this with the default ST3 Java syntax
Code: Select all
class Whatever {
  private static List<Stuff> stuffList = SomeClass.staticMethod(
    new Something(374284340, -1220723816, "some string with Bad Syntax"),
    new SomethingElse("more bad syntax"));
}
mtaran
 
Posts: 10
Joined: Fri Sep 07, 2012 10:02 pm

Re: [ST3?] Another Java syntax highlighting bug

Postby skuroda on Wed Apr 24, 2013 10:54 am

I can't guarantee this will fix it (or rather won't cause other issues), but try searching for the "entity.name.function.java" in the Java.tmLanguage file. If you look a little farther down, you can see the patterns being used for this scope. Right now (well I'm looking in ST2 right now), the only pattern listed is

Code: Select all
<array>
   <dict>
      <key>include</key>
      <string>#parameters</string>
   </dict>
</array>


Try replacing it with the following.
Code: Select all
<array>
   <dict>
      <key>include</key>
      <string>#anonymous-classes-and-new</string>
   </dict>
   <dict>
      <key>include</key>
      <string>#parameters</string>
   </dict>
</array>


There may be a better repository to include, but that's the one I thought might fit.

This is what it looked like for me after making that change.
class Whatever {
private static List<Stuff> stuffList = SomeClass.staticMethod(
new Something(374284340, -1220723816, "some string with Bad Syntax"),
new SomethingElse("more bad syntax"));
}
skuroda
 
Posts: 685
Joined: Fri Oct 05, 2012 8:11 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 25 guests