-1

I'm trying to add a custom language to RSyntaxTextArea and I keep getting NullPointerException, I don't know the reason since I followed all the steps on http://fifesoft.com/rsyntaxtextarea/doc/CustomSyntaxHighlighting.html

The custom syntax class: http://pastie.org/private/ttadaprzxe9ad0vtgnfeyg

My main class: http://pastie.org/private/kshg6cnrbm495ruipxla#26

I get the NullPointerException on line 26.

I didn't change anything from the Developer's Documentation, besides getWordsToHighlight, So I don't really know what may be causing the error.

I tried to figure what caused the Exception, but cant figure it out :/

demongolem
  • 9,474
  • 36
  • 90
  • 105
Debels
  • 167
  • 1
  • 3
  • 15

1 Answers1

1

You're trying to use textArea before initialising it. Swap line 26 and line 27.

Martin Dinov
  • 8,757
  • 3
  • 29
  • 41