Script Service: allow setting the file name and stdout & stderr

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
TODO: Scripting: add a tag for compiled languages

This interface serves as a duct-typing-interface to label
ScriptEngineFactory implementations to tell ImageJ2 that the language
actually needs compilation prior to execution.

It might still require a companion interface (to be done in the future)
for ScriptEngine to add the compile() method returning a list of compile
products. But maybe it is enough to add that method to CompiledLanguage;
we will see when porting Refresh_Javas to ImageJ2 ;-)

Note: the ScriptEngineFactory must be labeled so that e.g. the Script
Editor can decide even without a ScriptEngine instance that there need to
be different labels in the Run menu (Compile and Run, as opposed to Run).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add the ij-ui-script-editor project

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
First code dump of the Fiji Script Editor

This dump is intentionally non-compiling, to offer a better base for
concurrent development of the Script Editor.

The base is fiji.git's commit fc077481.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: remove now-obsolete classes

These classes were needed in the context of Fiji and/or IJ1.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: the classes are now in package imagej.script.editor

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: add copyright headers

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: massive cleanup to make it compile

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make the Script Editor a proper plugin

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: use AppUtils.getBaseDirectory() everywhere

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: use the File class more consistently

While at it, refrain from using an AWT file dialog ;-)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: make sure that annotation processing is enabled

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: remove discardAllEdits()

It is doubtful whether all editor components will support this.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: rename the TextEditor class into EditorFrame

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: refactor the Executer class out of EditorFrame

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: refactor the Tab class out of EditorFrame

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: replace all e.printStackTrace() calls with Log.error()

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: remember the current EditorPane in the EditorFrame

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: handle currentLanguage == null and file == null gracefully

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Script Editor: unify variable name for the button groups

While at it, fix that 'None' was not put into the language button group.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>