This is a short guide to using TnClipse to inspect and run Typhon files.
If you don't already have an Eclipse installation, download Eclipse here. Any configuration of Eclipse should do. The process should be guided by Eclipse, so no explanation is necesary here.
For this guide, you'll need the Typhon repo checked out of Git. From the command line, this is as simple as:
git clone https://github.com/TyphonLang/Typhon.git
To see what else is part of the Typhon project, look at the orginization page.
TnClipse is a plugin for Eclipse that lets you manipulate Typhon files.
To install TnClipse in your IDE, go to the Help
menu, go to Install new software...
, and then you will see the installation dialog.
In the Work with
field, there is a button labeled Add...
; click on that and enter http://typhonlang.github.io/tnclipse/
in the Location
field.
Name it whatever you want. Hit OK
, and soon enough the Typhon plugin will appear in the dialog.
Check the checkbox called Typhon
, and hit Next
. Follow any further instructions, and TnClipse should now be installed.
First, switch to the Typhon perspective. Go to Window > Perspective > Open Perspective > Other...
and select Typhon
from the list.
Now that you are in the perspective for Typhon, let's import some Typhon examples into Eclipse.
Right-click the blank area in the Naviagtor
view, go to Import...
, and select Existing projects into workspace
.
Navigate to the Typhon repo you checked out, and select the examples
directory.
Eclipse should indicate there is a project called TyphonExamples
in that folder; import it.
Now you should see a Typhon project in your Navigator
view! Click on some .tn files and look in them.
You can right-click the project, go to Run As
, and select TnBox
. From there, you will be asked for a main function to run.
You can right-click individual files to run as well.
Alternately, you can set up a dedicated launch configuration for yourself. Go to Run As
, select Run Configurations...
, and create a new one under TnBox
.