TEMERITY

us.temerity.pipeline
Class SimpleEditor

java.lang.Object
  extended by us.temerity.pipeline.Named
      extended by us.temerity.pipeline.PluginID
          extended by us.temerity.pipeline.BasePlugin
              extended by us.temerity.pipeline.BaseEditor
                  extended by us.temerity.pipeline.SimpleEditor
All Implemented Interfaces:
Serializable, Cloneable, Comparable<PluginID>, Glueable
Direct Known Subclasses:
EmacsEditor, GPlayEditor, IDisplayEditor, MPlayEditor, NEditEditor, SimpleSingleEditor, WebBrowserEditor, WebBrowserEditor, XImageEditor

public class SimpleEditor
extends BaseEditor

An Editor plugin which executes simple program with only file arguments.

New kinds of editors can be written by subclassing this class. Due to the way plugins are loaded and communicated between applications, any fields added to a subclass will be reinitialized when the action is stored to disk or when it is sent over the network.

While new plugin subclass versions are being modified and tested the underDevelopment method should be called in the subclasses constructor to enable the plugin to be dynamically reloaded.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class us.temerity.pipeline.BasePlugin
pDescription
 
Fields inherited from class us.temerity.pipeline.PluginID
pVendor, pVersionID
 
Fields inherited from class us.temerity.pipeline.Named
pName
 
Constructor Summary
protected SimpleEditor(String name, VersionID vid, String vendor, String desc, String program)
          Construct with the given name, version, vendor and description.
 
Method Summary
 SubProcessLight launch(FileSeq fseq, Map<String,String> env, File dir)
          Deprecated. 
 SubProcessLight prep(String author, FileSeq fseq, Map<String,String> env, File dir)
          Construct a SubProcessLight instance which when executed will launch an editor program to view the given file sequence as arguments.
 
Methods inherited from class us.temerity.pipeline.BaseEditor
cleanupLater, clone, createTemp, equals, getPluginType, getProgram, hasPrepMethod, ignoreExitCode, makeWorkingDirs, setProgram
 
Methods inherited from class us.temerity.pipeline.BasePlugin
addSupport, compareTo, getDescription, getFullMessage, getPluginID, getResource, getResources, getResourceSize, getSupports, isUnderDevelopment, removeSupport, setSupports, supports, toString, underDevelopment
 
Methods inherited from class us.temerity.pipeline.PluginID
fromGlue, getVendor, getVersionID, toGlue
 
Methods inherited from class us.temerity.pipeline.Named
getName
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleEditor

protected SimpleEditor(String name,
                       VersionID vid,
                       String vendor,
                       String desc,
                       String program)
Construct with the given name, version, vendor and description.

Parameters:
name - The short name of the editor.
vid - The editor plugin revision number.
vendor - The name of the plugin vendor.
desc - A short description of the editor.
program - A name of the editor executable.
Method Detail

prep

public SubProcessLight prep(String author,
                            FileSeq fseq,
                            Map<String,String> env,
                            File dir)
                     throws PipelineException
Construct a SubProcessLight instance which when executed will launch an editor program to view the given file sequence as arguments.

The default implementation executes the editor program obtained with getProgram method under the given environment. Subclasses should override this method if more specialized behavior or different command line arguments are needed in order to launch the editor for the given file sequence.

Overrides:
prep in class BaseEditor
Parameters:
author - The name of the user owning the files.
fseq - The file sequence to edit.
env - The environment under which the editor is run.
dir - The working directory where the editor is run.
Returns:
The controlling SubProcessLight instance.
Throws:
PipelineException - If unable to launch the editor.
See Also:
SubProcessLight

launch

@Deprecated
public SubProcessLight launch(FileSeq fseq,
                                         Map<String,String> env,
                                         File dir)
                       throws PipelineException
Deprecated. 

This implementation always throws a PipelineException, to insure that the prep method is used for this Editor instead of this deprecated method.

Overrides:
launch in class BaseEditor
Parameters:
fseq - The file sequence to edit.
env - The environment under which the editor is run.
dir - The working directory where the editor is run.
Returns:
The controlling SubProcessLight instance.
Throws:
PipelineException - If unable to launch the editor.
See Also:
SubProcessLight

TEMERITY