Author: beffy (c++programmer)

PLEASE NOTE: This document is work in progress and will be updated / changed regularly...
It's based on JEdit v4.0.3 (curent stable release)



JEdit installation and setup

First of all, download JEdit here. JEdit is a free, open source text editor written in Java and therefore available on all platforms supporting Java (WIN, Linux, MAC OS, ...)
So you'll definitely need a JDK/JRE (1.3 or 1.4) for installing/using JEdit.
 
You can install it directly from the jar-file using

	java -jar jeditX.X.X.jar

To get JEdit to recognize Torque/Tribes script and mission files (and to get syntax highlighting for them) first create a new file e.g. "cs.xml" in JEdit's "modes" dir, then go into "modes/catalog" file, and change it like this:


<MODE NAME="c#"			FILE="csharp.xml"
				FILE_NAME_GLOB="*.csms" />


<MODE NAME="cs"		FILE="cs.xml"
				FILE_NAME_GLOB="*.{cs,gui,mis}" />

and restart JEdit...

I've written a first "modes" file for Torque (these files define all the tags, vars, operators, brackings, etc. available in a language - JEdit already includes 74 "modes" by default, which means it recognizes and highlights the syntax of 74 different languages, e.g. Java, C++, C#, Javascript, HTML, XML, Python, Povray, Prolog, Perl, PHP, etc. etc.) - here is how it looks at the moment... (use right-mouse -> "Save target as..." to download).

JEdit has some really GREAT plugins (which you can install using the PluginManager), some of the most useful are a JDiff, JTidy, Code2HTML, and the ProjectViewer.
Now to get the ProjectViewer "Torque-compatible" it needs a little tweaking, because it doesn't recognize TGE script files... to accomplish this, go to <YOUR_HOME_DIR>/.jedit/projectviewer** and add the typical TGE extensions (or anything else you need) to the file "import.properties", so that the entry include-extensions looks like this e.g.:

include-extensions=java xml dtd txt c++ c cpp h pl pm sh asm asp jsp jsc\
                   html htm properties props sql conf css js vbs bat tcl cs gui dml mis
Now you can import and manage all the files in your Torque (mod) directory recursively with ProjectViewer.
 

"TideBrowse" (Torque-IDE-Browse) plugin

I'm currently writing a plugin for JEdit which should give you at least the editing comfort Tribal IDE does... It's based on the "JBrowse" plugin (written by George Latkiewicz and Andre Kaplan) which is already available for JEdit, and it lists all functions, datablocks and "new XYObject()" declarations in the current file buffer - it's already able to parse *.cs, *.gui and *.mis files.
These 3 different types are grouped together, you can navigate through them in a tree structure (Java Swing Tree), and if you click on any of the available declarations, the current file is scrolled to the correct position and the declaration is highlighted.
You can also see the number of functions, datablocks and object instantiations for the current buffer (bottom right status bar of the plugin). Another feature are tooltips for each entry (can also show the type of the entry, the line number, ...).
Have a look at all these features here:

TGEBrowse

TideBrowse will be part of a "TIDE Suite" - this "plugin suite" will also include the "TideDebugger" plugin for JEdit, which will provide remote debugging functionality, pretty similar to Tribal IDE's debugger, but hopefully with some more features. Like in Tribal IDE, you will be able to fire up the engine, connect to it, set breakpoints, step-into, step-over, etc. - you get the idea...
"TideDebugger" is currently in development by Paul Dana and you can download the current beta version here. (Paul also offers bundled TIDE-Installers - containing JEDIT, a Java VM and the TIDE Suite - for Windows, Unix and MAC OS on that site, you should really check that out!)

The big advantage compared to Tribal IDE is that JEdit is platform independent, all it requires is a java runtime environment - so now all Linux and MAC dudes out there can finally edit and debug their Torque scripts :-)

Here is another screenshot showing JEdit with open ProjectViewer and TideBrowse plugin listing the objects of a *.mis file:
(you can customize everything in JEdit btw., e.g. all the plugins can be floating, on the left, right, bottom, whatever...)


 
Finally, here is a screen showing JEdit with a different color theme, open TideBrowse and the TideBrowse Options dialog (click to enlarge):


This should be all you need to tune JEdit for working with and browsing through Torque files... have fun!!

Update (07/19/2002):
I've managed to add a "Search current selection in project" function to TideBrowse... :-))
You can now select any word in the editor, then call the function (either trough the "Plugins->TideBrowse" menu, by adding it to the ContextMenu or by mapping a key to it (see screens)... It then searches through the current project files (which can also include your engine directory with *.cc, *.h and *.asm files, btw. ;-) - so currently it scans all cs, mis, gui, dml, cc, h and asm files and then immediately pops up the HyperSearch result pane and lists all occurencies of the word/phrase you've searched for. You can then click on them and get to the specified file... But, of course this version of the plugin now requires the ProjectViewer plugin!
I had to change the ProjectViewer plugin a little bit to get it working properly, so I've included it in the new zip file, too... I've also added the "cc" extension to the "import.properties" file, so that you can include the engine source into the project - simply replace all these files/jars.
Hopefully I will be able to extend this to a handy "Go-to-definition/declaration" function sometime soon...

Here are some more screens for you... Enjoy!
(click to enlarge):


 

You can download the version 0.0.2 here.


The download includes (put these files into the appropriate folders - either in the JEdit program dir or "<YOUR_HOME_DIR>/.jedit**", depending on your installation).
 

Update (07/31/2002):

The "objects" in TideBrowse are nested now, so it looks a lot more organized... check it out here ...
You can download the updated Jar-File (v0.0.3) here.

To be continued... ;-)


---------------------------------------------------------------------------
**) <YOUR_HOME_DIR>/.jedit will be one of the following:
If you can't find it at all, try to do a global search for the "import.properties" file - the ProjectViewer will generate this on installation...