-
Notifications
You must be signed in to change notification settings - Fork 6
Home
An alternative to this page is the fregIDE Tutorial. It takes you from the installation to execution of a Hello World program with a lots of screenshots.
##Introduction
The Eclipse plugin that supports Frege is called fregIDE. Don't ask how to pronounce that!
The fregIDE is hopefully already usable, but in an early stage of development. Currently, the following is supported:
- Enabling a project to use the Frege Builder.
- Frege preferences
- Syntax coloring, including distinction between imported, top level and local names.
- Outline view
- Mouse over documentation
- Mouse over navigation
- Editor actions to support funny glyphs
- Live error markers in the editor
- Code completion
- Project build, i.e. compilation of Frege files
- Compilation populates the problem view with errors, warnings and hints and the editor with persistent markers.
- Run programs through JDT Run Configurations
##Prerequisites
- JRE 1.7 (no JDK required)
- Eclipse 3.7, 4.2 (different versions may also work, listed ones are known to work)
The Frege programs developed in Eclipse will not depend on any Eclipse libraries. To run them apart from Eclipse, you'll still need Frege runtime classes. You can either use the ones that come with the Eclipse plugin (they will be in a file named frege.ide_3.
xx.vvv.jar
located somewhere below the eclipse plugin directory) or download a binary compatible frege3.
xx.vvv.jar
from the download page.
##Preparation
Eclipse should have the following VM settings:
-Xmx512m -Xss4m -XX:MaxPermSize=128M
For more information on MaxPermSize
see the Eclipse FAQ
The figure for -Xss
is chosen so that source files with some ten thousand lines can be compiled. But the stack space allocated normally is not enough for serious work. Hence, the 4m are a safe bet.
The workspace should be configured to have all text files in UTF-8 encoding by default. The frege plugin currently does not support other encodings for frege source files. To compile frege files in different encodings, one needs to use the command line compiler with the -encoding
option. However, as long as one restricts itself to ASCII, the encoding is of course immaterial.
##Installation
- Download the latest version of
fregIDE3.
xx.vvv.zip
labelled Featured from the download page. - Start up Eclipse.
- Open the preferences page
Window
->Preferences
, and go to theInstall/Update
section. Open theAvailable Software Sites
page andAdd...
the IMP Update Site with Locationhttp://download.eclipse.org/technology/imp/updates/
. Close the preferences page. (This must be done upon first install of fregIDE only.) - Open the installation page
Help
->Install New Software
- Click
Add...
and enter a name, for example fregIDE archive. Then clickArchive...
and locate the downloaded zip file. - Turn off the check box
Group items by category
- Turn on the check box
Contact all update sites during installation to find required software
- In the list box select the feature
Functional Programming with Frege
- Click
Next>
to start the installation and confirm a few dialogs, license agreements and warnings because of unsigned content to complete it. - When asked, restart Eclipse to activate the installed plugins.
##Update
An update is performed like an installation. Eclipse will recognize automatically that the plugin is updated. After Eclipse has completed and is restarted, the following must be done for each Frege Project:
- In the Package Explorer, remove the old
frege.ide_3.``*
library shown under Referenced Libraries from the Build Path of the project. - Enable the Frege Builder again, this will add the new library to the project.
- Do a Clean Build to address compatibility issues.
##Usage
- Review the
Preferences
->Frege
page. Choose colors and fonts. If there is noFrege
preferences page, your Eclipse instance most probably does not run with Java 1.7 or there were errors during installation of the Frege IDE. - Create a Java project.
- From the context menu of the project, select
Enable Frege Builder
. This will add a library namedfrege.ide_3.
xx.vvv.jar
to the Referenced Libraries of the project. - Create a source file with extension
.fr
and begin editing. - For utilizing the navigation feature with regard to the standard library, create a dedicated Frege Project in the workspace, and unpack the source files from libsources
*
.zip available from download site. Note that release numbers of fregIDE and libsources must match exactly. - Code completion and content proposals (invoked normally by CTRL+Space) work the better the fewer errors are currently flagged. I'll probably write a separate wiki page to describe the details later.
##Known Issues
Not yet implemented, but planned:
- more Editor Actions (maybe "Insert Type Signature(s)")
- QuickCheck support
- Interpreter ("scrapbook")
Not implemented, unsure whether we need that:
- text folding
- text formatting
Usage issues:
- When you feel that the GUI is getting too slow, you probably have several thousand lines of source code in the editor window. Time to think about modularization.
- When editing module A that imports module B, changes in the source code of B will not be recognized until B is recompiled and the editor window of A is closed and re-opened again.