PrologConsole is a jEdit plug-in embedding a Prolog engine in the jEdit text editor. The chosen Prolog engine is tuProlog, a Java-based very light-weight Prolog system developed at the University of Bologna and Cesena. If you are reading this and want to download and install the plug-in, I assume that you are familiar with Prolog programming: so, I'm going to just explain how the plug-in and its interface work accomplishing the integration between jEdit and tuProlog.
The plugin is embedded as a shell in the Console plugin, so you must have the Console plugin installed in order to be able to use the PrologConsole plugin. You can then access the PrologConsole plugin only by starting the Console plugin and choosing the tuProlog shell from the drop-down list at the top left corner of the Console plugin interface.
To solve a Prolog goal using the the tuProlog shell you have to type the goal in the textfield provided by the Console plugin interface and press the Enter key (or press the "Run" button). tuProlog can solve goals using all the ISO predicates (e.g. write/1, is/2) and any predicate provided by the user.
To control the tuProlog system, the following predicates can be used:
Please refer to the Console plugin documentation if you want to know how to use the Console plugin interface and how the Console plugin works.
Starting with version 0.4, PrologConsole defines some actions to be included in the Plugins menu.
As you can see in the above picture, PrologConsole defines the following actions:
Starting with the jEdit 4.1 series, you can write a script to be run by jEdit at startup in languages other than BeanShell, which was the only language supported by previous jEdit versions. Starting with version 0.4, PrologConsole registers a macro handler to jEdit, so that you can put Prolog startup scripts in the ~/.jedit/startup or %JEDIT-HOME%/startup directories and having them run by jEdit at startup.
But what exactly is a "Prolog startup script", and what are the effects of having it run at startup?
A Prolog startup script is just a Prolog theory containing facts and clauses. Having a Prolog script run at startup has the effect of feeding the Prolog engine with the theory contained in the script, so that you can immediately issue queries, involving that particular theory, to the Prolog engine, instead of relying on manual theory consulting as previous versions of PrologConsole forced you to. If a Prolog startup script contains a syntax error, the consulting silently fails, logging an InvalidTheoryException to the activity.log file in your ~/.jedit directory.
Please note that this feature is only available under the jEdit 4.1 series and above. Prolog scripts will not be run at startup under jEdit 4.0 and below, but you can have them consulted (i.e. feeded to the Prolog engine) through the Macros>Run Other Macro... menu command.
The PrologConsole plug-in was developed under jEdit version 4.0final and embedded as a Console plugin shell, so the current requirements are: Console plugin version 3.2, and jEdit version 4.0final. The tuProlog engine (currenlty in version 1.2.0) is also required, but a copy is a provided within the PrologConsole zip archive.
jEdit can be found at http://www.jedit.org
tuProlog can be found at http://sourceforge.net/projects/tuprolog and at http://lia.deis.unibo.it/Research/2P.
The plugin's author is Giulio Piancastelli, and can be contacted writing to firstname.lastname@example.org. Please note that I am not the jEdit or Console plugin main developer, nor the tuProlog mantainer: please report to me bugs and suggestions related to the PrologConsole plugin only, and report the ones related to the text editor or the Console plugin or the Prolog system to their respective authors.