|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.henshin.statespace.impl.AbstractStateSpaceValidator org.eclipse.emf.henshin.statespace.external.AbstractFileBasedValidator
public abstract class AbstractFileBasedValidator
Abstract state space validator implementation that is based on invoking external tools on files derived from the state space. Contains some helper methods for invoking commands and converting files.
Field Summary | |
---|---|
static String |
AUT_FILE_EXPORT_KEY
A key used for exported AUT files. |
Fields inherited from class org.eclipse.emf.henshin.statespace.impl.AbstractStateSpaceValidator |
---|
index, property |
Constructor Summary | |
---|---|
AbstractFileBasedValidator()
|
Method Summary | |
---|---|
protected void |
addCachedFile(StateSpace stateSpace,
String key,
File file)
Cache a file that is associated to a state space. |
protected void |
clearCachedFiles(StateSpace stateSpace)
Clear the file cache for the argument state space. |
protected void |
convertFile(File input,
File output,
org.eclipse.core.runtime.IProgressMonitor monitor,
String... command)
Convert a file using a given command. |
protected File |
createTempFile(String prefix,
String suffix,
String content)
Simple helper method for creating temporary files. |
protected File |
export(StateSpace stateSpace,
StateSpaceExporter exporter,
String parameters,
String fileext,
org.eclipse.core.runtime.IProgressMonitor monitor)
|
protected File |
exportAsAUT(StateSpace stateSpace,
org.eclipse.core.runtime.IProgressMonitor monitor)
Export a state space as an AUT file. |
protected File |
getCachedFile(StateSpace stateSpace,
String key)
Get a cached file. |
protected boolean |
isLinux()
Check whether the current platform is Linux. |
protected boolean |
isWindows()
Check whether the current platform is Windows. |
Methods inherited from class org.eclipse.emf.henshin.statespace.impl.AbstractStateSpaceValidator |
---|
setProperty, setStateSpaceIndex |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.emf.henshin.statespace.StateSpaceValidator |
---|
validate |
Methods inherited from interface org.eclipse.emf.henshin.statespace.Validator |
---|
getName, usesProperty |
Field Detail |
---|
public static final String AUT_FILE_EXPORT_KEY
Constructor Detail |
---|
public AbstractFileBasedValidator()
Method Detail |
---|
protected void addCachedFile(StateSpace stateSpace, String key, File file)
stateSpace
- The state space.key
- Unique key for the file type.file
- The file to be cached.protected File getCachedFile(StateSpace stateSpace, String key)
stateSpace
- State space.key
- Unique key.
protected void clearCachedFiles(StateSpace stateSpace)
stateSpace
- The state space.protected File exportAsAUT(StateSpace stateSpace, org.eclipse.core.runtime.IProgressMonitor monitor) throws IOException
stateSpace
- State space.aut
- The AUT file.
IOException
- On I/O errors.protected File export(StateSpace stateSpace, StateSpaceExporter exporter, String parameters, String fileext, org.eclipse.core.runtime.IProgressMonitor monitor) throws Exception
Exception
protected void convertFile(File input, File output, org.eclipse.core.runtime.IProgressMonitor monitor, String... command) throws Exception
input
- Input file.output
- Output file.command
- Command.
Exception
- Onprotected File createTempFile(String prefix, String suffix, String content) throws IOException
content
- Content.
IOException
- I/O errors.protected boolean isWindows()
true
if it is Windows.protected boolean isLinux()
true
if it is Linux.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |