public class ScriptUtil
extends java.lang.Object
| Constructor and Description |
|---|
ScriptUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeCurrentOPI()
Close current active OPI.
|
static void |
execInUI(java.lang.Runnable runnable,
org.csstudio.opibuilder.editparts.AbstractBaseEditPart widget)
Execute a runnable in UI thread.
|
static void |
executeEclipseCommand(java.lang.String commandId)
Execute an Eclipse command.
|
static void |
executeSystemCommand(java.lang.String command,
int wait)
Executing a system or shell command.
|
static org.osgi.framework.Version |
getBOYVersion() |
static boolean |
isMobile()
If the current OPI is running on Mobile device.
|
static boolean |
isMobile(org.csstudio.opibuilder.editparts.AbstractBaseEditPart widget)
If the current OPI is running on Mobile device.
|
static boolean |
isWebOPI() |
static void |
makeElogEntry(java.lang.String filePath)
Deprecated see makeLogbookEntry(String, String) |
static void |
makeLogbookEntry(java.lang.String text,
java.lang.String filePath)
Pop up a logbook dialog to make a logbook entry.
|
static void |
openOPI(org.csstudio.opibuilder.editparts.AbstractBaseEditPart widget,
java.lang.String opiPath,
int target,
org.csstudio.opibuilder.util.MacrosInput macrosInput)
Open an OPI.
|
public static final void openOPI(org.csstudio.opibuilder.editparts.AbstractBaseEditPart widget,
java.lang.String opiPath,
int target,
org.csstudio.opibuilder.util.MacrosInput macrosInput)
widget - the widget to which the script is attached.opiPath - the path of the OPI. It can be either an absolute path or a
relative path to the Display file of the widget.target - target place of the new OPI. 0: new tab; 1: replace current
one; 2: new window; 3: view on left; 4: view on right; 5: view
on top; 6: view on bottom; 7: detached viewmacrosInput - the macrosInput. null if no macros needed.public static void closeCurrentOPI()
public static final void makeElogEntry(java.lang.String filePath)
Deprecated see makeLogbookEntry(String, String)filePath - public static final void makeLogbookEntry(java.lang.String text,
java.lang.String filePath)
text - text of the log entry.filePath - path of a file to attach or null. It could be either a local
file system file path or a workspace file path. File types
that the logbook support depend on implementation but should
include *.gif, *.jpg: File will be attached as image.public static final void executeEclipseCommand(java.lang.String commandId)
commandId - the command id.public static final void executeSystemCommand(java.lang.String command,
int wait)
Several things can happen:
command - Command to run. Format depends on OS.wait - Time to wait for completion in secondspublic static final void execInUI(java.lang.Runnable runnable,
org.csstudio.opibuilder.editparts.AbstractBaseEditPart widget)
runnable - the runnable to be executed.widget - any widget. It is referred to get the UI thread.public static final boolean isWebOPI()
public static final boolean isMobile()
public static final boolean isMobile(org.csstudio.opibuilder.editparts.AbstractBaseEditPart widget)
widget - the widget on which the script is attached to.public static final org.osgi.framework.Version getBOYVersion()