Package com.iizigo.term.project
Class TerminalModel
java.lang.Object
com.iizigo.term.project.TerminalModel
The Terminal Model contains the routines required for a required Terminal Project where all screen captures are stored when the Terminal Plug-in is used.
- Author:
- Christopher Mindus
- Field SummaryFields
- Method SummaryModifier and TypeMethodDescription- void- createCapture- (Shell shell, HostSession hostSession) Creates a new capture.- getCaptureFileName- (int index) Gets the file name from an index: "Capture [index].ee".- getCaptureFileName- (String name) Gets the file name from an screen name: "Capture [name].ee".Gets the first terminal capture matching the screen.- getMatchingCaptures- (EditorScreenProp screen) Gets the terminal sessions that matches a screen (only captures, no recordings).- intGets the next capture index, based on file names of type "Capture NN.ee".Gets the project.Gets all EE screens.- booleanChecks if disposed.- loadCapture- (String terminalModelProjectRelativeFileName) Load a screen capture session from a file or grabs an existing one.- loadCapture- (IFile ifile) Load a screen capture session from a file or grabs an existing one.
- Field Details- FILE_EXTENSIONThe file name extension with the dot ".ee".- See Also:
 
- SESSION_NAMESession name in EditorTerminalProps (the project relative file name).- See Also:
 
 
- Method Details- isDisposedpublic boolean isDisposed()Checks if disposed.- Returns:
- true if disposed.
 
- getSessionsGets all EE screens.- Returns:
- The (cahed) EE screens, never null.
 
- getProjectGets the project.- Returns:
- The terminal project.
 
- getNextCaptureIndexpublic int getNextCaptureIndex()Gets the next capture index, based on file names of type "Capture NN.ee".- Returns:
- The next screen index name for automatic naming.
 
- getCaptureFileNameGets the file name from an index: "Capture [index].ee".- Parameters:
- index- An index.
- Returns:
- A file name based on an index.
 
- getCaptureFileNameGets the file name from an screen name: "Capture [name].ee".- Parameters:
- name- The appended name.
- Returns:
- File name from an appended name.
 
- createCaptureCreates a new capture.- Parameters:
- shell- The shell.
- hostSession- The host session.
 
- loadCapturepublic EditorTerminalProps loadCapture- (String terminalModelProjectRelativeFileName) throws IOException Load a screen capture session from a file or grabs an existing one.- Parameters:
- terminalModelProjectRelativeFileName- The file name.
- Returns:
- The terminal properties, never null.
- Throws:
- IOException- For load errors.
 
- loadCaptureLoad a screen capture session from a file or grabs an existing one.- Parameters:
- ifile- The file.
- Returns:
- The terminal properties, never null.
- Throws:
- IOException- For load errors.
 
- getMatchingCapturesGets the terminal sessions that matches a screen (only captures, no recordings).- Parameters:
- screen- The screen to match.
- Returns:
- The matching captures, never null.
 
- getFirstMatchingCaptureGets the first terminal capture matching the screen.- Parameters:
- screen- The screen to match.
- Returns:
- The properties or null if not found (or not loaded yet).