[jsword-devel] Resource management in JSword

DM Smith dmsmith555 at yahoo.com
Thu Aug 31 15:11:16 MST 2006

On Aug 31, 2006, at 1:26 PM, Manfred Bergmann wrote:

> Hi.
> I have tweeked the toolbar code in Desktop.java so that it looks more
> like a Mac like toolbar.
> Additionally I used some other toolbar icons the way you (DM)
> described in the tutorial.
> See here:
> http://homepage.mac.com/manfred.bergmann/.public/bd_toolbar.png

Looks really good!

 From the screen shot I see that you are a German speaker. You might  
also be interested in translating the application into German! The  
"tutorial" on resources gives the instructions on how to do it.

> There still are some problems if the toolbar text is enabled. It is
> shown right of the icons not below.
> Here are some more questions:
> 1. Do you have a piece of code with that I can distinguish between
> the used system, for example
> if(systemIsMac)
> {
> 	// do something
> }
> else if(systemIsWindows)
> {
> 	// do something different
> }
> else
> {
> 	// do something more different
> }
> I guess you have some methods somewhere in util classes, don't you?

org.crosswire.jsword.util.Project has it. Search for "Mac OS X" in  

If we need to add it in a bunch of places I think that we might want  
to make a class or enumeration around the behavior.

> 2. I have installed some bible texts, dictionaries and other stuff.
> Normally this should go to ~/Library/Application Support/JSword
> But there are no installed modules. And there is no ~/.jsword
> directory either. Where are the installed things?

Prior to this release it was in ~/.jsword, but to be friendly with  
other sword applications, I thought it would be best to put modules  
in a "Sword" location. That way we can share. So look in ~/Library/ 
Application Support/Sword

> 3. What do you think about a additional view for dictionaries.
> I think of it like the normal bible text view. It has a search text
> field at the top, a combo box where you can choose between the
> installed dictionaries. It should have the text view where the
> complete text of the dictionary is shown and additionally it could
> have a tree view left of the text view where the keys can be choosen.
> Things that are searched for are entered in the search text field and
> the search algo searches for the keys first if nothing is found
> there, it searches in the values.
> This would imply that the main window can host different views. I
> think of more views in the future.
> Sorry if something like this is in the open issues already. If not
> what can we include it?

I don't know if we have it already in Jira, but we have discussed it  
as being a good idea.
The thought was that we might want to leverage RCP/JFace/SWT (Eclipse  
to do it.

The motivation to do it was to find a better embed-able browser widget.
RCP also gives us:
a better preferences mechanism
user definable layout
industry standard plugin mechanism (I think we have 16 extension  
points with a simple mechanism)
Ability for other programmers to use BibleDesktop as a starting point  
(i.e. they can define new views and perspectives)

The drawback is that the current GUI is not that bad and it is a lot  
of work to get back to the same point.
And there is a learning curve.
I don't think that Eclipse looks much like a Mac application. (e.g.  
tabs are all wrong)
RCP runs on fewer platforms than Swing.

And we can be improving the application rather than standing still  
while it is being changed.

So, that said, I think it would be great to add it to the existing  
code and abandon RCP for the foreseeable future.

More information about the jsword-devel mailing list