## org.eclipse.datatools.sqltools.schemaobjecteditor.ui
Interface ISchemaObjectEditorHandler

All Superinterfaces:
  IResourceChangeHandler

All Known Implementing Classes:
  ASAProceduralObjectEditorHandler, ASATableSchemaEditorHandler, DefaultSchemaObjectEditorHandler, ProceduralObjectEditorHandler

    public interface ISchemaObjectEditorHandler

extends IResourceChangeHandler

Defines the behaviour of the schema object editor, notice that the name of most of the methods defined in this class are the same as those in `SchemaObjectEditor`, the method in `SchemaObjectEditor` will delegate the call to the corresponding method in this class.

Author:
  Idull

Method Summary
`boolean` `checkSchemaObjectExistence(boolean doCheck)` existence check for schema object.
`void` `dispose()` Does something when the editor part is disposing
`void` `doSave(org.eclipse.core.runtime.IProgressMonitor monitor)` Saves the content of the editor part.
`void` `doSaveAs()` Saves the content of the editor part to another file
`void` `forceFocusObject(SQLObject object)` Performs a set focus action in schema editor to the given SQL object. Generally there're two steps: 1.Focus the page;2.Focus the UI component of the given object in that page.
`java.lang.String` `generateScript()` Generates script for the current editor.
`java.lang.Object` `getAdapter(java.lang.Class adapter)` Returns the adapter.
`java.lang.String` `getDisplayName()` Returns the display name of the current edited object (a meaningful name), this will be used for saving purpose.
`SchemaObjectEditorModelListenersNotifier` `getNotifier()` Returns the editor model listeners notifier.
`void` `hookInitialization()` Does some initialization jobs, this will be invoked by the editor after all pages are loaded
`boolean` `inSavingProcess()` Checks if the editor is in saving process, since the saving process may take time
`boolean` `isSaveAsAllowed()` Tests if savesa is allowed for this editor part
`void` `pageChanged(int newPageIndex)` Does something with the editor when the page is changed.
`void` `refreshFromDB(org.eclipse.core.runtime.IProgressMonitor monitor)` Refreshes the model and then refresh the editor
`void` `revert()` Reverts the editor to the original model (no need to refresh the model)
`void` `setEditor(ISchemaObjectEditor editor)` Since the instance of this class will be created using the Eclipse extension API, so that we need to set the editor to the hanlder for it to use

Methods inherited from interface org.eclipse.datatools.sqltools.schemaobjecteditor.ui.IResourceChangeHandler
`resouceChanged`

Method Detail

### dispose

    void dispose()

  Does something when the editor part is disposing

### doSave

    void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)

  Saves the content of the editor part.

  Parameters:
    `monitor` -

### doSaveAs

    void doSaveAs()

  Saves the content of the editor part to another file

### generateScript

    java.lang.String generateScript()

  Generates script for the current editor. This method will be invoked by doSave() to get the script

  Returns:

### getAdapter

    java.lang.Object getAdapter(java.lang.Class adapter)

  Returns the adapter. This will be called when the `super.getAdapter` in `SchemaObjectEditor` returns null.

  Parameters:
    `adapter` -
  Returns:

### isSaveAsAllowed

    boolean isSaveAsAllowed()

  Tests if savesa is allowed for this editor part

  Returns:

### pageChanged

    void pageChanged(int newPageIndex)

  Does something with the editor when the page is changed. This method will be called before all the obsevers of page change event get notified.

  Parameters:
    `newPageIndex` -

### refreshFromDB

    void refreshFromDB(org.eclipse.core.runtime.IProgressMonitor monitor)

  Refreshes the model and then refresh the editor

### revert

    void revert()

  Reverts the editor to the original model (no need to refresh the model)

### setEditor

    void setEditor(ISchemaObjectEditor editor)

  Since the instance of this class will be created using the Eclipse extension API, so that we need to set the editor to the hanlder for it to use

  Parameters:
    `editor` -

### getDisplayName

    java.lang.String getDisplayName()

  Returns the display name of the current edited object (a meaningful name), this will be used for saving purpose. If nothing is returned, the editor part name will be used for saving purpose

  Returns:

### hookInitialization

    void hookInitialization()

  Does some initialization jobs, this will be invoked by the editor after all pages are loaded

### getNotifier

    SchemaObjectEditorModelListenersNotifier getNotifier()

  Returns the editor model listeners notifier. The notifier is registered as the listener of the schema object editor model.

  Returns:

### inSavingProcess

    boolean inSavingProcess()

  Checks if the editor is in saving process, since the saving process may take time

  Returns:
    `true` if the editor is in saving process

### forceFocusObject

    void forceFocusObject(SQLObject object)

  Performs a set focus action in schema editor to the given SQL object.
  Generally there're two steps: 1.Focus the page;2.Focus the UI component of the given object in that page.

  Parameters:
    `object` -

### checkSchemaObjectExistence

    boolean checkSchemaObjectExistence(boolean doCheck)

  existence check for schema object.

  Parameters:
    `doCheck` -
  Returns:
    `true` if object exists or the doCheck is passed with value false.