Possible bug with RSyntaxDocument

Questions on using RSyntaxTextArea should go here.

Moderator: robert

Possible bug with RSyntaxDocument

Postby latusaki » Wed Feb 15, 2012 10:31 pm

Trying to send RSyntaxDocument over the network I am getting exception :
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: java.io.NotSerializableException: org.fife.util.DynamicIntArray

Is this a bug I should report ? Using version 2.0.0 beta 2
latusaki
 

Re: Possible bug with RSyntaxDocument

Postby latusaki » Wed Feb 15, 2012 10:41 pm

Just got version 2.0.0 and it still has same bug
latusaki
 

Re: Possible bug with RSyntaxDocument

Postby robert » Thu Feb 16, 2012 4:00 am

I just made DynamicIntArray serializable in SVN, so feel free to give it another try. Unfortunately, when I tried making RSTA serializable in the past, I ran into problems (can't remember the details) and ended up giving up. This still isn't entirely done, as there are other classes that will have to be made Serializable for this to work, such as Token and its subclasses. If you'd like to contribute a patch to make RSyntaxDocument serializable, I'd love to have it!

I added a tracker for this so I don't forget it.

As a workaround, you could try sending over just the Content of the Document (in this case, an RGapContent), which should be a functional Serializable object. Looks like you'd have to subclass RSyntaxDocument and make the getContent() method (defined in AbstractDocument) public to make this approach easy.
User avatar
robert
 
Posts: 774
Joined: Sat May 10, 2008 5:16 pm

Re: Possible bug with RSyntaxDocument

Postby robert » Thu Feb 16, 2012 1:43 pm

Well, on second thought, you wouldn't make the Tokens and associated classes serializable since they're a part of the view, not the model. There are likely still other things that need to be tweaked to make RSyntaxDocument fully serializable though.
User avatar
robert
 
Posts: 774
Joined: Sat May 10, 2008 5:16 pm

Re: Possible bug with RSyntaxDocument

Postby latusaki » Fri Feb 17, 2012 10:44 am

I ended up getting the content and then putting that on rsyntaxdocument on receiver end. Thank you for answering ill also give it a try with the serializable array.
latusaki
 


Return to Help

Who is online

Users browsing this forum: No registered users and 3 guests

cron