|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
org.eclipse.datatools.sqltools.common.ui.helpsystem.HelpSystemEditorPart
org.eclipse.datatools.sqltools.schemaobjecteditor.ui.core.SchemaObjectEditorPage
public class SchemaObjectEditorPage
Copied from FormPage since some fields are private and can not be set. To add a page to an editor, the
consumer need to extend this class to create the controls in the page.
| Nested Class Summary | |
|---|---|
static class |
SchemaObjectEditorPage.PageForm
|
| Field Summary |
|---|
| 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 | |
|---|---|
SchemaObjectEditorPage()
|
|
SchemaObjectEditorPage(org.eclipse.ui.forms.editor.FormEditor editor,
java.lang.String id,
java.lang.String title)
A constructor that creates the page and initializes it with the editor. |
|
SchemaObjectEditorPage(java.lang.String id,
java.lang.String title)
The constructor. |
|
| Method Summary | |
|---|---|
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 |
createPartControl(org.eclipse.swt.widgets.Composite parent)
Creates the part control by creating the managed form using the parent editor's toolkit. |
void |
dispose()
Disposes the managed form. |
void |
doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
|
void |
doSaveAs()
|
void |
enable(boolean enabled)
|
org.eclipse.datatools.sqltools.core.DatabaseIdentifier |
getDatabaseIdentifier()
Returns the database identifier |
org.eclipse.ui.forms.editor.FormEditor |
getEditor()
Returns the parent editor. |
IEditorDescriptor |
getEditorDescriptor()
Returns an instance of IEditorDescriptor which is used to describe some static information of the
scheme object editor in which this page is contained |
java.lang.String |
getErrorMsg()
Returns the error message in this page which prevent to flip to other pages |
java.lang.String |
getId()
Returns the unique identifier that can be used to reference this page. |
int |
getIndex()
Returns the saved page index. |
org.eclipse.ui.forms.IManagedForm |
getManagedForm()
Returns the managed form owned by this page. |
IEditorPageDescriptor |
getPageDescriptor()
Returns an instance of IEditorPageDescriptor which is used to describe some static information of
this page |
org.eclipse.swt.widgets.Control |
getPartControl()
Returns the form page control. |
java.lang.String[] |
getPreferencePageIds()
Returns the preference pages ids related to this editor page. The returns preference pages will be displayed if user click "Preferences..." in the editor page's context menu |
org.eclipse.swt.graphics.Image |
getTitleImage()
Returns null- form page has no title image. |
void |
init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput input)
Initializes the form page. |
void |
initialize(org.eclipse.ui.forms.editor.FormEditor editor)
Primes the form page with the parent editor instance. |
boolean |
isActive()
Tests if the page is active by asking the parent editor if this page is the currently active page. |
boolean |
isDirty()
Implemented by testing if the managed form is dirty. |
boolean |
isEditor()
Form pages are not editors. |
boolean |
isPageOpened()
Checks if the page is opened (Controls are created) |
boolean |
isSaveAsAllowed()
|
void |
markDirty()
Mark the dirty status |
void |
menuAboutToShow(org.eclipse.jface.action.IMenuManager manager)
Adds menu items for this page |
void |
modelRegenerated()
Do something when the model is re-generated, for example, after successfully saving the dirty editor, the edit model will be re-cloned from the refreshed database model, in this case, page should be refreshed to keep it synchronized with database |
void |
populateSQLObjects(org.eclipse.swt.events.TypedEvent event)
Sub class should override this method to populate the SQL objects belong to this 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 |
revert()
Revert this page to the original model |
boolean |
selectReveal(java.lang.Object object)
Attempts to select and reveal the given object by passing the request to the managed form. |
void |
setActive(boolean active)
Implements the required method by refreshing the form when set active. |
void |
setEditor(org.eclipse.ui.forms.editor.FormEditor editor)
Sets the editor in which this paged is contained, this will be called after the schema object is opened. |
void |
setEditorDescriptor(IEditorDescriptor editor)
Sets the editor descriptor for this page |
void |
setFocus()
Sets the focus by delegating to the managed form. |
void |
setFocus(int itemType,
java.lang.Object item)
The default implementation sets the current page active |
void |
setId(java.lang.String id)
Sets the id for this page |
void |
setIndex(int index)
Preserves the page index. |
void |
setPageDescriptor(IEditorPageDescriptor page)
Sets the page descriptor for this page |
void |
setPartName(java.lang.String title)
Sets the title for this page |
IErrorItem[] |
validate(org.eclipse.swt.events.TypedEvent event)
The default implementation of this method validate all the objects belong to this page and return the error items |
void |
validateAndShowErrors(org.eclipse.swt.events.TypedEvent event)
Validates this page and show errors accordingly |
IErrorItem[] |
validateOnline(org.eclipse.swt.events.TypedEvent event)
Online check if the page is valid |
| 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.ui.IEditorPart |
|---|
getEditorInput, getEditorSite |
| Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
|---|
addPropertyListener, getSite, getTitle, getTitleToolTip, removePropertyListener |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Methods inherited from interface org.eclipse.ui.ISaveablePart |
|---|
isSaveOnCloseNeeded |
| Constructor Detail |
|---|
public SchemaObjectEditorPage()
public SchemaObjectEditorPage(org.eclipse.ui.forms.editor.FormEditor editor,
java.lang.String id,
java.lang.String title)
editor - the parent editorid - the unique identifiertitle - the page title
public SchemaObjectEditorPage(java.lang.String id,
java.lang.String title)
initialize method if this constructor is
used.
id - a unique page identifiertitle - a user-friendly page title| Method Detail |
|---|
public void init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput input)
throws org.eclipse.ui.PartInitException
init in interface org.eclipse.ui.IEditorPartinit in class HelpSystemEditorPartorg.eclipse.ui.PartInitExceptionIEditorPart.init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)public void initialize(org.eclipse.ui.forms.editor.FormEditor editor)
initialize in interface org.eclipse.ui.forms.editor.IFormPageeditor - the parent editorpublic org.eclipse.ui.forms.editor.FormEditor getEditor()
getEditor in interface org.eclipse.ui.forms.editor.IFormPagepublic org.eclipse.ui.forms.IManagedForm getManagedForm()
getManagedForm in interface org.eclipse.ui.forms.editor.IFormPagepublic void setActive(boolean active)
setActive in interface org.eclipse.ui.forms.editor.IFormPagepublic boolean isActive()
isActive in interface org.eclipse.ui.forms.editor.IFormPagetrue if the page is currently active, false otherwise.public void createPartControl(org.eclipse.swt.widgets.Composite parent)
createFormContent(IManagedForm) to populate the form with content.
createPartControl in interface org.eclipse.ui.IWorkbenchPartcreatePartControl in class HelpSystemEditorPartparent - the page parent compositepublic org.eclipse.swt.widgets.Control getPartControl()
getPartControl in interface org.eclipse.ui.forms.editor.IFormPagepublic void dispose()
dispose in interface org.eclipse.ui.IWorkbenchPartdispose in class org.eclipse.ui.part.WorkbenchPartpublic java.lang.String getId()
getId in interface org.eclipse.ui.forms.editor.IFormPagepublic org.eclipse.swt.graphics.Image getTitleImage()
null- form page has no title image. Subclasses may override.
getTitleImage in interface org.eclipse.ui.IWorkbenchPartgetTitleImage in class org.eclipse.ui.part.WorkbenchPartnullpublic void setFocus()
setFocus in interface org.eclipse.ui.IWorkbenchPartsetFocus in class HelpSystemEditorPartpublic void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
doSave in interface org.eclipse.ui.ISaveablePartdoSave in class HelpSystemEditorPartISaveablePart.doSave(org.eclipse.core.runtime.IProgressMonitor)public void doSaveAs()
doSaveAs in interface org.eclipse.ui.ISaveablePartdoSaveAs in class HelpSystemEditorPartISaveablePart.doSaveAs()public boolean isSaveAsAllowed()
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePartisSaveAsAllowed in class HelpSystemEditorPartISaveablePart.isSaveAsAllowed()public boolean isDirty()
isDirty in interface org.eclipse.ui.ISaveablePartisDirty in class HelpSystemEditorParttrue if the managed form is dirty, false otherwise.ISaveablePart.isDirty()public void setIndex(int index)
setIndex in interface org.eclipse.ui.forms.editor.IFormPageindex - the assigned page indexpublic int getIndex()
getIndex in interface org.eclipse.ui.forms.editor.IFormPagepublic boolean isEditor()
isEditor in interface org.eclipse.ui.forms.editor.IFormPagefalsepublic boolean selectReveal(java.lang.Object object)
selectReveal in interface org.eclipse.ui.forms.editor.IFormPageobject - the object to select and reveal in the page if possible.
true if the page has been successfully selected and revealed by one of the managed form
parts, false otherwise.public boolean canLeaveThePage()
canLeaveThePage in interface org.eclipse.ui.forms.editor.IFormPagetruepublic void setEditor(org.eclipse.ui.forms.editor.FormEditor editor)
ISchemaObjectEditorPageSchemaObjectPage should not override this method
setEditor in interface ISchemaObjectEditorPagepublic void setId(java.lang.String id)
ISchemaObjectEditorPage
setId in interface ISchemaObjectEditorPagepublic void setPartName(java.lang.String title)
ISchemaObjectEditorPage
setPartName in interface ISchemaObjectEditorPagesetPartName in class org.eclipse.ui.part.EditorPartpublic java.lang.String getErrorMsg()
ISchemaObjectEditorPage
getErrorMsg in interface ISchemaObjectEditorPagepublic IEditorDescriptor getEditorDescriptor()
ISchemaObjectEditorPageIEditorDescriptor which is used to describe some static information of the
scheme object editor in which this page is contained
getEditorDescriptor in interface ISchemaObjectEditorPagepublic IEditorPageDescriptor getPageDescriptor()
ISchemaObjectEditorPageIEditorPageDescriptor which is used to describe some static information of
this page
getPageDescriptor in interface ISchemaObjectEditorPagepublic void setEditorDescriptor(IEditorDescriptor editor)
ISchemaObjectEditorPage
setEditorDescriptor in interface ISchemaObjectEditorPagepublic void setPageDescriptor(IEditorPageDescriptor page)
ISchemaObjectEditorPage
setPageDescriptor in interface ISchemaObjectEditorPagepublic void refresh()
refresh in interface ISchemaObjectEditorPagepublic void revert()
ISchemaObjectEditorPage
revert in interface ISchemaObjectEditorPagepublic org.eclipse.datatools.sqltools.core.DatabaseIdentifier getDatabaseIdentifier()
getDatabaseIdentifier in interface ISchemaObjectEditorPagepublic void markDirty()
markDirty in interface ISchemaObjectEditorPagepublic IErrorItem[] validate(org.eclipse.swt.events.TypedEvent event)
validate in interface ISchemaObjectEditorPageevent -
nullpublic void populateSQLObjects(org.eclipse.swt.events.TypedEvent event)
populateSQLObjects in interface ISchemaObjectEditorPageevent - public void validateAndShowErrors(org.eclipse.swt.events.TypedEvent event)
validateAndShowErrors in interface ISchemaObjectEditorPageevent - public boolean isPageOpened()
ISchemaObjectEditorPage
isPageOpened in interface ISchemaObjectEditorPagepublic void modelRegenerated()
ISchemaObjectEditorPage
modelRegenerated in interface ISchemaObjectEditorPagepublic boolean aboutToSave(org.eclipse.core.runtime.IProgressMonitor monitor)
ISchemaObjectEditorPage
aboutToSave in interface ISchemaObjectEditorPagepublic IErrorItem[] validateOnline(org.eclipse.swt.events.TypedEvent event)
ISchemaObjectEditorPage
validateOnline in interface ISchemaObjectEditorPagenullpublic void menuAboutToShow(org.eclipse.jface.action.IMenuManager manager)
ISchemaObjectEditorPage
menuAboutToShow in interface ISchemaObjectEditorPagepublic java.lang.String[] getPreferencePageIds()
ISchemaObjectEditorPage
getPreferencePageIds in interface ISchemaObjectEditorPage
public void setFocus(int itemType,
java.lang.Object item)
setFocus in interface ISchemaObjectEditorPageitemType - the type of the item, each page can define its own typesitem - the object of the type, it can be null if the item type provides enough informationpublic void enable(boolean enabled)
enable in interface IDisablementPart
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||