Sahi Pro - Eclipse configuration for Intellisense and Syntax Highlighting in Sahi scripts
You can use Notepad++ or any text editor to write your sahi scripts. But if you want to use Eclipse as the editor, you can follow these steps to configure Intellisense and Syntax Highlighting.
The steps have been documented for Eclipse Indigo version.
-
Open Eclipse.
-
Ensure that the
JSDT
Eclipse plug-in has been installed. Click onHelp | About Eclipse SDK | Installation Details
.
-
If not installed, click on
Help | Install New Software
. Use the settings displayed in the image below.
If you are using an older version of Eclipse, you should see a corresponding update site in theWork with
dropdown box.
Proceed with the installation.
-
Click on Windows | Preferences | General | Content Types
-
In
Content types:
section, select Text | JavaScript Source File and then inFile associations:
section, click on Add.
-
Make association for
*.sah
and click Ok.
-
Now that the file association has been done, create a Java Script Project from existing source with the directory as your scripts folder, typically
<SAHI_INSTALL_DIR>/userdata/scripts
folder.
-
If you do not have
apis.sah
in the project scripts directory, download apis.sah from http://sahi.co.in/static/apis.sah and copy it into the project scripts directory.
-
Open any .sah file from the JavaScript project, and you should now be able to see syntax highlighting.
Type the first few letters of a function and pressCtrl + Space
to bring up template proposals.