com.ibm.designer.domino.ide.resources.metamodel
Class IDesignElementExtension

java.lang.Object
  extended by com.ibm.designer.domino.ide.resources.metamodel.IDesignElementExtension
All Implemented Interfaces:
com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc, org.eclipse.core.runtime.IExecutableExtension

public abstract class IDesignElementExtension
extends java.lang.Object
implements org.eclipse.core.runtime.IExecutableExtension, com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc

Class for design element implementors to extend to describe the behaviors of a design element and to provide the strings and images that Designer needs to display the element. A class that extends this class should be referenced in the design element extension definition. It extends the IDesignElementExtensionDesc interface, leaving abstract only those methods that a design element implementation must supply, and providing default implementations of the rest.


Field Summary
 
Fields inherited from interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
CODE_CATEGORY, COMPAPP_CATEGORY, DATA_CATEGORY, DD_PERSPECTIVE, FORMVIEW_PERSPECTIVE, RESOURCES_CATEGORY, SHARED_ELEMENTS_CATEGORY, XPAGES_PERSPECTIVE
 
Constructor Summary
IDesignElementExtension()
           
 
Method Summary
 java.lang.String getDefaultContent()
          If your design element needs to contain initial content, return that content in this method.
 java.lang.String getDesignElementID()
          A unique string ID to identify this design element.
abstract  java.lang.String getElementNameWithAccelerator()
          Provides Designer with the name of the design element, containing an accelerator, for use in the View/GoTo menu, as well as in the submenus of Design/Create and context menu New menus.
 java.lang.String getFileExtension()
          A convenience method.
 java.lang.String getFileName()
          for future use to support single instance design elements (not yet supported)
abstract  org.eclipse.swt.graphics.Image getImage(java.lang.String imageName)
          Given the name of an image, creates an Image object for it to help Domino Designer render the image.
abstract  org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String imageName)
          Given the name of an image, creates an ImageDescriptor object for it to help Domino Designer render the image.
abstract  java.lang.String getLargeIcon()
          Returns the name for the large icon (the size used for the design element category in the Applications Navigator)
abstract  java.lang.String getNewActionButtonImage()
          Provides Designer with the name of the image to ask for to use as the image on the New button that is on the top of the design list for this design element.
abstract  java.lang.String getNewActionButtonLabel()
          Provides Designer with the string to use on the New element button on the top of the list of design elements for this type of design element.
abstract  java.lang.String getNewActionButtonTooltip()
          Provides Designer with the string to use as a tooltip on the New element button on the top of the list of design elements for this type of design element.
abstract  java.lang.String getNewDialogImageName()
          Provides Designer with the imagename it should use when asking for the image for the "New" dialog for your design element.
abstract  java.lang.String getNewDialogMessage()
          Provides Designer with the descriptive message it should place in the white space under the title bar of the New dialog for your design element
abstract  java.lang.String getNewDialogTitle()
          Provides Designer with the title it should place in the title bar of the New dialog for your design element
abstract  java.lang.String getNewMenuStringWithAccelerator()
          Provides Designer with the menu string name of the design element, containing an accelerator, for use at the top of the context menu that is available when a user right clicks on the design element category in the Applications Navigator.
abstract  java.lang.String getSmallIcon()
          Returns the name for the small icon (used for individual child nodes in the Applications Navigator)
 java.lang.String[] getSupportedPerspectives()
          Tells Designer which perspectives should display this element.
abstract  java.lang.String getTopContextNewMenuString()
          Provides Designer with the menu string name of the design element, containing an accelerator, for use at the top of the context menu that is available when a user right clicks on the design element category in the Applications Navigator.
 boolean isSingleFileElement()
          for future use to support single instance design elements (not yet supported) Our default implementation in IDesignElementExtension returns false for this, and need not be overridden.
 boolean isWebServerServable()
          Tells Designer whether or not this design element should be served up by URL from the web server.
 void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config, java.lang.String prop, java.lang.Object data)
           
 boolean showFileExtension()
          Indicates whether Domino Designer should show the file extension for individual design elements in the Applications Navigator and in the design list.
 boolean supportsAlias()
          Tells Designer whether or not this design element supports aliases.
 boolean supportsHideNotesWeb()
          Tells Designer whether or not this design element supports the hide from Notes/Web properties.
 boolean supportsMultilingual()
          Tells Designer whether or not this design element supports multilingual variants of itself.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IDesignElementExtension

public IDesignElementExtension()
Method Detail

getLargeIcon

public abstract java.lang.String getLargeIcon()
Returns the name for the large icon (the size used for the design element category in the Applications Navigator)

Specified by:
getLargeIcon in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
the name for the large icon

getSmallIcon

public abstract java.lang.String getSmallIcon()
Returns the name for the small icon (used for individual child nodes in the Applications Navigator)

Specified by:
getSmallIcon in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
the name for the small icon

getNewDialogTitle

public abstract java.lang.String getNewDialogTitle()
Provides Designer with the title it should place in the title bar of the New dialog for your design element

Specified by:
getNewDialogTitle in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
the string with the New dialog title

getNewDialogMessage

public abstract java.lang.String getNewDialogMessage()
Provides Designer with the descriptive message it should place in the white space under the title bar of the New dialog for your design element

Specified by:
getNewDialogMessage in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
the string with the New dialog title

getNewDialogImageName

public abstract java.lang.String getNewDialogImageName()
Provides Designer with the imagename it should use when asking for the image for the "New" dialog for your design element.

Specified by:
getNewDialogImageName in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
the name of the image for the new dialog

getElementNameWithAccelerator

public abstract java.lang.String getElementNameWithAccelerator()
Provides Designer with the name of the design element, containing an accelerator, for use in the View/GoTo menu, as well as in the submenus of Design/Create and context menu New menus. For example, for a design element called "MyElement" you could return a value of "My&Element"

Specified by:
getElementNameWithAccelerator in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
a String with the name of the design element, also including an accelerator

getTopContextNewMenuString

public abstract java.lang.String getTopContextNewMenuString()
Provides Designer with the menu string name of the design element, containing an accelerator, for use at the top of the context menu that is available when a user right clicks on the design element category in the Applications Navigator. This menu item in Designer is always followed by ellipses, so the value should end in "...". For example, for a design element called "MyElement" you could return a value of "New My&Element..."

Specified by:
getTopContextNewMenuString in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
a String with the name of the design element preceded by "New ", ending in ellipses, and including an accelerator

getNewMenuStringWithAccelerator

public abstract java.lang.String getNewMenuStringWithAccelerator()
Provides Designer with the menu string name of the design element, containing an accelerator, for use at the top of the context menu that is available when a user right clicks on the design element category in the Applications Navigator. This menu item in Designer is always followed by ellipses, so the value should end in "...". For example, for a design element called "MyElement" you could return a value of "New My&Element..."

Specified by:
getNewMenuStringWithAccelerator in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
a String with the name of the design element preceded by "New ", also including an accelerator

getNewActionButtonLabel

public abstract java.lang.String getNewActionButtonLabel()
Provides Designer with the string to use on the New element button on the top of the list of design elements for this type of design element. Should include an accelerator. For example, for a design element named "MyElement" you would return a value of "New My&Element"

Specified by:
getNewActionButtonLabel in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
a String with the name of the design element, preceded by "New ", also including an accelerator

getNewActionButtonTooltip

public abstract java.lang.String getNewActionButtonTooltip()
Provides Designer with the string to use as a tooltip on the New element button on the top of the list of design elements for this type of design element. For example, for a design element called "MyElement", you could return a value of "This will create the most awesome design element in the universe."

Specified by:
getNewActionButtonTooltip in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
the tooltip value

getNewActionButtonImage

public abstract java.lang.String getNewActionButtonImage()
Provides Designer with the name of the image to ask for to use as the image on the New button that is on the top of the design list for this design element.

Specified by:
getNewActionButtonImage in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
the name of the image to use

getImageDescriptor

public abstract org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String imageName)
Given the name of an image, creates an ImageDescriptor object for it to help Domino Designer render the image. The extending plugin is responsible for the image lifecycle, and you may well want to cache a single ImageDescriptor.

Specified by:
getImageDescriptor in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Parameters:
imageName - the name of the image that Designer needs
Returns:
an ImageDescriptor object for the requested image name

getImage

public abstract org.eclipse.swt.graphics.Image getImage(java.lang.String imageName)
Given the name of an image, creates an Image object for it to help Domino Designer render the image. The extending plugin is responsible for the image lifecycle, and you may well want to cache a single image or use an ImageRegistry.

Specified by:
getImage in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Parameters:
imageName - the name of the image that Designer needs
Returns:
an Image object for the requested image name

setInitializationData

public void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config,
                                  java.lang.String prop,
                                  java.lang.Object data)
                           throws org.eclipse.core.runtime.CoreException
Specified by:
setInitializationData in interface org.eclipse.core.runtime.IExecutableExtension
Throws:
org.eclipse.core.runtime.CoreException

getDesignElementID

public java.lang.String getDesignElementID()
A unique string ID to identify this design element. For example, "designElement.MyElement" Our default implementation in IDesignElementExtension returns the value provided in the extension definition in your plugin.xml. If you extend IDesignElementExtension, you do not need to implement this method.

Specified by:
getDesignElementID in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
a unique ID

getFileExtension

public java.lang.String getFileExtension()
A convenience method. Our default implementation returns the extension value provided in your plugin's extension definition. If you extend IDesignElementExtension, you do not need to implement this method.

Specified by:
getFileExtension in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
the unique file extension that distinguishes this design element.

showFileExtension

public boolean showFileExtension()
Indicates whether Domino Designer should show the file extension for individual design elements in the Applications Navigator and in the design list.

Specified by:
showFileExtension in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
whether or not to display the file extension

getFileName

public java.lang.String getFileName()
for future use to support single instance design elements (not yet supported)

Specified by:
getFileName in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
a string for a single instance design element

supportsAlias

public boolean supportsAlias()
Tells Designer whether or not this design element supports aliases. The default implementation for this in IDesignElementExtension returns false, and you need only implement this method if you want to allow the user to provide an alias.

Specified by:
supportsAlias in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
a boolean indicator of whether or not aliases are supported

supportsMultilingual

public boolean supportsMultilingual()
Tells Designer whether or not this design element supports multilingual variants of itself. The default implementation for this in IDesignElementExtension returns false, and you need only implement this method if you want to support language variants of your design element.

Specified by:
supportsMultilingual in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
a boolean indicator of whether or not multilingual is supported

supportsHideNotesWeb

public boolean supportsHideNotesWeb()
Tells Designer whether or not this design element supports the hide from Notes/Web properties. The default implementation for this in IDesignElementExtension returns false, and you need only implement this method if you want to support hide from Notes/Web.

Specified by:
supportsHideNotesWeb in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
a boolean indicator of whether or not hide from Notes/Web is supported

isWebServerServable

public boolean isWebServerServable()
Tells Designer whether or not this design element should be served up by URL from the web server. The default implementation for this in IDesignElementExtension returns false, and you need only implement this method if you want to allow URL access.

Specified by:
isWebServerServable in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
a boolean indicator of whether or not URL access is supported

getDefaultContent

public java.lang.String getDefaultContent()
If your design element needs to contain initial content, return that content in this method. The default implementation for this in IDesignElementExtension returns null, and you need only implement this method if your element requires initial content.

Specified by:
getDefaultContent in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
string containing the default content

isSingleFileElement

public boolean isSingleFileElement()
for future use to support single instance design elements (not yet supported) Our default implementation in IDesignElementExtension returns false for this, and need not be overridden.

Specified by:
isSingleFileElement in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
a string for a single instance design element

getSupportedPerspectives

public java.lang.String[] getSupportedPerspectives()
Tells Designer which perspectives should display this element. The default implementation in IDesignElementExtension returns the perspective IDs for three perspectives: the Domino Designer perspective, the XPage perspective, and the Forms/Views perspective. If you want to make your design element available in a different set of perspectives, return a string array containing only the perspectives you want (refer to the constants in this file for the perspective IDs).

Specified by:
getSupportedPerspectives in interface com.ibm.designer.prj.resources.commons.IDesignElementExtensionDesc
Returns:
string array containing the allowed perspective ids