Rtext features in a java application

Questions on using RText should go here.

Moderator: robert

Rtext features in a java application

Postby jeffy » Sat Jun 02, 2012 9:07 pm

First, kudos on the software. It was just what I was looking for and it works great.

Currently I am using RSyntaxTextArea in my application, in a JInternalFrame (the application involves a main desktop with different internal frames). I followed the code here to get it going:

http://fifesoft.com/rsyntaxtextarea/exa ... ample1.php

However, I'd like to also draw on many of the features that come with RText, e.g. the find-replace dialog. If there is a way to just drop the RText JPanel into a JInternalFrame that might be the best. But if not, it would be nice to use the RText jar as a library and reuse all the menu items, actions, and others functions you've spent so much time creating in my own open source app. I could probably figure out how to do these things on my own with some effort, but if you have any suggestions or guidelines I'd very much appreciate it.

Again, nice app! Thanks for any suggestions,

- Jeff
jeffy
 
Posts: 3
Joined: Fri Jun 01, 2012 8:48 pm

Re: Rtext features in a java application

Postby robert » Sun Jun 03, 2012 2:16 pm

Hi Jeff,

Thanks for your interest in RText! Unfortunately, you'll just have to rip out the pieces of RText you need and put them into your own application. Since RText is split into two main jars, hopefully most of the stuff you want is in fife.common.jar. That jar has stuff that's supposed to be more useful for any application in general. rtext.jar has stuff specific to text editors though, including the Find & Replace dialogs. In the future, stuff like those dialogs (as well as the Go to Line dialog) may make their way into the RSyntaxTextArea project, likely as an extra jar ("rsta-ui.jar" or something similar).

One project that's integrated pieces of RText into itself (such as the search dialogs in its SQL editors) is SquirrelSQL. So it may be useful to see what they've done, although it's a large project just like RText so it may take a little while to sift through the source. The RSTA/RText-specific stuff looks to be mostly in the "syntax" plugin of the project.

At a minimum though, the Find & Replace dialogs should be pretty self-contained and reusable. Just use a tool like Eclipse to find in what classes say, "FindDialog" is used, and mimic how it's done.

Good luck! And let me know if you have any questions.
User avatar
robert
 
Posts: 801
Joined: Sat May 10, 2008 5:16 pm

Re: Rtext features in a java application

Postby jeffy » Mon Jun 04, 2012 3:07 pm

Thanks Robert, those are helpful tips and should be enough to get me going.

- Jeff
jeffy
 
Posts: 3
Joined: Fri Jun 01, 2012 8:48 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron