summaryrefslogtreecommitdiff
path: root/scripting/java/com
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-07-23 13:04:38 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-07-23 13:04:38 +0000
commit8c70d5f9dc7833c85a0e14933219ecffc559235e (patch)
tree1482769d238387c710ef08fda654d3770b6e3d93 /scripting/java/com
parent66b637d73b275f0c1062e33a861fb15fa89c6daf (diff)
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:
Diffstat (limited to 'scripting/java/com')
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java25
1 files changed, 23 insertions, 2 deletions
diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
index 72168f645240..fd6410982100 100644
--- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
+++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
@@ -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();
}