fable.python.actions
Class RecordScriptAction
java.lang.Object
fable.python.actions.RecordScriptAction
- All Implemented Interfaces:
- org.eclipse.ui.IActionDelegate, org.eclipse.ui.IWorkbenchWindowActionDelegate
public class RecordScriptAction
- extends java.lang.Object
- implements org.eclipse.ui.IWorkbenchWindowActionDelegate
This action is triggered by user if he wants to record python action in a
script.
This action is represented by a toggle button. If button status is not
selected and user pushed it, button status becomes to true and a file dialog
box is opened. User can choose/create a file to record python actions.
If button status is set to true, and if user pushes it, button status becomes
to false and python actions are not recorded in a script.
- Author:
- SUCHET
Method Summary |
void |
dispose()
|
static java.lang.String |
getID()
|
void |
init(org.eclipse.ui.IWorkbenchWindow window)
|
boolean |
recordInThisFile(java.lang.String filename)
Check if this file exists. |
void |
run(org.eclipse.jface.action.IAction action)
|
void |
selectionChanged(org.eclipse.jface.action.IAction action,
org.eclipse.jface.viewers.ISelection selection)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RecordScriptAction
public RecordScriptAction()
dispose
public void dispose()
- Specified by:
dispose
in interface org.eclipse.ui.IWorkbenchWindowActionDelegate
init
public void init(org.eclipse.ui.IWorkbenchWindow window)
- Specified by:
init
in interface org.eclipse.ui.IWorkbenchWindowActionDelegate
run
public void run(org.eclipse.jface.action.IAction action)
- Specified by:
run
in interface org.eclipse.ui.IActionDelegate
selectionChanged
public void selectionChanged(org.eclipse.jface.action.IAction action,
org.eclipse.jface.viewers.ISelection selection)
- Specified by:
selectionChanged
in interface org.eclipse.ui.IActionDelegate
getID
public static java.lang.String getID()
recordInThisFile
public boolean recordInThisFile(java.lang.String filename)
- Check if this file exists. If yes, display a message to the user to avoid overwriting a file.
- Parameters:
filename
-
- Returns:
- true if file does not exists or if user wants to overwrite a file.