- Direct Known Subclasses:
Classes that want to implement a saveable part can simply implement the methods that they need while accepting the provided defaults for most of the methods.
- See Also:
Method SummaryModifier and TypeMethodDescription
voidDeprecated.Adds a listener for changes to properties of this workbench part.
dispose()Deprecated.Disposes of this workbench part.
doSaveAs()Deprecated.Saves the contents of this part to another object.
<T> TDeprecated.Returns an object which is an instance of the given class associated with this object.
getSite()Deprecated.Returns the site for this workbench part.Deprecated.Returns the title tool tip text of this workbench part.
booleanDeprecated.Returns whether the "Save As" operation is supported by this part.
booleanDeprecated.Returns whether the contents of this part should be saved when the part is closed.
voidDeprecated.Removes the given property listener from this workbench part.
setFocus()Deprecated.Asks this part to take focus within the workbench.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doSaveAspublic void doSaveAs()Deprecated.Saves the contents of this part to another object.
Implementors are expected to open a "Save As" dialog where the user will be able to select a new name for the contents. After the selection is made, the contents should be saved to that new name. During this operation a
IProgressMonitorshould be used to indicate progress.
If the save is successful, the part fires a property changed event reflecting the new dirty state (
isSaveAsAllowedpublic boolean isSaveAsAllowed()Deprecated.Returns whether the "Save As" operation is supported by this part.
isSaveOnCloseNeededpublic boolean isSaveOnCloseNeeded()Deprecated.Returns whether the contents of this part should be saved when the part is closed.
addPropertyListenerpublic void addPropertyListener
(IPropertyListener listener)Deprecated.Adds a listener for changes to properties of this workbench part. Has no effect if an identical listener is already registered.
The property ids are defined in
disposepublic void dispose()Deprecated.Disposes of this workbench part.
This is the last method called on the
IWorkbenchPart. At this point the part controls (if they were ever created) have been disposed as part of an SWT composite. There is no guarantee that createPartControl() has been called, so the part controls may never have been created.
Within this method a part may release any resources, fonts, images, etc. held by this part. It is also very important to deregister all listeners from the workbench.
Clients should not call this method (the workbench calls this method at appropriate times).
getSitepublic IWorkbenchPartSite getSite()Deprecated.Returns the site for this workbench part. The site can be
nullwhile the workbench part is being initialized. After the initialization is complete, this value must be non-
nullfor the remainder of the part's life cycle.
getTitleToolTippublic String getTitleToolTip()Deprecated.Returns the title tool tip text of this workbench part. An empty string result indicates no tool tip. If this value changes the part must fire a property listener event with
The tool tip text is used to populate the title bar of this part's visual container.
removePropertyListenerpublic void removePropertyListener
(IPropertyListener listener)Deprecated.Removes the given property listener from this workbench part. Has no effect if an identical listener is not registered.
setFocuspublic void setFocus()Deprecated.Asks this part to take focus within the workbench. Parts must assign focus to one of the controls contained in the part's parent composite.
Clients should not call this method (the workbench calls this method at appropriate times). To have the workbench activate a part, use
getAdapterpublic <T> T getAdapter
(Class<T> adapter)Deprecated.Description copied from interface:
IAdaptableReturns an object which is an instance of the given class associated with this object. Returns
nullif no such object can be found.
Clients may implement this method but should generally call
Adapters.adapt(Object, Class, boolean)rather than invoking it directly.