IPropertyViewDriver Interface

com.bea.ide.ui.propertyeditor
IPropertyViewDriver Interface

public interface IPropertyViewDriver

This interface is used by the IDE's property view to display the properties of the currently selected IElement. See IDocumentView for how to set a driver on a view, and how to set the view's selected IElement.

The property heirarchy of an IElement is exposed through the getProperties method. Properties may be organized into multiple levels of grouping. However, note that the top level of the heirarchy is expected to be a list of one or more property groups. Thus nodes at the top level of the heirarchy may not display a value in the property view. After the first level, any node in the heirarchy may have a value, be a container of nested properties, or both.

Additionally, this interface provides instance label, type label, and description information for the IElement itself. The instance label and type label of the Element is displayed in the title bar of the property view. When the title bar is selected, the element's description will appear in the property view description window.

Related Topics

IDocumentView
IElement
IPropertyNode
IProperty


All Known Implementing Classes
DefaultPropertyViewDriver

Nested Class Summary

public static interfaceIPropertyViewDriver.IPropertyViewContext
           Interface to provide access to the view context of the property view.

Field Summary

public static final List
NO_REFRESH_LIST
constant that can be returned by getProperties to tell the view not to refresh.
public static final String
NO_REFRESH_STRING
constant that can be returned by getLabel, getTypeLabel, and getDescription to tell the view not to refresh.
 

Method Summary

public String
getDescription(IElement el)
Description of this type of element.
public IElement
getDisplayElement(IElement activeElement)
Allows the property view driver to display properties for a different element than that which was selected in the document.
public URI[]
getHelpContextList(IElement el)
Returns an array of URIs containing help context identifiers for context-sensitive help.
public URI[]
getHelpContextList(IPropertyNode node)
Returns an array of URIs containing help context identifiers for context-sensitive help.
public String
getLabel(IElement el)
Display name identifying this element instance.
public List
getProperties(IElement el)
Returns a list of IPropertyNodes.
public String
getTypeLabel(IElement el)
Display name identifying this type of element.
public void
setContext(IPropertyViewDriver.IPropertyViewContext context)
Sets the view context for this driver.

Field Detail

NO_REFRESH_LIST

public static final List NO_REFRESH_LIST
constant that can be returned by getProperties to tell the view not to refresh.


NO_REFRESH_STRING

public static final String NO_REFRESH_STRING
constant that can be returned by getLabel, getTypeLabel, and getDescription to tell the view not to refresh.

 

Method Detail

getDescription(IElement) Method

public String getDescription(IElement el)
Description of this type of element.

Parameters

el
IElement.

Returns

String type description.

getDisplayElement(IElement) Method

public IElement getDisplayElement(IElement activeElement)
Allows the property view driver to display properties for a different element than that which was selected in the document.

Parameters

activeElement
the currently selected document element. el may be null in the case where there is no selected element in the document.

Returns

an element whose properties should be displayed rather than the provided element. If no remapping is desired, the element passed in should be returned.

getHelpContextList(IElement) Method

public URI[] getHelpContextList(IElement el)
Returns an array of URIs containing help context identifiers for context-sensitive help. A help context URI is a URN where the namespace identifies the type of thing selected (e.g. javadoc-tag) and the scheme-specific part identifies which item is selected. In the case of the PropertyView, a typical selection would be a "property" that represents a Javadoc tag from a JWS or JCX file. An example of the URN for the @common:operation is urn:javadoc-tag:common/operation.

Related Topics

IHelpDriver


getHelpContextList(IPropertyNode) Method

public URI[] getHelpContextList(IPropertyNode node)
Returns an array of URIs containing help context identifiers for context-sensitive help. A help context URI is a URN where the namespace identifies the type of thing selected (e.g. javadoc-tag) and the scheme-specific part identifies which item is selected. In the case of the PropertyView, a typical selection would be a "property" that represents a Javadoc tag from a JWS or JCX file. An example of the URN for the @common:operation is urn:javadoc-tag:common/operation.

Related Topics

IHelpDriver


getLabel(IElement) Method

public String getLabel(IElement el)
Display name identifying this element instance. Note that this label should be different than the string returned by getTypeLabel().

Elements of the same type would have have the same type label, but different instance labels.

Parameters

el
IElement.

Returns

String name.

getProperties(IElement) Method

public List getProperties(IElement el)
Returns a list of IPropertyNodes. This list is the top level of the property heirarchy displayed in the property view. The property view expects that all top level nodes represent property groups and will not not display values for these nodes. After the top-level, nodes implementing IProperty will display a value.

If this element has no displayable properties, an empty List should be returned. Use of Collections.EMPTY_LIST is recommended.

Parameters

el
IElement.

Returns

List of IPropertyNode. May not be null, may be empty.

getTypeLabel(IElement) Method

public String getTypeLabel(IElement el)
Display name identifying this type of element.

Elements of the same type would have have the same type label, but different instance labels.

Parameters

el
IElement.

Returns

String type name.

setContext(IPropertyViewDriver.IPropertyViewContext) Method

public void setContext(IPropertyViewDriver.IPropertyViewContext context)
Sets the view context for this driver. Usually set by the view but can be used by drivers which wrap or extend other drivers.