Class PropertySheet
- All Implemented Interfaces:
- EventListener,- IAdaptable,- IExecutableExtension,- IRegistryEventListener,- IPartListener,- IPersistable,- ISecondarySaveableSource,- ISelectionListener,- IViewPart,- IWorkbenchPart,- IWorkbenchPart2,- IWorkbenchPart3,- IShowInSource,- IShowInTarget,- IWorkbenchPartOrientation
 This standard view has id "org.eclipse.ui.views.PropertySheet".
 
 Note that property sheets and property sheet pages are not the same
 thing as property dialogs and their property pages (the property pages
 extension point is for contributing property pages to property dialogs).
 Within the property sheet view, all pages are
 IPropertySheetPages.
 
 Property sheet pages are discovered by the property sheet view automatically
 when a part is first activated. The property sheet view asks the active part
 for its property sheet page; this is done by invoking
 getAdapter(IPropertySheetPage.class) on the part. If the part
 returns a page, the property sheet view then creates the controls for that
 property sheet page (using createControl), and adds the page to
 the property sheet view. Whenever this part becomes active, its corresponding
 property sheet page is shown in the property sheet view (which may or may not
 be visible at the time). A part's property sheet page is discarded when the
 part closes. The property sheet view has a default page (an instance of
 PropertySheetPage) which services all parts without a property
 sheet page of their own.
 
The workbench will automatically instantiate this class when a Property Sheet view is needed for a workbench window. This class is not intended to be instantiated or subclassed by clients.
- See Also:
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.eclipse.ui.part.PageBookViewPageBookView.PageRec, PageBookView.SelectionProvider
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringNo longer used but preserved to avoid api changeFields inherited from interface org.eclipse.ui.IWorkbenchPartPROP_TITLE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidadded(IExtension[] extensions) Notifies this listener that extensions were added to the registry.voidadded(IExtensionPoint[] extensionPoints) Notifies this listener that extension points were added to the registry.protected IPagecreateDefaultPage(PageBook book) Creates and returns the default page for this view.voidcreatePartControl(Composite parent) ThePropertySheetimplementation of thisIWorkbenchPartmethod creates aPageBookcontrol with its default page showing.protected IPageCreates and returns a default properties page for this view.voiddispose()ThePageBookViewimplementation of thisIWorkbenchPartmethod cleans up all the pages.protected PageBookView.PageRecdoCreatePage(IWorkbenchPart part) Creates a new page in the pagebook for a particular part.protected voiddoDestroyPage(IWorkbenchPart part, PageBookView.PageRec rec) Destroys a page in the pagebook for a particular part.protected IWorkbenchPartReturns the active, important workbench part for this view.protected ISaveablePartReturns anISaveablePartthat delegates to the source part for the current page if it implementsISaveablePart, ornullotherwise.Returns the context to show, ornullif there is currently no valid context to show.protected <T> TgetViewAdapter(Class<T> key) ThePropertySheetimplementation of thisPageBookViewmethod handles theISaveablePartadapter case by callinggetSaveablePart().voidInitializes this view with the given view site.booleanDefines the dirty state indication behavior of thePropertySheetinstance for the current tracked part if it is aISaveablePartinstance or provides an adapter toISaveablePart.protected booleanisImportant(IWorkbenchPart part) Returns whether the given part should be added to this view.booleanisPinned()voidpartActivated(IWorkbenchPart part) ThePropertySheetimplementation of thisIPartListenermethod first sees if the active part is anIContributedContentsViewadapter and if so, asks it for its contributing part.voidpartClosed(IWorkbenchPart part) ThePageBookViewimplementation of thisIPartListenermethod deal with the closing of the active part.protected voidpartHidden(IWorkbenchPart part) Make sure that the part is not considered if it is hidden.protected voidpartVisible(IWorkbenchPart part) Make sure that the part is not considered if it is hidden.voidremoved(IExtension[] extensions) Notifies this listener that extensions were removed from the registry.voidremoved(IExtensionPoint[] extensionPoints) Notifies this listener that extension points were removed from the registry.voidSaves the object state within a memento.voidselectionChanged(IWorkbenchPart part, ISelection sel) Notifies this listener that the selection has changed.voidsetPinned(boolean pinned) booleanshow(ShowInContext aContext) Shows the given context in this target.Methods inherited from class org.eclipse.ui.part.PageBookViewdoesPageExist, getAdapter, getCurrentContributingPart, getCurrentPage, getDefaultPage, getPageBook, getPageRec, getPageRec, getPageSite, getSelectionProvider, initPage, partBroughtToTop, partDeactivated, partOpened, setFocus, showPageRecMethods inherited from class org.eclipse.ui.part.ViewPartcheckSite, getViewSite, init, setContentDescription, setInitializationData, setPartNameMethods inherited from class org.eclipse.ui.part.WorkbenchPartaddPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusyMethods inherited from class org.eclipse.core.commands.common.EventManageraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.ui.IWorkbenchPartaddPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
- 
Field Details- 
HELP_CONTEXT_PROPERTY_SHEET_VIEWNo longer used but preserved to avoid api change- See Also:
 
 
- 
- 
Constructor Details- 
PropertySheetpublic PropertySheet()Creates a property sheet view.
 
- 
- 
Method Details- 
createDefaultPageDescription copied from class:PageBookViewCreates and returns the default page for this view.Subclasses must implement this method. Subclasses must call initPage with the new page (if it is an IPageBookViewPage) before calling createControl on the page.- Specified by:
- createDefaultPagein class- PageBookView
- Parameters:
- book- the pagebook control
- Returns:
- the default page
 
- 
createPartControlThePropertySheetimplementation of thisIWorkbenchPartmethod creates aPageBookcontrol with its default page showing.- Specified by:
- createPartControlin interface- IWorkbenchPart
- Overrides:
- createPartControlin class- PageBookView
- Parameters:
- parent- the parent control
 
- 
disposepublic void dispose()Description copied from class:PageBookViewThePageBookViewimplementation of thisIWorkbenchPartmethod cleans up all the pages. Subclasses may extend.- Specified by:
- disposein interface- IWorkbenchPart
- Overrides:
- disposein class- PageBookView
 
- 
doCreatePageDescription copied from class:PageBookViewCreates a new page in the pagebook for a particular part. This page will be made visible whenever the part is active, and will be destroyed with a call todoDestroyPage.Subclasses must implement this method. Subclasses must call initPage with the new page (if it is an IPageBookViewPage) before calling createControl on the page.- Specified by:
- doCreatePagein class- PageBookView
- Parameters:
- part- the input part
- Returns:
- the record describing a new page for this view
- See Also:
 
- 
createPropertySheetPageCreates and returns a default properties page for this view. This page is used when a part does not provide a IPropertySheetPage- Parameters:
- book- the pagebook control
- Returns:
- A default properties page
- Since:
- 3.10
 
- 
doDestroyPageDescription copied from class:PageBookViewDestroys a page in the pagebook for a particular part. This page was returned as a result fromdoCreatePage.Subclasses must implement this method. - Specified by:
- doDestroyPagein class- PageBookView
- Parameters:
- part- the input part
- rec- a page record for the part
- See Also:
 
- 
getBootstrapPartDescription copied from class:PageBookViewReturns the active, important workbench part for this view.When the page book view is created it has no idea which part within the workbook should be used to generate the first page. Therefore, it delegates the choice to subclasses of PageBookView.Implementors of this method should return an active, important part in the workbench or nullif none found.Subclasses must implement this method. - Specified by:
- getBootstrapPartin class- PageBookView
- Returns:
- the active important part, or nullif none
 
- 
initDescription copied from interface:IViewPartInitializes this view with the given view site.This method is automatically called by the workbench shortly after the part is instantiated. It marks the start of the views's lifecycle. Clients must not call this method. - Specified by:
- initin interface- IViewPart
- Overrides:
- initin class- PageBookView
- Parameters:
- site- the view site
- Throws:
- PartInitException- may be thrown from overrides
 
- 
saveStateDescription copied from interface:IViewPartSaves the object state within a memento.
- 
isImportantDescription copied from class:PageBookViewReturns whether the given part should be added to this view.Subclasses must implement this method. - Specified by:
- isImportantin class- PageBookView
- Parameters:
- part- the input part
- Returns:
- trueif the part is relevant, and- falseotherwise
 
- 
partClosedDescription copied from class:PageBookViewThePageBookViewimplementation of thisIPartListenermethod deal with the closing of the active part. Subclasses may extend.- Specified by:
- partClosedin interface- IPartListener
- Overrides:
- partClosedin class- PageBookView
- Parameters:
- part- the part that was closed
- See Also:
 
- 
partVisibleDescription copied from class:PageBookViewMake sure that the part is not considered if it is hidden.- Overrides:
- partVisiblein class- PageBookView
- Parameters:
- part- the part which got visible
 
- 
partHiddenDescription copied from class:PageBookViewMake sure that the part is not considered if it is hidden.- Overrides:
- partHiddenin class- PageBookView
- Parameters:
- part- the part which got hidden
 
- 
partActivatedThePropertySheetimplementation of thisIPartListenermethod first sees if the active part is anIContributedContentsViewadapter and if so, asks it for its contributing part.- Specified by:
- partActivatedin interface- IPartListener
- Overrides:
- partActivatedin class- PageBookView
- Parameters:
- part- the part that was activated
- See Also:
 
- 
selectionChangedDescription copied from interface:ISelectionListenerNotifies this listener that the selection has changed.Note: it is important that this method returns as quickly as possible to avoid UI freezes. For example, do not update the UI if the UI is not visible. See the SelectionListenerFactoryfor listeners that are build for this purpose.This method is called when the selection changes to a non-nullvalue, but not when the selection changes tonull. If there is a requirement to be notified in the latter scenario, implementINullSelectionListener. The event will be posted through this method.- Specified by:
- selectionChangedin interface- ISelectionListener
- Parameters:
- part- the workbench part containing the selection
- sel- the current selection. This may be- nullif- INullSelectionListeneris implemented.
- See Also:
 
- 
isDirtyStateSupportedpublic boolean isDirtyStateSupported()Defines the dirty state indication behavior of thePropertySheetinstance for the current tracked part if it is aISaveablePartinstance or provides an adapter toISaveablePart.Default return value is false- the Properties view will not show the '*' sign if the tracked part is dirty.This behavior can be changed by either contributing custom IPropertySheetPageto the tracked part, or providingISecondarySaveableSourceadapter by the tracked part or by contributingISecondarySaveableSourceadapter to thePropertySheetclass.Strategy for the search is going from the smallest scope to the global scope, searching for the first ISecondarySaveableSourceadapter.The current page is asked for the ISecondarySaveableSourceadapter first, if the adapter is not defined, the current tracked part is asked for it, and finally the platform adapter manager is consulted. The first adapter found in the steps above defines the return value of this method.If the contributed page wants change the behavior The page must implement IAdaptableand return adapter toISecondarySaveableSource.- Specified by:
- isDirtyStateSupportedin interface- ISecondarySaveableSource
- Returns:
- returns falseif the dirty state indication behavior is not desired.
- Since:
- 3.9
 
- 
getViewAdapterThePropertySheetimplementation of thisPageBookViewmethod handles theISaveablePartadapter case by callinggetSaveablePart().- Overrides:
- getViewAdapterin class- PageBookView
- Parameters:
- key- the adapter class to look up
- Returns:
- a object castable to the given class, or nullif this object does not have an adapter for the given class
- Since:
- 3.2
 
- 
getSaveablePartReturns anISaveablePartthat delegates to the source part for the current page if it implementsISaveablePart, ornullotherwise.- Returns:
- an ISaveablePartornull
- Since:
- 3.2
 
- 
isPinnedpublic boolean isPinned()- Returns:
- whether this property sheet is currently pinned
- Since:
- 3.4
 
- 
getShowInContextDescription copied from interface:IShowInSourceReturns the context to show, ornullif there is currently no valid context to show.- Specified by:
- getShowInContextin interface- IShowInSource
- Returns:
- the context to show, or null
 
- 
showDescription copied from interface:IShowInTargetShows the given context in this target. The target should check the context's selection for elements to show. If there are no relevant elements in the selection, then it should check the context's input.- Specified by:
- showin interface- IShowInTarget
- Parameters:
- aContext- the context to show
- Returns:
- trueif the context could be shown,- falseotherwise
 
- 
setPinnedpublic void setPinned(boolean pinned) - Parameters:
- pinned- Whether this sheet should be pinned
- Since:
- 3.4
 
- 
addedDescription copied from interface:IRegistryEventListenerNotifies this listener that extensions were added to the registry.The extensions supplied as the argument are valid only for the duration of the invocation of this method. - Specified by:
- addedin interface- IRegistryEventListener
- Parameters:
- extensions- extensions added to the registry
 
- 
addedDescription copied from interface:IRegistryEventListenerNotifies this listener that extension points were added to the registry.The extension points supplied as the argument are valid only for the duration of the invocation of this method. - Specified by:
- addedin interface- IRegistryEventListener
- Parameters:
- extensionPoints- extension points added to the registry
 
- 
removedDescription copied from interface:IRegistryEventListenerNotifies this listener that extensions were removed from the registry.The extensions supplied as the argument are valid only for the duration of the invocation of this method. - Specified by:
- removedin interface- IRegistryEventListener
- Parameters:
- extensions- extensions removed from the registry
 
- 
removedDescription copied from interface:IRegistryEventListenerNotifies this listener that extension points were removed from the registry.The extension points supplied as the argument are valid only for the duration of the invocation of this method. - Specified by:
- removedin interface- IRegistryEventListener
- Parameters:
- extensionPoints- extension points removed from the registry
 
 
-