org.eclipse.stp.core.saf.ui.contribution
Interface ISOAPropertiesContribution


public interface ISOAPropertiesContribution

This class allows an editor to display and update an SOA model.

A typical calling sequence is as follows:

Inbetween the calls to:

the following may be called:

  1. ISOAPropertiesContribution.refresh()

    Requires the controls to be updated with the current input

  2. ISOAPropertiesContribution.requiresNewControls()

    Controls may be reused to display objects of compatible types. Calls to this method can be used to determine if the current set of controls are sufficient to display the new object of compatible types. If this method returns false, then the following sequence of calls are made:

    If this method returns true, then the following sequence of calls are made:


Method Summary
 void aboutToBeHidden()
          Notifies the contributor that its controls are about to be hidden.
 void aboutToBeShown()
          Notifies the contributor that its controls are about to be shown.
 void createControls(org.eclipse.swt.widgets.Composite composite, java.lang.Object object)
          Creates the controls for the PropertyPage.
 java.lang.Object createInstance(java.lang.Object container, java.lang.String targetTypeNamespace, java.lang.String targetType)
          Create and initialize an instance of the type.
 void dispose()
          Dispose this property page.
 org.eclipse.swt.graphics.Image getIcon()
          Returns the icon for the type of the contribution.
 java.lang.String getLongDescription(java.lang.Object object)
          Returns a long description of the object
 java.lang.String getShortDescription(java.lang.Object object)
          Returns a short description of the object.
 ITabDescriptor[] getTabDescriptors()
          Return the descriptors for the tabs required by the contribution.
 java.lang.String getTypeName()
          Returns the name for the type.
 void refresh()
          Refresh the contents of the controls displayed in the property pages.
 boolean requiresNewControls(java.lang.Object newObject)
          Returns whether a new set of controls needs to be created to display this new object.
 void setInput(java.lang.Object object, IEditorHandler editorHandler)
          Identifies the selected object whose properties are about to be shown.
 

Method Detail

createControls

public void createControls(org.eclipse.swt.widgets.Composite composite,
                           java.lang.Object object)
Creates the controls for the PropertyPage.

Parameters:
composite - the composite for the property page.
object - object to create controls for. The controls should not be populated with data until a future call to refresh() is made.

requiresNewControls

public boolean requiresNewControls(java.lang.Object newObject)
Returns whether a new set of controls needs to be created to display this new object.

Parameters:
newObject - the object about to be displayed in the controls
Returns:
Returns true if the current set of controls is not sufficient to display this new object and a new set of controls needs to be built. Returns false if the current set of controls can be reused to display the new object.

setInput

public void setInput(java.lang.Object object,
                     IEditorHandler editorHandler)
Identifies the selected object whose properties are about to be shown.

Parameters:
object - the selected model object
editorHandler - object used to report errors to the user and to handle updates to the model

aboutToBeShown

public void aboutToBeShown()
Notifies the contributor that its controls are about to be shown. It is expected that contributors enable domain-related functions in this method, most commonly by adding listeners.

Since the controls are not visible, the contributor should wait for the refresh() before updating the property page controls.


aboutToBeHidden

public void aboutToBeHidden()
Notifies the contributor that its controls are about to be hidden. It is expected that contributors disable domain-related functions in this method, most commonly by removing listeners.


dispose

public void dispose()
Dispose this property page.


refresh

public void refresh()
Refresh the contents of the controls displayed in the property pages.


createInstance

public java.lang.Object createInstance(java.lang.Object container,
                                       java.lang.String targetTypeNamespace,
                                       java.lang.String targetType)
Create and initialize an instance of the type. The type of object to create may be an SCAObject or an object contained within an SCAObject.

Parameters:
container - - object in the SOA model to which the new instance is to be added
targetTypeNamespace - - the namespace of the type of object to create
targetType - - type of object to create
Returns:
a new instance of type targetType

getIcon

public org.eclipse.swt.graphics.Image getIcon()
Returns the icon for the type of the contribution.

Returns:
the icon

getShortDescription

public java.lang.String getShortDescription(java.lang.Object object)
Returns a short description of the object.

Parameters:
object - the object whose short description is to be returned
Returns:
the short description

getLongDescription

public java.lang.String getLongDescription(java.lang.Object object)
Returns a long description of the object

Parameters:
object - the object whose short description is to be returned
Returns:
the long description

getTypeName

public java.lang.String getTypeName()
Returns the name for the type.

Returns:
a string displayed to the user for this type

getTabDescriptors

public ITabDescriptor[] getTabDescriptors()
Return the descriptors for the tabs required by the contribution. This method only applies to Component Implementations, ImportBindings and ExportBindings.

Returns:
the list of tab descriptors