INTEGRATION: CWS scriptingf7 (1.4.14); FILE MERGED

2004/07/16 13:54:11 npower 1.4.14.3: #i25260# Make sure breakpoints are cleared when IDE is torn down
2004/07/14 09:07:11 npower 1.4.14.2: #i25260# Editors changes to support new methods in ScriptEditor interface { execute & indicateErrorLine }. ScriptProviders now raise editors with line of error highlighted.
2004/07/12 16:34:38 npower 1.4.14.1: #i25260# Changes to support error displayed in IDE for javascript and beanshell when script that is invoked is opened in IDE
Issue number:
Submitted by:
Reviewed by:
This commit is contained in:
Jens-Heiner Rechtien
2004-07-23 13:04:38 +00:00
parent 66b637d73b
commit 8c70d5f9dc

View File

@@ -2,9 +2,9 @@
*
* $RCSfile: ScriptEditorForJavaScript.java,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: svesik $ $Date: 2004-04-19 23:12:25 $
* last change: $Author: hr $ $Date: 2004-07-23 14:04:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -270,6 +270,26 @@ public class ScriptEditorForJavaScript implements ScriptEditor
BEING_EDITED.put(url, this);
}
/**
* Executes the script edited by the editor
*
*/
public Object execute() throws Exception
{
rhinoWindow.toFront();
return this.rhinoWindow.runSelectedWindow( scriptURL );
}
/**
* Indicates the line where error occured
*
*/
public void indicateErrorLine( int lineNum )
{
this.rhinoWindow.toFront();
this.rhinoWindow.highlighLineInSelectedWindow( scriptURL, lineNum );
}
// This code is based on the main method of the Rhino Debugger Main class
// We pass in the XScriptContext in the global scope for script execution
private Main initUI(final XScriptContext xsctxt) {
@@ -284,6 +304,7 @@ public class ScriptEditorForJavaScript implements ScriptEditor
});
sdb.setExitAction(new Runnable() {
public void run() {
sdb.clearAllBreakpoints();
sdb.dispose();
shutdown();
}