Features

Keyboard Shortcuts

This are some useful shortcuts for the prolog editor.

Key Binding Description
Ctrl + O Opens the "Quick Outline" for the currently selected type.
Ctrl + Shift + T Opens the "Open Prolog Type" dialog to open prolog element in your workspace.
Ctrl + Shift + R Opens the "Open Resource" dialog to open any resource in your workspace.
Ctrl + / Comment or uncomment all lines containing the current selection.

There are many other shortcuts available which are part of the Eclipse platform. You can see them all going to Windows->Preferences->General->Keys .

Interpreter Configurations

Through this preferences configuration you can configure the interpreters available in the IDE and specify which one of them will be the default interpreter when a project is created and when a console is created using the Open Console's drop down list in the "Console" view.

Window->Preferences->Prolog->Interpreters .

Project Creation

You can create a Prolog Project from File->New->Prolog Project . Using this wizard you can specify the interpreter to be used in this project

Pressing "Next" you can also add "Source Folders" which are the directories where project source files will be located.

Both elements can be configured once the project has been created using the project context menu (Alt+Enter having a project selected)->Prolog Build Path in the tabs "Source" and "Libraries"

And you also can add Prolog capabilities to an existing project of any other language by selecting it and pressing right click->ProDT->Add/Remove Prolog Capabilities , but you don't have to forget to add a prolog interpreter using the "Prolog Build Path" project configuration.

Compilation

Source compilation is integrated with this IDE using the Eclipse builder mechanism.
Each compilation error detected will be marked in:

  • The Script Explorer, identifying which project, source folder or package (directory path) contains a file with an error, and the files itself.
  • The Outline View and Quick Outline so you can use it to direct navigation to the problematic predicate.
  • The Problems View contains the list of problems and warnings of all the projects. The elements in this view can be grouped, sorted and filter using the drop down menu of the view located at the right of the view (shape like an inverted triangle)
  • The editor marks its errors in the left and right side bars and by underlying the line containing the error. Notice the right bar marks could also be used to fast navigation to the line containing an error/warning.

Console

This is maybe one of the most improved elements of 1.0.0 release. By right click on the opened editor you can select ProDT->Consult in Console to open the Console View executing the file's project's interpreter consulting the editor's file.

Inside this Console View you'll be able to:

  • Up and Down arrow to navigate through previous commands.
  • The autocompletion mechanism is available in the console displaying the predicates loaded in the consulted file (when the interpreters allows it by the listing predicate) and the list of built in predicates of the executed interpreter.
  • Clear the console and save its content on a file using the view's tool bar.

You can also select several files in the "Script Explorer" and consult them all at once in the console.

To end the session press the red square button on the Console view's tool bar or execute the "halt." predicate.

Autocompletion

By pressing Ctrl-Space in the editor a list of rules and predicates defined in the file, will be displayed followed by the list of predicates and operators built in in the file's project interpreter. This list of options will be filtered while you keep typing. Each proposal also shows the comment written right before the element declaration in the file.

Matching Brackets

A useful feature to have in a language with nesting elements is the highlight of matching brackets so this way it'll be easy to identify which bracket corresponds to another.

Outline

The outline is a schematic listing of the predicates and rules defined in a file which can be used to have an general overview of of a file and as a navigation tool. There the outline has two representations in the IDE:

  • Outline View: A view dedicate to display the up to date overview of the currently open file linking the cursor position in the file with the correspoinding element in the outline and the other way around which allows to jump the cursor position by selecting an element in the Outline View.
  • Quick Outlike: By pressing Ctrl-O in an open prolog editor a pop up view will be displayed containing the outline of the file which will be filtered as you type in the upper text box making file navigation even faster. You can use wildcards in the text box for your search:
    • * : one or more characters
    • ? : one character

Tasks and Bookmarks

Using right click on the editor's left ruler you can create two types of file markers:

  • Bookmarks: To generate pointers in the files which could be used to easily go to a point in the code project of some importance.
  • Tasks: To mark pending jobs on the code. This markers could be checked as completed to know which ones on the list are pending.

But if this feature, or any other, is not enough for your needs you can take advantage of the community around the Eclipse platform and look for other plugins to add to your Eclipse installation, like Mylyn which is a versatile task management tool.