org.eclipse.datatools.sqltools.schemaobjecteditor.ui.internal.core
Class EditorDescriptor

java.lang.Object
  extended by org.eclipse.datatools.sqltools.schemaobjecteditor.ui.internal.core.EditorDescriptor
All Implemented Interfaces:
IEditorDescriptor

public class EditorDescriptor
extends java.lang.Object
implements IEditorDescriptor

An instance of this class stands for a specific schema object editor, which contains some static information of this editor: name, icon, pages, etc.

Author:
Idull

Constructor Summary
EditorDescriptor(java.lang.String id, java.lang.String name, java.lang.String dbName, java.lang.String dbVersion, java.lang.String type, org.eclipse.swt.graphics.Image icon, boolean genPreference)
           
EditorDescriptor(java.lang.String id, java.lang.String name, java.lang.String dbName, java.lang.String dbVersion, java.lang.String type, org.eclipse.swt.graphics.Image icon, boolean genPreference, IEditorPageDescriptor[] _pages, ISchemaObjectEditorHandler configuration, ISchemaObjectEditorActionBarContributor contributor, org.eclipse.core.runtime.IConfigurationElement configElement, org.eclipse.core.runtime.IConfigurationElement contributorElement)
           
 
Method Summary
 ISchemaObjectEditorActionBarContributor getActionContributor()
          Returns the action bar contributor, can be null
 java.util.Map getDefaultPagesOrder()
          Returns the default order of the pages.
 IEditorPageDescriptor[] getDefaultSortedPages()
          Returns the pages of this editor with default order
 java.lang.String getEditorId()
          Returns the editor id
 java.lang.String getEditorName()
          Returns the editor name
 ISchemaObjectEditorHandler getHandler()
          Returns the handler for this editor
 org.eclipse.swt.graphics.Image getIcon()
          Returns the icon for this editor, can be null
 IEditorPageDescriptor getMandatoryFirstPage()
          Returns the page which is specified as the first page when it's visible
 IEditorPageDescriptor getMandatoryLastPage()
          Returns the page which is specified as the last page when it's visible
 java.lang.String getObjectTypeName()
          Returns the object type name
 IEditorPageDescriptor[] getPageDescriptors()
          Returns the pages list of this editor
 java.lang.String getPluginId()
          Returns the plugin id which this editors belongs to
 java.lang.String getSchemaObjectType()
          Returns the db object type id for which this editor is defined
 IEditorPageDescriptor[] getSortedPages()
          Returns the pages of this editor with the order set by end-user
 java.lang.String getVendorName()
          Returns the vendor name
 java.lang.String getVersion()
          Returns the product version for which this editor is defined
 IEditorPageDescriptor[] getVisibleSortedPages()
          Returns the visible pages of this editor with the order set by end-user
 IEditorPageDescriptor[] getVisibleSortedPagesDefault()
          Returns the visible pages of this editor with default order
 boolean isVisibilityConfigurable()
          Checks if the visibility of pages of this editor can be set by end user
 void setActionContributor(ISchemaObjectEditorActionBarContributor contributor)
          Sets the action bar contributor, should NOT called by consumer
 void setConfigElement(org.eclipse.core.runtime.IConfigurationElement element)
           
 void setContributorElement(org.eclipse.core.runtime.IConfigurationElement element)
           
 void setHandler(ISchemaObjectEditorHandler handler)
          Sets the handler, should NOT called by consumer
 void setMandatoryFirstPage(IEditorPageDescriptor mandatoryFirstPage)
           
 void setMandatoryLastPage(IEditorPageDescriptor mandatoryLastPage)
           
 void setObjectTypeName(java.lang.String objTypeName)
           
 void setPageDescriptors(IEditorPageDescriptor[] pages)
          Sets the pages of this editor, should NOT called by consumer
 void setPluginId(java.lang.String pluginId)
          Sets the plugin id
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorDescriptor

public EditorDescriptor(java.lang.String id,
                        java.lang.String name,
                        java.lang.String dbName,
                        java.lang.String dbVersion,
                        java.lang.String type,
                        org.eclipse.swt.graphics.Image icon,
                        boolean genPreference)

EditorDescriptor

public EditorDescriptor(java.lang.String id,
                        java.lang.String name,
                        java.lang.String dbName,
                        java.lang.String dbVersion,
                        java.lang.String type,
                        org.eclipse.swt.graphics.Image icon,
                        boolean genPreference,
                        IEditorPageDescriptor[] _pages,
                        ISchemaObjectEditorHandler configuration,
                        ISchemaObjectEditorActionBarContributor contributor,
                        org.eclipse.core.runtime.IConfigurationElement configElement,
                        org.eclipse.core.runtime.IConfigurationElement contributorElement)
Method Detail

getActionContributor

public ISchemaObjectEditorActionBarContributor getActionContributor()
Description copied from interface: IEditorDescriptor
Returns the action bar contributor, can be null

Specified by:
getActionContributor in interface IEditorDescriptor
Returns:

getDefaultPagesOrder

public java.util.Map getDefaultPagesOrder()
Description copied from interface: IEditorDescriptor
Returns the default order of the pages. ATTN: The contents of the map may be removed outside of this class

Specified by:
getDefaultPagesOrder in interface IEditorDescriptor
Returns:

getDefaultSortedPages

public IEditorPageDescriptor[] getDefaultSortedPages()
Description copied from interface: IEditorDescriptor
Returns the pages of this editor with default order

Specified by:
getDefaultSortedPages in interface IEditorDescriptor
Returns:

getEditorId

public java.lang.String getEditorId()
Description copied from interface: IEditorDescriptor
Returns the editor id

Specified by:
getEditorId in interface IEditorDescriptor
Returns:

getEditorName

public java.lang.String getEditorName()
Description copied from interface: IEditorDescriptor
Returns the editor name

Specified by:
getEditorName in interface IEditorDescriptor
Returns:

getHandler

public ISchemaObjectEditorHandler getHandler()
Description copied from interface: IEditorDescriptor
Returns the handler for this editor

Specified by:
getHandler in interface IEditorDescriptor
Returns:

getIcon

public org.eclipse.swt.graphics.Image getIcon()
Description copied from interface: IEditorDescriptor
Returns the icon for this editor, can be null

Specified by:
getIcon in interface IEditorDescriptor
Returns:

getMandatoryFirstPage

public IEditorPageDescriptor getMandatoryFirstPage()
Description copied from interface: IEditorDescriptor
Returns the page which is specified as the first page when it's visible

Specified by:
getMandatoryFirstPage in interface IEditorDescriptor
Returns:
the first page

getMandatoryLastPage

public IEditorPageDescriptor getMandatoryLastPage()
Description copied from interface: IEditorDescriptor
Returns the page which is specified as the last page when it's visible

Specified by:
getMandatoryLastPage in interface IEditorDescriptor
Returns:
the last page

getPageDescriptors

public IEditorPageDescriptor[] getPageDescriptors()
Description copied from interface: IEditorDescriptor
Returns the pages list of this editor

Specified by:
getPageDescriptors in interface IEditorDescriptor
Returns:

getSchemaObjectType

public java.lang.String getSchemaObjectType()
Description copied from interface: IEditorDescriptor
Returns the db object type id for which this editor is defined

Specified by:
getSchemaObjectType in interface IEditorDescriptor
Returns:

getSortedPages

public IEditorPageDescriptor[] getSortedPages()
Description copied from interface: IEditorDescriptor
Returns the pages of this editor with the order set by end-user

Specified by:
getSortedPages in interface IEditorDescriptor
Returns:

getVendorName

public java.lang.String getVendorName()
Description copied from interface: IEditorDescriptor
Returns the vendor name

Specified by:
getVendorName in interface IEditorDescriptor
Returns:

getVersion

public java.lang.String getVersion()
Description copied from interface: IEditorDescriptor
Returns the product version for which this editor is defined

Specified by:
getVersion in interface IEditorDescriptor
Returns:

getVisibleSortedPages

public IEditorPageDescriptor[] getVisibleSortedPages()
Description copied from interface: IEditorDescriptor
Returns the visible pages of this editor with the order set by end-user

Specified by:
getVisibleSortedPages in interface IEditorDescriptor
Returns:

getVisibleSortedPagesDefault

public IEditorPageDescriptor[] getVisibleSortedPagesDefault()
Description copied from interface: IEditorDescriptor
Returns the visible pages of this editor with default order

Specified by:
getVisibleSortedPagesDefault in interface IEditorDescriptor
Returns:

isVisibilityConfigurable

public boolean isVisibilityConfigurable()
Description copied from interface: IEditorDescriptor
Checks if the visibility of pages of this editor can be set by end user

Specified by:
isVisibilityConfigurable in interface IEditorDescriptor
Returns:

setActionContributor

public void setActionContributor(ISchemaObjectEditorActionBarContributor contributor)
Description copied from interface: IEditorDescriptor
Sets the action bar contributor, should NOT called by consumer

Specified by:
setActionContributor in interface IEditorDescriptor

setConfigElement

public void setConfigElement(org.eclipse.core.runtime.IConfigurationElement element)

setContributorElement

public void setContributorElement(org.eclipse.core.runtime.IConfigurationElement element)

setHandler

public void setHandler(ISchemaObjectEditorHandler handler)
Description copied from interface: IEditorDescriptor
Sets the handler, should NOT called by consumer

Specified by:
setHandler in interface IEditorDescriptor

setMandatoryFirstPage

public void setMandatoryFirstPage(IEditorPageDescriptor mandatoryFirstPage)
Specified by:
setMandatoryFirstPage in interface IEditorDescriptor

setMandatoryLastPage

public void setMandatoryLastPage(IEditorPageDescriptor mandatoryLastPage)
Specified by:
setMandatoryLastPage in interface IEditorDescriptor

setPageDescriptors

public void setPageDescriptors(IEditorPageDescriptor[] pages)
Description copied from interface: IEditorDescriptor
Sets the pages of this editor, should NOT called by consumer

Specified by:
setPageDescriptors in interface IEditorDescriptor

getObjectTypeName

public java.lang.String getObjectTypeName()
Description copied from interface: IEditorDescriptor
Returns the object type name

Specified by:
getObjectTypeName in interface IEditorDescriptor
Returns:

setObjectTypeName

public void setObjectTypeName(java.lang.String objTypeName)
Specified by:
setObjectTypeName in interface IEditorDescriptor

getPluginId

public java.lang.String getPluginId()
Description copied from interface: IEditorDescriptor
Returns the plugin id which this editors belongs to

Specified by:
getPluginId in interface IEditorDescriptor
Returns:

setPluginId

public void setPluginId(java.lang.String pluginId)
Description copied from interface: IEditorDescriptor
Sets the plugin id

Specified by:
setPluginId in interface IEditorDescriptor