public class ScriptEditControl extends java.lang.Object implements EditorAction
| Constructor and Description |
|---|
ScriptEditControl(@NotNull javax.swing.filechooser.FileFilter scriptFileFilter,
@NotNull java.lang.String scriptSuffix,
@NotNull java.awt.Frame owner,
java.io.File defaultScriptDir,
@NotNull java.util.prefs.Preferences preferences,
@NotNull Exiter exiter,
@NotNull AppPreferencesModel appPreferencesModel,
@NotNull ScriptEditControlCallback callback) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
closeActiveTab()
Close the active script-tab.
|
boolean |
closeAllTabs()
Close all opened script-tabs.
|
void |
newScript()
Open a new empty script document.
|
void |
openScriptFile(@NotNull java.io.File file)
Opens a script file.
|
void |
openUser()
Open a file which is chosen by the user.
|
static void |
registerActivePopup(@NotNull CFPythonPopup activePopup)
Register last active popup.
|
void |
saveActiveTab()
Save the active script-tab to the stored file path.
|
void |
saveAsActiveTab()
Open a file browser and prompt the user for a location/name to store this
file.
|
void |
setAction(@NotNull javax.swing.Action action,
@NotNull java.lang.String name)
Sets the
Action instance for this editor action. |
void |
setTextAreaDefaults(@NotNull TextAreaDefaults textAreaDefaults)
Deprecated.
|
public ScriptEditControl(@NotNull
@NotNull javax.swing.filechooser.FileFilter scriptFileFilter,
@NotNull
@NotNull java.lang.String scriptSuffix,
@NotNull
@NotNull java.awt.Frame owner,
java.io.File defaultScriptDir,
@NotNull
@NotNull java.util.prefs.Preferences preferences,
@NotNull
@NotNull Exiter exiter,
@NotNull
@NotNull AppPreferencesModel appPreferencesModel,
@NotNull
@NotNull ScriptEditControlCallback callback)
appPreferencesModel - the global AppPreferencesModel
instancecallback - the callback function for reporting problems when
starting an external editor@Deprecated
public void setTextAreaDefaults(@NotNull
@NotNull TextAreaDefaults textAreaDefaults)
public static void registerActivePopup(@NotNull
@NotNull CFPythonPopup activePopup)
activePopup - active popup to register@ActionMethod public void newScript()
public void openScriptFile(@NotNull
@NotNull java.io.File file)
file - the script file to openpublic void openUser()
public boolean closeActiveTab()
true if the tab was closed, or false if the user
has canceledpublic boolean closeAllTabs()
true if all tabs have been closed, or false if
the user has canceled.public void saveAsActiveTab()
public void saveActiveTab()
public void setAction(@NotNull
@NotNull javax.swing.Action action,
@NotNull
@NotNull java.lang.String name)
EditorActionAction instance for this editor action.setAction in interface EditorActionaction - the action instancename - the name of the action