Package com.iizigo.term.project
Class TerminalModel
- java.lang.Object
- com.iizigo.term.project.TerminalModel
 
- public class TerminalModel extends java.lang.ObjectThe 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 Summary- Fields - Modifier and Type - Field - Description - static java.lang.String- FILE_EXTENSIONThe file name extension with the dot ".ee".- static java.lang.String- SESSION_NAMESession name in EditorTerminalProps (the project relative file name).
 - Method Summary- All Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - void- createCapture(org.eclipse.swt.widgets.Shell shell, HostSession hostSession)Creates a new capture.- java.lang.String- getCaptureFileName(int index)Gets the file name from an index: "Capture [index].ee".- java.lang.String- getCaptureFileName(java.lang.String name)Gets the file name from an screen name: "Capture [name].ee".- EditorTerminalProps- getFirstMatchingCapture(EditorScreenProp screen)Gets the first terminal capture matching the screen.- EESession[]- getMatchingCaptures(EditorScreenProp screen)Gets the terminal sessions that matches a screen (only captures, no recordings).- int- getNextCaptureIndex()Gets the next capture index, based on file names of type "Capture NN.ee".- org.eclipse.core.resources.IProject- getProject()Gets the project.- EESession[]- getSessions()Gets all EE screens.- boolean- isDisposed()Checks if disposed.- EditorTerminalProps- loadCapture(java.lang.String terminalModelProjectRelativeFileName)Load a screen capture session from a file or grabs an existing one.- EditorTerminalProps- loadCapture(org.eclipse.core.resources.IFile ifile)Load a screen capture session from a file or grabs an existing one.
 
- Field Detail- FILE_EXTENSION- public static final java.lang.String FILE_EXTENSION The file name extension with the dot ".ee".- See Also:
- Constant Field Values
 
 - SESSION_NAME- public static final java.lang.String SESSION_NAME Session name in EditorTerminalProps (the project relative file name).- See Also:
- Constant Field Values
 
 
 - Method Detail- isDisposed- public boolean isDisposed() Checks if disposed.- Returns:
- true if disposed.
 
 - getSessions- public EESession[] getSessions() Gets all EE screens.- Returns:
- The (cahed) EE screens, never null.
 
 - getProject- public org.eclipse.core.resources.IProject getProject() Gets the project.- Returns:
- The terminal project.
 
 - getNextCaptureIndex- public 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.
 
 - getCaptureFileName- public java.lang.String getCaptureFileName(int index) Gets the file name from an index: "Capture [index].ee".- Parameters:
- index- An index.
- Returns:
- A file name based on an index.
 
 - getCaptureFileName- public java.lang.String getCaptureFileName(java.lang.String name) Gets the file name from an screen name: "Capture [name].ee".- Parameters:
- name- The appended name.
- Returns:
- File name from an appended name.
 
 - createCapture- public void createCapture(org.eclipse.swt.widgets.Shell shell, HostSession hostSession)Creates a new capture.- Parameters:
- shell- The shell.
- hostSession- The host session.
 
 - loadCapture- public EditorTerminalProps loadCapture(java.lang.String terminalModelProjectRelativeFileName) throws java.io.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:
- java.io.IOException- For load errors.
 
 - loadCapture- public EditorTerminalProps loadCapture(org.eclipse.core.resources.IFile ifile) throws java.io.IOException Load a screen capture session from a file or grabs an existing one.- Parameters:
- ifile- The file.
- Returns:
- The terminal properties, never null.
- Throws:
- java.io.IOException- For load errors.
 
 - getMatchingCaptures- public EESession[] getMatchingCaptures(EditorScreenProp screen) Gets the terminal sessions that matches a screen (only captures, no recordings).- Parameters:
- screen- The screen to match.
- Returns:
- The matching captures, never null.
 
 - getFirstMatchingCapture- public EditorTerminalProps getFirstMatchingCapture(EditorScreenProp screen) Gets 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).