#43 Problem with Java syntax highlighting

release
closed-fixed
nobody
None
5
2001-08-21
2001-06-28
Chris Walker
No

The 'newarray' term erroneously treats an array ref
like 'newItems[idx]' as if it were 'new Items[idx]'
and highlights 'new' as a keyword. The initial
portion of that pattern's regex needs to be changed
from

new\s*\n>\s*(...

to

new[\s\n]+(...

so that it will require at least one character
of whitespace or newline between the new keyword
and the start of the variable name.

Discussion

  • Joachim Lous
    Joachim Lous
    2001-07-10

    Logged In: YES
    user_id=82866

    This is already fixed i the evrsion that will be shipped with 5.2
    Closing it.

     
  • Scott Tringali
    Scott Tringali
    2001-07-28

    Logged In: YES
    user_id=11321

    Leave this open until someone puts the pattern into the
    source code.

     
  • Joachim Lous
    Joachim Lous
    2001-07-30

    Logged In: YES
    user_id=82866

    Mark has been pretty strict in the past on patterns, esp. the bundled ones, not allowing more newlines
    than the context distance can actually handle. I tend to agree, so [\s\n]+ is not a good idea. But
    \s*[\n\s]\s* should do the trick. I'll send an update to v.1.5 to Joor shortly, and close it once his 5.2
    patterns patch is applied.

     
  • Scott Tringali
    Scott Tringali
    2001-08-18

    Logged In: YES
    user_id=11321

    I committed a big batch of pattern updates from Joor.
    Please verify that this works as needed and we'll close it.

     
  • Scott Tringali
    Scott Tringali
    2001-08-18

    • status: open --> open-fixed
     
  • Scott Tringali
    Scott Tringali
    2001-08-21

    Logged In: YES
    user_id=11321

    Closed. Thanks, Chris and Joor.

     
  • Scott Tringali
    Scott Tringali
    2001-08-21

    • milestone: --> release
    • status: open-fixed --> closed-fixed