Class ServerConfigView
- All Implemented Interfaces:
- IActivationListener,- IWorkbenchPartIZ,- IDisposedPart,- IAdaptable,- IExecutableExtension,- IPersistable,- ISaveablePart,- ISaveablePart2,- IViewPart,- IWorkbenchPart,- IWorkbenchPart2,- IWorkbenchPart3,- IWorkbenchPartOrientation
- Author:
- Christopher Mindus
- Field SummaryFields- Fields inherited from interface org.eclipse.ui.ISaveablePart- PROP_DIRTY- Fields inherited from interface org.eclipse.ui.ISaveablePart2- CANCEL, DEFAULT, NO, YES- Fields inherited from interface org.eclipse.ui.IWorkbenchPart- PROP_TITLE
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- void- createPartControl- (Composite parent) Creates the view part.- void- dispose()Disposes of this workbench part.- void- doSave- (IProgressMonitor monitor) Saves the contents of this part.- void- doSaveAs()Saves the contents of this part to another object.Gets the extensions framework.Gets the selection enabler instance.Gets the undo/redo instance.- voidInitializes this view with the given view site.- boolean- isDirty()Returns whether the contents of this part have changed since the last save operation.- booleanChecks if the part is disposed of.- booleanReturns whether the "Save As" operation is supported by this part.- booleanReturns whether the contents of this part should be saved when the part is closed.- void- onActivated- (boolean on) Called when activator or deactivated.- void- onClose()Called when about to close, but SWT is still there.- static ServerConfigViewOpen a view for a Server configuration file, or focuses an existing view for the file.- intPrompts the user for input on what to do with unsaved data.- voidSaves the state.- void- setFocus()Focus to best component, where the framework takes care of it normally.- voidCalled when states needs to be updated.- Methods inherited from class org.eclipse.ui.part.ViewPart- checkSite, getViewSite, init, setContentDescription, setInitializationData, setPartName- Methods inherited from class org.eclipse.ui.part.WorkbenchPart- addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy- Methods inherited from class org.eclipse.core.commands.common.EventManager- addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject- Methods inherited from class java.lang.Object- clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait- Methods inherited from interface org.eclipse.core.runtime.IAdaptable- getAdapter- Methods inherited from interface org.eclipse.ui.IWorkbenchPart- addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener- Methods inherited from interface com.iizigo.editor.IWorkbenchPartIZ- onComponentFocused
- Field Details- IDThe View Part ID.
 
- Constructor Details- ServerConfigViewpublic ServerConfigView()Creates the folder view.
 
- Method Details- openFileOpen a view for a Server configuration file, or focuses an existing view for the file.- Parameters:
- fileName- The file name.
- doUpdateHistory- Flag to update history for last recently used file.
- Returns:
- The Server Configuration view, or null if the file doesn't exist.
 
- initInitializes this view with the given view site. A memento is passed to the view which contains a snapshot of the views state from a previous session. Where possible, the view should try to recreate that state within the part controls.- This implementation will ignore the memento and initialize the view in a fresh state. - Specified by:
- initin interface- IViewPart
- Overrides:
- initin class- ViewPart
- Throws:
- PartInitException
 
- saveStateSaves the state.
- createPartControlCreates the view part.- Specified by:
- createPartControlin interface- IWorkbenchPart
- Specified by:
- createPartControlin class- WorkbenchPart
 
- disposepublic void dispose()Disposes of this workbench part.- This is the last method called on the IWorkbenchPart. At this point the part controls (if they were ever created) have been disposed as part of an SWT composite. There is no guarantee that createPartControl() has been called, so the part controls may never has been created. - Within this method a part may release any resources, fonts, images, etc. held by this part. It is also very important to de-register all listeners from the workbench. - Specified by:
- disposein interface- IWorkbenchPart
- Overrides:
- disposein class- WorkbenchPart
 
- setFocuspublic void setFocus()Focus to best component, where the framework takes care of it normally.- Specified by:
- setFocusin interface- IWorkbenchPart
- Specified by:
- setFocusin class- WorkbenchPart
 
- getExtensionGets the extensions framework.- Specified by:
- getExtensionin interface- IWorkbenchPartIZ
 
- getUndoRedoGets the undo/redo instance.- Specified by:
- getUndoRedoin interface- IWorkbenchPartIZ
 
- isDisposedpublic boolean isDisposed()Checks if the part is disposed of.- Specified by:
- isDisposedin interface- IActivationListener
- Specified by:
- isDisposedin interface- IDisposedPart
- Specified by:
- isDisposedin interface- IWorkbenchPartIZ
- Returns:
- true if disposed of, false otherwise.
 
- getSelectionEnablerGets the selection enabler instance.- Specified by:
- getSelectionEnablerin interface- IWorkbenchPartIZ
 
- promptToSaveOnClosepublic int promptToSaveOnClose()Prompts the user for input on what to do with unsaved data. This method is only called when the part is closed or when the Workbench is shutting down.- Specified by:
- promptToSaveOnClosein interface- ISaveablePart2
- Returns:
- the return code, must be either YES,NO,CANCELorDEFAULT.
 
- doSaveSaves the contents of this part.- If the save is successful, the part should fire a property changed event reflecting the new dirty state ( - PROP_DIRTYproperty).- If the save is cancelled through user action, or for any other reason, the part should invoke - setCancelledon the- IProgressMonitorto inform the caller.- This method is long-running; progress and cancellation are provided by the given progress monitor. - Specified by:
- doSavein interface- ISaveablePart
- Parameters:
- monitor- the progress monitor
 
- doSaveAspublic void doSaveAs()Saves the contents of this part to another object.- Implementors are expected to open a "Save As" dialog where the user will be able to select a new name for the contents. After the selection is made, the contents should be saved to that new name. During this operation a - IProgressMonitorshould be used to indicate progress.- If the save is successful, the part fires a property changed event reflecting the new dirty state ( - PROP_DIRTYproperty).- Specified by:
- doSaveAsin interface- ISaveablePart
 
- isDirtypublic boolean isDirty()Returns whether the contents of this part have changed since the last save operation. If this value changes the part must fire a property listener event with- PROP_DIRTY.- Note: this method is called often on a part open or part activation switch, for example by actions to determine their enabled status. - Specified by:
- isDirtyin interface- ISaveablePart
- Returns:
- trueif the contents have been modified and need saving, and- falseif they have not changed since the last save
 
- isSaveAsAllowedpublic boolean isSaveAsAllowed()Returns whether the "Save As" operation is supported by this part.- Specified by:
- isSaveAsAllowedin interface- ISaveablePart
- Returns:
- trueif "Save As" is supported, and- falseif not supported
 
- isSaveOnCloseNeededpublic boolean isSaveOnCloseNeeded()Returns whether the contents of this part should be saved when the part is closed.- Specified by:
- isSaveOnCloseNeededin interface- ISaveablePart
- Returns:
- trueif the contents of the part should be saved on close, and- falseif the contents are expendable
 
- updateStatespublic void updateStates()Called when states needs to be updated.- Specified by:
- updateStatesin interface- IActivationListener
 
- onActivatedpublic void onActivated- (boolean on) Called when activator or deactivated.- Specified by:
- onActivatedin interface- IActivationListener
 
- onClosepublic void onClose()Called when about to close, but SWT is still there.- Specified by:
- onClosein interface- IActivationListener