Fantastic piece of work you have here. I have encountered a problem with RTextScrollPaneText, Gutter, and RSyntaxTextArea. This should be elementary, but for the life of me, I can't get it to work.
Here're the details. I construct the text area and set its initial text after an event. When I do as prescribed on the constructor and put the text area into the scrollpane through setViewPortView, the gutter shows and works just fine. Problem with this is, the scroll pane does not scroll any further below the initial line size of the text area. So what I did was, I added the text area to the scroll pane through getViewPort.add(textArea). It now scrolls perfectly, but is also now throwing a NullPointerException when it hits:
- Code: Select all
Gutter editAreaGutter = RSyntaxUtilities.getGutter(textArea);
..., which I do in a SwingUtilities.invokeLater() call. I looked at the RSyntaxUtilities.getGutter() code and it returns the gutter just fine (not null), so I'm baffled as to why it's not working as it should.
I hope you can give me some info on how to do this right. Thanks!