Class SaveablePartAdapter

java.lang.Object
org.eclipse.team.ui.SaveablePartAdapter
All Implemented Interfaces:
IAdaptable, ISaveableWorkbenchPart, ISaveablePart, IWorkbenchPart
Direct Known Subclasses:
PageSaveablePart

@Deprecated public abstract class SaveablePartAdapter extends Object implements ISaveableWorkbenchPart
This adapter provides default implementations for methods on ISaveableWorkbenchPart and IWorkbenchPart.

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.

Since:
3.0
See Also:
  • Constructor Details

    • SaveablePartAdapter

      public SaveablePartAdapter()
      Deprecated.
  • Method Details

    • doSaveAs

      public void doSaveAs()
      Deprecated.
      Description copied from interface: ISaveablePart
      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 IProgressMonitor should be used to indicate progress.

      If the save is successful, the part fires a property changed event reflecting the new dirty state (PROP_DIRTY property).

      Specified by:
      doSaveAs in interface ISaveablePart
    • isSaveAsAllowed

      public boolean isSaveAsAllowed()
      Deprecated.
      Description copied from interface: ISaveablePart
      Returns whether the "Save As" operation is supported by this part.
      Specified by:
      isSaveAsAllowed in interface ISaveablePart
      Returns:
      true if "Save As" is supported, and false if not supported
    • isSaveOnCloseNeeded

      public boolean isSaveOnCloseNeeded()
      Deprecated.
      Description copied from interface: ISaveablePart
      Returns whether the contents of this part should be saved when the part is closed.
      Specified by:
      isSaveOnCloseNeeded in interface ISaveablePart
      Returns:
      true if the contents of the part should be saved on close, and false if the contents are expendable
    • addPropertyListener

      public void addPropertyListener(IPropertyListener listener)
      Deprecated.
      Description copied from interface: IWorkbenchPart
      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 IWorkbenchPartConstants.

      Specified by:
      addPropertyListener in interface IWorkbenchPart
      Parameters:
      listener - a property listener
    • dispose

      public void dispose()
      Deprecated.
      Description copied from interface: IWorkbenchPart
      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).

      Specified by:
      dispose in interface IWorkbenchPart
    • getSite

      public IWorkbenchPartSite getSite()
      Deprecated.
      Description copied from interface: IWorkbenchPart
      Returns the site for this workbench part. The site can be null while the workbench part is being initialized. After the initialization is complete, this value must be non-null for the remainder of the part's life cycle.
      Specified by:
      getSite in interface IWorkbenchPart
      Returns:
      The part site; this value may be null if the part has not yet been initialized
    • getTitleToolTip

      public String getTitleToolTip()
      Deprecated.
      Description copied from interface: IWorkbenchPart
      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 PROP_TITLE.

      The tool tip text is used to populate the title bar of this part's visual container.

      Specified by:
      getTitleToolTip in interface IWorkbenchPart
      Returns:
      the workbench part title tool tip (not null)
    • removePropertyListener

      public void removePropertyListener(IPropertyListener listener)
      Deprecated.
      Description copied from interface: IWorkbenchPart
      Removes the given property listener from this workbench part. Has no effect if an identical listener is not registered.
      Specified by:
      removePropertyListener in interface IWorkbenchPart
      Parameters:
      listener - a property listener
    • setFocus

      public void setFocus()
      Deprecated.
      Description copied from interface: IWorkbenchPart
      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 IWorkbenchPage.activate(IWorkbenchPart) instead.

      Specified by:
      setFocus in interface IWorkbenchPart
    • getAdapter

      public <T> T getAdapter(Class<T> adapter)
      Deprecated.
      Description copied from interface: IAdaptable
      Returns an object which is an instance of the given class associated with this object. Returns null if 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.

      Specified by:
      getAdapter in interface IAdaptable
      Type Parameters:
      T - the class type
      Parameters:
      adapter - the adapter class to look up
      Returns:
      a object of the given class, or null if this object does not have an adapter for the given class