org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples.routineeditor.pages.source
Class SourcePage

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.EditorPart
              extended by org.eclipse.datatools.sqltools.common.ui.helpsystem.HelpSystemEditorPart
                  extended by org.eclipse.datatools.sqltools.schemaobjecteditor.ui.core.SchemaObjectEditorPage
                      extended by org.eclipse.datatools.sqltools.schemaobjecteditor.ui.core.NestedEditorPage
                          extended by org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples.routineeditor.pages.source.SourcePage
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, IDisablementPart, ISchemaObjectEditorPage, org.eclipse.help.IContextProvider, org.eclipse.ui.forms.editor.IFormPage, org.eclipse.ui.IEditorPart, org.eclipse.ui.ISaveablePart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation
Direct Known Subclasses:
ASASourcePage

public class SourcePage
extends NestedEditorPage
implements ISchemaObjectEditorPage

Author:
Hui Cao TODO extract the parser logic into ParserModelUpdater

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.datatools.sqltools.schemaobjecteditor.ui.core.SchemaObjectEditorPage
SchemaObjectEditorPage.PageForm
 
Field Summary
static java.lang.String PAGE_ID
           
 
Fields inherited from interface org.eclipse.datatools.sqltools.schemaobjecteditor.ui.ISchemaObjectEditorPage
UNKNOWN_ITEM_TYPE
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Fields inherited from interface org.eclipse.help.IContextProvider
NONE, SELECTION
 
Constructor Summary
SourcePage()
           
SourcePage(org.eclipse.ui.forms.editor.FormEditor editor, java.lang.String id, java.lang.String title)
           
SourcePage(java.lang.String id, java.lang.String title)
           
 
Method Summary
 void aboutToLeave()
          Notifies this page that a page switch event has occurred.
 boolean aboutToSave(org.eclipse.core.runtime.IProgressMonitor monitor)
          Notifies this page that the editor is about to save, subclass should update the model if necessary
 boolean canLeaveThePage()
          By default, editor will be allowed to flip the page.
 void dispose()
          Disposes the managed form.
 org.eclipse.ui.IEditorPart getNestedEditor()
          Subclass should implement this method to reutrn the editor part in this page
 org.eclipse.ui.IEditorInput getNestedEditorInput()
          Subclass should implement this method to reutrn the editor input for the nested editor
 void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input)
          Initializes the form page.
 void refresh()
          Sub class should override this method to refresh the page according to the model and if this page is not opened, should not refresh it
 void setActive(boolean active)
          Implements the required method by refreshing the form when set active.
 
Methods inherited from class org.eclipse.datatools.sqltools.schemaobjecteditor.ui.core.NestedEditorPage
getPartControl, isDirty, isEditor, setPartControl
 
Methods inherited from class org.eclipse.datatools.sqltools.schemaobjecteditor.ui.core.SchemaObjectEditorPage
createPartControl, doSave, doSaveAs, enable, getDatabaseIdentifier, getEditor, getEditorDescriptor, getErrorMsg, getId, getIndex, getManagedForm, getPageDescriptor, getPreferencePageIds, getTitleImage, initialize, isActive, isPageOpened, isSaveAsAllowed, markDirty, menuAboutToShow, modelRegenerated, populateSQLObjects, revert, selectReveal, setEditor, setEditorDescriptor, setFocus, setFocus, setId, setIndex, setPageDescriptor, setPartName, validate, validateAndShowErrors, validateOnline
 
Methods inherited from class org.eclipse.datatools.sqltools.common.ui.helpsystem.HelpSystemEditorPart
getContext, getContextChangeMask, getSearchExpression
 
Methods inherited from class org.eclipse.ui.part.EditorPart
getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setInitializationData
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, getAdapter, getContentDescription, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, removePartPropertyListener, removePropertyListener, setPartProperty, showBusy
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.datatools.sqltools.schemaobjecteditor.ui.ISchemaObjectEditorPage
getDatabaseIdentifier, getEditorDescriptor, getErrorMsg, getPageDescriptor, getPreferencePageIds, isPageOpened, markDirty, menuAboutToShow, modelRegenerated, populateSQLObjects, revert, setEditor, setEditorDescriptor, setFocus, setId, setPageDescriptor, setPartName, validate, validateAndShowErrors, validateOnline
 
Methods inherited from interface org.eclipse.ui.forms.editor.IFormPage
getEditor, getId, getIndex, getManagedForm, getPartControl, initialize, isActive, isEditor, selectReveal, setIndex
 
Methods inherited from interface org.eclipse.ui.IEditorPart
getEditorInput, getEditorSite
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, createPartControl, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setFocus
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.ui.ISaveablePart
doSave, doSaveAs, isDirty, isSaveAsAllowed, isSaveOnCloseNeeded
 
Methods inherited from interface org.eclipse.datatools.sqltools.schemaobjecteditor.ui.IDisablementPart
enable
 

Field Detail

PAGE_ID

public static final java.lang.String PAGE_ID
See Also:
Constant Field Values
Constructor Detail

SourcePage

public SourcePage()

SourcePage

public SourcePage(org.eclipse.ui.forms.editor.FormEditor editor,
                  java.lang.String id,
                  java.lang.String title)

SourcePage

public SourcePage(java.lang.String id,
                  java.lang.String title)
Method Detail

getNestedEditor

public org.eclipse.ui.IEditorPart getNestedEditor()
Description copied from class: NestedEditorPage
Subclass should implement this method to reutrn the editor part in this page

Specified by:
getNestedEditor in class NestedEditorPage
Returns:

getNestedEditorInput

public org.eclipse.ui.IEditorInput getNestedEditorInput()
Description copied from class: NestedEditorPage
Subclass should implement this method to reutrn the editor input for the nested editor

Specified by:
getNestedEditorInput in class NestedEditorPage
Returns:

init

public void init(org.eclipse.ui.IEditorSite site,
                 org.eclipse.ui.IEditorInput input)
          throws org.eclipse.ui.PartInitException
Description copied from class: SchemaObjectEditorPage
Initializes the form page.

Specified by:
init in interface org.eclipse.ui.IEditorPart
Overrides:
init in class NestedEditorPage
Throws:
org.eclipse.ui.PartInitException
See Also:
IEditorPart.init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)

dispose

public void dispose()
Description copied from class: SchemaObjectEditorPage
Disposes the managed form.

Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
Overrides:
dispose in class SchemaObjectEditorPage

setActive

public void setActive(boolean active)
Description copied from class: SchemaObjectEditorPage
Implements the required method by refreshing the form when set active. Subclasses must call super when overriding this method.

Specified by:
setActive in interface org.eclipse.ui.forms.editor.IFormPage
Overrides:
setActive in class SchemaObjectEditorPage

aboutToLeave

public void aboutToLeave()
Description copied from class: NestedEditorPage
Notifies this page that a page switch event has occurred. This is to workaround the problem that in FormEditor's pageChange implementation, setActive(true) is called before setActive(false).

Overrides:
aboutToLeave in class NestedEditorPage

canLeaveThePage

public boolean canLeaveThePage()
Description copied from class: SchemaObjectEditorPage
By default, editor will be allowed to flip the page.

Specified by:
canLeaveThePage in interface org.eclipse.ui.forms.editor.IFormPage
Overrides:
canLeaveThePage in class SchemaObjectEditorPage
Returns:
true

aboutToSave

public boolean aboutToSave(org.eclipse.core.runtime.IProgressMonitor monitor)
Description copied from interface: ISchemaObjectEditorPage
Notifies this page that the editor is about to save, subclass should update the model if necessary

Specified by:
aboutToSave in interface ISchemaObjectEditorPage
Overrides:
aboutToSave in class SchemaObjectEditorPage

refresh

public void refresh()
Description copied from class: SchemaObjectEditorPage
Sub class should override this method to refresh the page according to the model and if this page is not opened, should not refresh it

Specified by:
refresh in interface ISchemaObjectEditorPage
Overrides:
refresh in class SchemaObjectEditorPage