TIDE plugin installation and setup

If you are on Windows, simply download and run the installer - it contains a Java Runtime Environment (JRE) if needed, JEdit and all the plugins and extensions.

If you are on MAC or Linux, read further :)

First of all, download JEdit (currently version 4.3.1) at www.jedit.org.
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.5.x) for installing/using JEdit!

You can install JEdit directly from the jar-file using:

            java -jar jeditX.X.X.jar

You can download a JVM from http://java.sun.com

Download the TIDE zip file from the Sourceforge files section and extract it. Copy the contents of the folder "jedit" ("jars/", "macros/", "properties/") into your "<JEdit_Home_Dir>", on Windows it is something like "C:\Users\Your_Name\.jedit\". Copy the "autocomplete.txt" file into your "<JEdit_Install_Dir>" (usually "C:\Program files\JEdit\").
In the folder "additions" you will find a "mode" file ("cs.xml") for Torque (these files define all the tags, vars, operators, brackings, etc. available in a language)
Copy cs.xml into your jEdit "modes" directory.
NOTE: There may already be a cs.xml file which is for CSharp (.NET) files, just rename it to "csharp.xml" or something if you need that.
Now open the "modes/catalog" file, and search for "*.cs". This is the entry for CSharp. Change it like this (change mode name from "cs" to e.g. "c#" and also change the "FILE_NAME_GLOB" from "*.cs" to e.g. "*.csharp"):

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

If you are on MacOS X:
The MacOS "home" dir for JEdit should be located at "/Users/_your_username_/Library/jEdit/". Put the jars and the cs.xml "mode" file into the "jars" and "modes" sub folders there. Add the new "CS" mode entry to the "modes/catalog" file. The JEdit "app" file (which really is a folder) should be located in the "/Applications/" folder - you have to use the "Show Package Contents" command in the MacOS "Finder" (see here: www.mactipsandtricks.com/articles/Wiley_HT_appBundles.lasso) to view the contents of that folder. Put the "autocomplete.txt" file in there and also edit the entry for CSharp in the "modes/catalog" file in there.

Now go to the ProjectViewer plugin configuration ("Plugins -> Plugin Options ... -> Project Viewer -> General Options") and add TGE related file extensions under "Importing files" (*.cs *.mis *.gui *.hfl *.log *.hlsl):

Once everything is installed, select "Plugins -> TIDE" and choose your desired action.

TIDEDebug will be added to the JEdit GUI by default:

You can dock TIDEBrowse to the JEdit GUI permanently by adjusting the docking style in "Utilities -> Global Options -> Docking". You could e.g. dock TIDEBrowse to the right and the ProjectViewer to the left. You can also configure shortcuts to open/close every plugin, etc. - JEdit is REALLY flexible!

You should dock everything you need at convenient places, e.g. we'd also recommend to dock Tide Callstack Viewer, Tide Console Viewer, HyperSearch Results and the Console to the bottom of the editor:

Make sure to set your preferred options for TIDEBrowse by clicking on the gear-wheel icon or via "Plugins - Plugin Options ...":

Additional notes

You can see the TIDEDebug menu below the main JEdit icons (currently Run - Pause - Stop - Step Into - Step Over - Step Out - Toggle Breakpoint are working, "Run To Cursor" and "Add / Remove watch" aren't implemented yet). You can pause the process at any time and add/remove breakpoints... although you can't add watches yet, you can check the value of simple variables with the tooltips by hovering over the variables.
TIDEBrowse and TIDEDebug are combined into one "TIDE" menu entry ... there is also a specific "TIDE project" - you have to create a new TIDE project (not a standard ProjectViewer project) if you want to use the debugger - that's because you have to specify your debug parameters which are saved to a TIDE properties file.
TIDE will modify your "main.cs" file whenever you launch a debugging session because it needs to make some changes to enable debugging, it will add the script command "dbgSetParameters(...)" at the top of the file and remove it after the debug session has ended.

Debugging Howto

Choose "New Project..." under the TIDE plugin menu to create a new project for testing. You must specify the game executable. TIDE is capable of launching your game and automatically connecting to the Torque built-in telnet debugger. However... to pull this off TIDE must temporarily patch your "main.cs" script to allow for command line options to automatically enable debug mode, set debug port and password, etc.

In this version you can set breakpoints at any time as long as the project contains that file. You can set breakpoints first and hit the "run" button and the breakpoints will be set automatically. Any breakpoints you set will cause the program to pause execution when they are reached.

You don't need to set breakpoints to pause execution. You can just hit the Pause Icon on the TideDebug toolbar. It's the second icon from the left and looks like two verticle bars.
NOTE: the game may not actually pause execution at this time! If the game is running but only a startup dialog box is showing you may have to 'nudge' the game by hitting the tilde key (~) to open the console.

When the game is paused the file that is currently executing will come to the front and all the possible places to put a breakpoint are indicated with little green dots in the 'gutter' running down the left of the text area. To place a breakpoint put your cursor on the desired line and hit the "Set Breakpoint" icon on the TideDebug toolbar. It looks like a stop sign. A little red stop sign icon will appear in the gutter next to that line instead of a green dot.

If you edit a file either while in pause mode or while the game is running, use "Plugins -> Tide -> TideDebug -> Recompile Buffer..." to reload the file.

If you like TIDE, please consider donating - thank you! :)

© 2003-2010 Stefan "beffy" Moises