20090420, rgf

com.sun.star.script.framework.provider.oorexx
Class ScriptEditorForooRexx

java.lang.Object
  extended by com.sun.star.script.framework.provider.oorexx.ScriptEditorForooRexx
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class ScriptEditorForooRexx
extends java.lang.Object
implements java.awt.event.ActionListener


Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void edit(com.sun.star.script.provider.XScriptContext context, ScriptMetaData entry)
          Opens an editor window for the specified ScriptMetaData.
 java.lang.Object execute()
          Executes the script edited by the editor
static ScriptEditorForooRexx getEditor()
          Returns the global ScriptEditorForooRexx instance.
static ScriptEditorForooRexx getEditor(java.net.URL url)
          Get the ScriptEditorForooRexx instance for this URL
 java.lang.String getExtension()
          Returns the default extension for ooRexx scripts
(package private) static int getRexxErrorLineNumber(java.lang.String msg)
          Try to locate the error line number in the supplied Rexx error message and return it as an int.
 java.lang.String getTemplate()
          Returns the template text for ooRexx scripts
 java.lang.String getText()
          Returns the text being displayed in this ScriptEditorForooRexx
 void indicateErrorLine(int lineNum)
          Indicates the line where error occured
 boolean isModified()
          Returns whether or not the script source being edited in this ScriptEditorForooRexx has been modified
 void setScriptMetaData(ScriptMetaData smd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getEditor

public static ScriptEditorForooRexx getEditor()
Returns the global ScriptEditorForooRexx instance.


getEditor

public static ScriptEditorForooRexx getEditor(java.net.URL url)
Get the ScriptEditorForooRexx instance for this URL

Parameters:
url - The URL of the script source file
Returns:
The ScriptEditorForooRexx associated with the given URL if one exists, otherwise null.

isModified

public boolean isModified()
Returns whether or not the script source being edited in this ScriptEditorForooRexx has been modified


getText

public java.lang.String getText()
Returns the text being displayed in this ScriptEditorForooRexx

Returns:
The text displayed in this ScriptEditorForooRexx

getTemplate

public java.lang.String getTemplate()
Returns the template text for ooRexx scripts

Returns:
The template text for ooRexx scripts

getExtension

public java.lang.String getExtension()
Returns the default extension for ooRexx scripts

Returns:
The default extension for ooRexx scripts

indicateErrorLine

public void indicateErrorLine(int lineNum)
Indicates the line where error occured


setScriptMetaData

public void setScriptMetaData(ScriptMetaData smd)

execute

public java.lang.Object execute()
                         throws java.lang.Exception
Executes the script edited by the editor

Throws:
java.lang.Exception

edit

public void edit(com.sun.star.script.provider.XScriptContext context,
                 ScriptMetaData entry)
Opens an editor window for the specified ScriptMetaData. If an editor window is already open for that data it will be moved to the front.

Parameters:
context - The context in which to execute the script
entry - The metadata describing the script

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

getRexxErrorLineNumber

static int getRexxErrorLineNumber(java.lang.String msg)
Try to locate the error line number in the supplied Rexx error message and return it as an int.

Parameters:
msg - Rexx error message to parse
Returns:
error line number or -1, if no line number was found

20090420, rgf