Eclipse update site of SugarJThis is the Eclipse update site of SugarJ. Copy the URL of this site into the Eclipse software installer: www.erdweg.org/projects/sugarj/update.
- Java 7 or higher
- 8 MB stack space. You can set the stack space of your Java runtime using the -Xss8m command line argument when starting Eclipse or setting -Xss16m in your eclipse.ini file.
- Install Eclipse (follow instructions on eclipse.org).
- Start Eclipse.
- In Eclipse, select 'Install New Software' in the 'Help' menu.
- In the 'work with' field, copy the SugarJ update site www.erdweg.org/projects/sugarj/update and hit enter.
- Be sure to deselect the 'Group items by category' checkbox on the bottom of the window.
- The update dialog will let you select any number of our currently supported host languages, such as Java (*.sugj), Haskell (*.shs), Prolog (*.sugp), Scala (*.sugs).
- Use the Sugar-Lang Wizzard to create a new project: File->New->Other or via the context menu, and then select Sugar-Lang Project. The following dialog is the same as for Java projects, and all settings you make here will be used by the sugar-lang compiler.
- Create a new file in the source folder: File->New->File or via the context menu. Important: A source file's file extension decides which base language it belongs to. Choose .sugj for Java, .shs for Haskell, .sugp for Prolog, .sugs for Scala.
- All base languages support extensibility via library import. However, there are minor syntactic differences. To get an impression on how a base language is supported, we recommend taking a look at existing case studies. In particular, the following case studies are relatively easy: pairs for Java, idiom brackets for Haskell, XML syntax for Scala.