public class EsxEditorUtil
extends java.lang.Object
Constructor and Description |
---|
EsxEditorUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addColumnToTableViewer(TableViewer tableViewer,
java.lang.String text,
java.lang.Integer width) |
static void |
clearTempDirectory(java.io.File directory)
This removes all "temp*.esx" and "untitled*.esx" files
from the given directory.
|
static void |
copyFile(java.io.File in,
java.io.File out) |
static java.lang.String |
getString(java.lang.String key)
This looks up a string in the plugin's plugin.properties file.
|
static java.lang.String |
getString(java.lang.String key,
java.lang.Object s1)
This looks up a string in plugin.properties, making a substitution.
|
static java.lang.String |
getTempEsxFilePath(java.io.File directory,
java.lang.String prefix)
Returns a file path in the format: "[directory]/[prefix]_[TIMESTAMP].esx"
|
static boolean |
openEditor(IWorkbench workbench,
URI uri) |
static java.lang.String[] |
openFilePathDialog(Shell shell,
int style,
java.lang.String[] fileExtensionFilters) |
static java.lang.String[] |
openFilePathDialog(Shell shell,
int style,
java.lang.String[] fileExtensionFilters,
boolean includeGroupFilter,
boolean includeAllFilter,
boolean addExtension) |
public static void clearTempDirectory(java.io.File directory)
directory
- A valid directory.public static void copyFile(java.io.File in, java.io.File out) throws java.io.IOException
in
- Input (source) file.out
- Output (destination) filejava.io.IOException
public static java.lang.String getString(java.lang.String key)
public static java.lang.String getString(java.lang.String key, java.lang.Object s1)
public static java.lang.String getTempEsxFilePath(java.io.File directory, java.lang.String prefix)
directory
- A valid directory.prefix
- public static boolean openEditor(IWorkbench workbench, URI uri)
workbench
- uri
- public static java.lang.String[] openFilePathDialog(Shell shell, int style, java.lang.String[] fileExtensionFilters)
shell
- style
- fileExtensionFilters
- public static java.lang.String[] openFilePathDialog(Shell shell, int style, java.lang.String[] fileExtensionFilters, boolean includeGroupFilter, boolean includeAllFilter, boolean addExtension)
shell
- style
- fileExtensionFilters
- includeGroupFilter
- includeAllFilter
- addExtension
- public static void addColumnToTableViewer(TableViewer tableViewer, java.lang.String text, java.lang.Integer width)
tableViewer
- The TableViewer that a column will be added totext
- The name of the column. Will show up in the column header.width
- If null, then pack() will be called. If a valid integer, then the column will have this width