Durham University Home
 
       

John's topas page

jedit overview

jedit installation

jedit examples

topas/jedit update

topas/jedit registration

topas tutorials

jedit macros

Alan Coelho's page

Bruker

Local topas help

 

Setting up jedit to use with Topas

The instructions below describe how to install jedit and set it up for running with topas. They have been tested on a variety of pc's with different versions of windows. Some known problems/fixes are here. If you use jedit with topas please register here; I'll periodically send information about updates and bug fixes.

If you already have jedit set up for topas academic version 3 and are updating to version 4 please jump straight to number 4 below.

1. Download and install Java first

To run jedit you may need to install the latest release of the Java (http://java.sun.com/j2se/1.4/) platform if it's not already installed. This will allow you to run Java applications. At the time of writing you should download J2SE v 1.4.2_05 JRE from:

http://java.sun.com/j2se/1.4.2/download.html

2. Download and install JEdit 4.2 (not 4.3!!)

Download the main jedit program from:

http://www.jedit.org/index.php?page=download

Make sure (January 2007) that you download jedit4.2final which is the stable version of jedit, not one of the development versions. If you click here it should download jedit42install.exe directly (windows version). There may be some issues with xinsert and the latest development versions.

jEdit will install into two directories:

Application: c:\program files\jedit

Users data: c:\documents and setting\USER\.jedit

3. Download Plugins

To gain the full power of jedit you need to install various plugins. They can be downloaded from the net within jEdit using:

Plugin/Plugin Manager/Install.

Plugins to download:

1. XInsert: for code snippets.

2. Console: for shells.

3. Editor Scheme: for choosing a color scheme.

4. XSearch: for whole word searches without having to use about regular expressions.

5. ErrorList: works in conjunction with Console

If you're behind a firewall you can go directly to the jedit plugins page at http://plugins.jedit.org/ and download the plugins from there. They just need to be extracted to the jar directory which is normally C:\Program Files\jEdit\jars\.

Alternatively there is a single zip file linked here which you can download. Extract all the files it contains to C:\Program Files\jEdit\jars\ or the equivalent directory. N.B. these plugins work with my current version of jedit (4.2 at time of writing). If you need more up to date versions visit the jedit webpage.

The XInsert Plugin looks best when docked, use:

Utilities/Global Options/Docking

and choose to dock xinsert on the left, and the file browser/console at the bottom of the screen.

Once docked, clicking on the docked title hides/unhides docked windows. Thus XInsert and the File Browser can be docked/hidden at all times.

4. Setting up jEdit for editing INP files

Download the zip file jedit_setup.zip and save it into any temporary directory. Extract these files to a temporary directory. One of the files is INP-SETUP.BSH and contains jedit setup instructions. Run this macro from within jEdit using the menu comand:

Macros/Run Other macro/navigate and select inp-setup.bsh

This sets up jEdit for pretty editing of INP files. If you're interested, details of what INP-SETUP.BSH does can be found here. You might want to hide some of jedit's default nodes from the xinsert panel on the left if you never use them. This can be done from within the plugin options menu.

[N.B. a few people have reported problems when topas is installed in a directory name including spaces. If you have a choice, I'd recommend using a directory name without spaces. C:\topasa is what we use in Durham. Remember though that for version 4 the license Alan sends you is directory specific - if you change the topas directory name the software will no longer run.]

Some problems/fixes for setting up jedit are here.

You may then need to quit jedit and relaunch it for changes to take place.

Your xinsert menu will by default contain pull down menus in addition to the topas ones. If you want to hide these go to Plugins/Plugin Options. On the window that comes up click on Xinsert in the left hand pane. Click off all the menus you don't want to view on the right hand pane.

[Some people have had problems running inp-setup.bsh. This may be related to local access rights to various directories. One possible temporary work around is to download the .zip file linked here. Extract the directories to your c:\documents and settings\user\.jedit directory. This should create folders called e.g. macros, xinsert, schemes, etc and around 10 other files. You will then need to edit the file called "properties". Change every occurrence of the string "C\:\\software\\topasav4_01\\" to specify the directory where topas academic is installed on your computer (this occurs on ~4 lines). N.B. it's important to use two "\" symbols in the pathname.]

5. Editing in jedit

At its simplest level jedit can be used like any other text editor. The xinsert menus and the ability to automatically colour code certain parts of the file make it extremely efficient for creating and viewing topas input files.

To automatically colour code your input files:

Go to Plugins/Editor Scheme Selector

Selecte "inp.scheme" from the left hand window then click Apply and Close.

Now topas key words will be in dark blue, numbers in royal blue, refined numbers in red, comments in green, etc. These colour rules are defined in INP.JEDIT-SCHEME and INP_MODE.XML.

Column editing is an extremely powerful feature of jedit and allows you to e.g. edit large numbers of atoms simultaneously. Hold down the ctrl key and select a column of text. What you type will then appear in all rows.

Jedit allows predictive completion of topas keywords. In any .inp file try typing "app" then hitting ctrl-b. You'll be given a choice of possible keywords.

Hypertext searching is a very rapid way of finding multiple occurences of an expression in a file. Highlight a text string, hold down alt and press "." (full stop or period depending on your location).

The cursor shape and whether it blinks can be changed using:

Utilities/Global Options/Text Area

6. Results

If everything has been set up properly your jedit screen should look something like the image below (click for higher resolution)

7. Examples

Go here for some simple jedit examples.

8. Register

If you haven't already done so, please register here. I'll periodically send information about updates and bug fixes.


Modified 15-Jan-2007 by John S.O. Evans. Pages checked for Netscape 7 and Internet Explorer 5.5.