org.eclipse.datatools.sqltools.schemaObjectEditor
Identifier:
org.eclipse.datatools.sqltools.schemaobjecteditor.schemaObjectEditor
Description:
This extension point is used to enable the consumers to define a new multiple pages based database schema object editor.
Configuration Markup:
<!ELEMENT extension (SchemaObjectEditor* , EditorPage*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT SchemaObjectEditor (EditorPage* , ReferencedPage* , ReferencedEditor? , DefaultPagesOrder?)>
<!ATTLIST SchemaObjectEditor
EditorId CDATA #REQUIRED
EditorName CDATA #REQUIRED
VendorName CDATA #REQUIRED
Version CDATA #IMPLIED
ObjectTypeId CDATA #REQUIRED
Handler CDATA #REQUIRED
VisibilityConfigurable (true | false)
Icon CDATA #IMPLIED
ContributorClass CDATA #IMPLIED
MustBeFirstWhenShown CDATA #IMPLIED
MustBeLastWhenShown CDATA #IMPLIED
ObjectTypeName CDATA #IMPLIED>
A schema editor is used to edit a schema object, such as a table, a stored procedure, a view, etc..
It can contain several pages, it's easy for the consumer to add a page, just add a EditorPage under SchemaObjectEditor node, also, it is the consumer's responsibility to create the content in a page.
The schema object editor framework does not define any model for the consumer, so the consumer need to define the model and implement the subject-obsevers mechanism.
The consumer can define the behaviour of the editor by defining the ConfigurationClass. Also, it can contribute actions via ContributorClass.
- EditorId - The id of the extended editor
- EditorName - The name of an editor, by default, the name of the editor will be displayed as the part name of the editor.
- VendorName - The database vendor name for whom the editor is defined. The vendor name and the version will uniquely identify a database product.
- Version - The database version for which the editor is defined. The vendor name and the version will uniquely identify a database product.
- ObjectTypeId - The object type id for which the editor is defined. The consumer can use any form for this attribute, once it defines the id for a specific object, it need to use this id to open the editor. See SchemaEditorUtils.openEditor()
- Handler - Implement this interface to define the behaviour of the editor.
- VisibilityConfigurable - If need to let the end-user to set the visibility of pages on preference page, select this attribute to true. If it is false for an editor, then all pages will be shown.
- Icon - The icon for this editor, if not specified, will use the default icon defined by the extension point.
- ContributorClass - Use this to contribute new actions.
- MustBeFirstWhenShown - Specify a page which will be always the first page (The end user can not move it down on the page visibility/order preference page). For example, the introduction page of an editor should always be displayed as the first pge.
- MustBeLastWhenShown - Specify a page which will be always the last page (The end user can not move it up on the page visibility/order preference page). For example, the source code page should be always displayed as the last page.
- ObjectTypeName -
<!ELEMENT EditorPage EMPTY>
<!ATTLIST EditorPage
PageId CDATA #REQUIRED
PageName CDATA #REQUIRED
VisibleByDefault (true | false)
Required (true | false)
Class CDATA #REQUIRED
ContextHelpId CDATA #IMPLIED
ObjectClassType CDATA #IMPLIED>
An editor page is contained in a multiple pages editor.
- PageId - The id of this page, it SHOULD be unique for its editor.
- PageName - The name of this page, it SHOULD be unique for its editor.
- VisibleByDefault - Will be selected to be displayed on the preference page by default if this is configured to be true.
- Required - If this attribute is configured to be true, then this page can not be selected to be unvisible on the preference page.
- Class - The form page class.
- ContextHelpId - If a context help id is specified, a small help icon will appear on the top-right corner of this page, if the end user clicks this icon, the related context help page will pop up.
- ObjectClassType -
<!ELEMENT ReferencedPage EMPTY>
<!ATTLIST ReferencedPage
EditorId CDATA #IMPLIED
PageId CDATA #REQUIRED
PageExtensionId CDATA #IMPLIED>
Reference a page defined in other editor. This is to reuse some pages.
- EditorId - The id of the editor in which the page is contained.
- PageId - The id of the referenced page
- PageExtensionId - This attribute is used in the following scenario: An extension point is defined for one page, this page will be common used by many editors, for example introduction page, the consumer need to extend the introduction page to provide their own introduction information in the extension (Declararively not programmtically), thus we need to know which extension the introduction page is using for a specific editor, use this extension id, the BASE introductin page can generate a introduction page properly.
<!ELEMENT Excludes (ExcludePage)*>
When referencing an exsiting editor, all pages in that editor will be added into this editor. To exclude some pages in the referencing editor, using this element.
<!ELEMENT ReferencedEditor (Excludes*)>
<!ATTLIST ReferencedEditor
EditorId CDATA #IMPLIED>
If a referenced editor is specified, all the attributes will be ignored except DatabaseName, DatabaseVersion, ObjectTypeId and the containing pages.
A common usage of referenced editor is: For a higer version database, it may reuse the lower version's editor, but need to add more pages.
ATTN: The refrenced pages/editors in the referenced editor will not be included.
- EditorId - The id of the editor to be referenced.
<!ELEMENT ExcludePage EMPTY>
<!ATTLIST ExcludePage
PageId CDATA #REQUIRED>
The excluded page in the referenced editor
- PageId - The id of the excluded page
<!ELEMENT DefaultPagesOrder (OrderItem)*>
Define the default order of pages which are REQUIRED or visible BY DEFAULT.
<!ELEMENT OrderItem EMPTY>
<!ATTLIST OrderItem
PageId CDATA #IMPLIED
OrderNum CDATA #IMPLIED>
- PageId - The page id
- OrderNum - The order number of the page, the number should be greater than 0, the order number of several pages need not to be continous, for example, if an editor has 3 pages which are REQUIRED or visible BY DEFAULT, the order number can be: 1, 2, 3 respectively, or 1,3,6 etc.