1.       Get eclipse from http://www.eclipse.org (version eclipse classic 3.5.1)

2.       Download ANTLR at http://www.antlr.org/download/html and click on “Complete ANTLR 3.2jar, all tools,runtime,etc” link

3.       After downloading antlr package create a folder named “ANTLR-3.2” and inside it create another folder “lib” and put antlr 3.2jar downloaded in step 2 in the lib directory.

4.       Move the antlr-3.2 directory into C drive(or any work folder for ubuntu), eclipse should be in the same directory

5.       For antlr plugin inclusion in eclipse goto the wiki link on the antlr homepage(www.antlr.org) and inside it click on “Integration with Development environments” and we get two chices underneath eclipse click on “Eclipse 3.3+ for antlr for ANTLR 3.x”. Init we have AntlrDT( a standard Eclipse plugin implementing an Antlr 3.1+ specific grammar editor, outline, and builder) and ANTLR IDE(an eclipse plugin for ANTLRv3 grammars which is required) optiions. click on http://antlrv3ide.sourceforge.net/ and under download/install we get to know wht we need to do to get the setup complete for installing actual ANTLR plugin:


6.       eclipse 3.5 (we already downloaded it).

7.       GEF 3.2 (graphic editor framework for eclipse).

8.       zest 1.0.0 ( a simplification for graphs in eclipse inside the GEF.

9.       Dynamic Language Toolkit(DLTK) Core.

10.   Open eclipse save your select a destination to save your workspace e.g C:\Users\owais\workspace (/home/advo/workspace for ubuntu). to install the plugins goto help menu click on Install New Software, change the work with drop down meny to “Galileo- http://download.eclipse.org/releases/galileo. on the main plugin distribution site for the plugins to be downloaded from eclipse, uncheck the Group items by category to get GEF, zest and DLTK. To get DLTK type Dynamic languages in the search box for main plugin distribution site. you will get a list of available dynamic languages plugins. Check the “Dynamic Languages Toolkit-Core Frameworks”.

11.   To get GEF type GEF in search and check “Graphical Editing Framework GEF”.

12.   Type zest in the search to get available zest plugins and check “Graphical Editing Framework Zest Visualization                 Toolkit”.

13.   In order to make sure all three plugins got checked blank/remove anything entered in the search box to get all the                 available plugins list. Confirm all the three checkmarks are there by visual inspection.

14.   Click on next we will see all three plugins, and then click next and accept the license and click finish and restart to take effect.

15.   Now to download actual ANTLR IDE plugin on the download/install page on Antlr wiki copy the link http:antlrv3ide.surceforge.net/updates and in eclipse goto help menu and open install new software option as we didi for previous plugins. On work with menu click on Add option and paste the copied link in the Location field and in name field enter ANTLR IDE. It will list the ANTLR IDE and we have to check everything available. Click next and further next check the accept license and click finish to install the plugin. during instalation we will get a warning, avoid it by clicking ok we will setup the IDE ourselves.Restart eclipse to take effect

16.   To setup ANTLR goto window menu and click on preferences. click on ANTLR and check the “mark generated resources as derived“. UNderneath ANTLR click on builder and define an antlr package. click on add and include the directory that we put ANTLR-3.2 into and click ok. underneath Code Generator check “Project relative folder” to keep generated files seperate from source files and give name to output folder name e.g antlr-generated and check “Append java package to output folder” and click Apply. Under editor  change Tab policy menu “Tabs only” and change identation size and displayed tab size to 4. Inside editor click on Content Assist and uncheck “Enable auto activation” and in folding option uncheck “enable folding“……. and click OK to complete to setup everything to create a project.

Advertisements