|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A part can provide arbitrary properties. The properties will be persisted between sessions by the part reference, and will be available from the part reference as well as the part. The properties can only be set on a part, not on the reference. The properties will be available to the IPresentablePart.
Setting a property must fire a PropertyChangeEvent.
Field Summary |
---|
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
PROP_TITLE |
Method Summary | |
---|---|
void |
addPartPropertyListener(IPropertyChangeListener listener)
Add a listener for changes in the arbitrary properties set. |
Map |
getPartProperties()
Return an unmodifiable map of the arbitrary properties. |
String |
getPartProperty(String key)
Return the value for the arbitrary property key, or null . |
void |
removePartPropertyListener(IPropertyChangeListener listener)
Remove a change listener from the arbitrary properties set. |
void |
setPartProperty(String key,
String value)
Set an arbitrary property on the part. |
Methods inherited from interface org.eclipse.ui.IWorkbenchPart2 |
---|
getContentDescription, getPartName |
Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
addPropertyListener, createPartControl, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setFocus |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Method Detail |
public void addPartPropertyListener(IPropertyChangeListener listener)
Note: this is a different set of properties than the ones covered by the IWorkbenchPartConstants.PROP_* constants.
listener
- Must not be null
.public void removePartPropertyListener(IPropertyChangeListener listener)
Note: this is a different set of properties than the ones covered by the IWorkbenchPartConstants.PROP_* constants.
listener
- Must not be null
.public String getPartProperty(String key)
null
.
key
- the arbitrary property. Must not be null
.
null
.public void setPartProperty(String key, String value)
A default implementation has been added to WorkbenchPart.
key
- the arbitrary property. Must not be null
.value
- the property value. A null
value will remove
that property.public Map getPartProperties()
null
.
|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.