| java.lang.Object org.eclipse.ui.internal.ViewFactory
ViewFactory | class ViewFactory implements IExtensionChangeHandler(Code) | | The ViewFactory is used to control the creation and disposal of views.
It implements a reference counting strategy so that one view can be shared
by more than one client.
|
Method Summary | |
public void | addExtension(IExtensionTracker tracker, IExtension extension) | public IViewReference | createView(String id) Creates an instance of a view defined by id.
This factory implements reference counting. | public IViewReference | createView(String id, String secondaryId) Creates an instance of a view defined by id and secondary id.
This factory implements reference counting. | static String | extractPrimaryId(String compoundId) Extracts ths primary id portion of a compound id. | static String | extractSecondaryId(String compoundId) Extracts ths secondary id portion of a compound id. | static String | getKey(String id, String secondaryId) Returns a string representing a view with the given id and (optional) secondary id,
suitable for use as a key in a map. | static String | getKey(IViewReference viewRef) Returns a string representing the given view reference, suitable for use as a key in a map. | public int | getReferenceCount(IViewReference viewRef) | public IViewReference | getView(String id) Returns the view with the given id, or null if not found. | public IViewReference | getView(String id, String secondaryId) Returns the view with the given id and secondary id, or null if not found. | public IViewReference[] | getViewReferences() | public IViewRegistry | getViewRegistry() | IMemento | getViewState(String key) | public IViewReference[] | getViews() Returns a list of views which are open. | public WorkbenchPage | getWorkbenchPage() | static boolean | hasWildcard(String viewId) Returns whether the given view id contains a wildcard. | public void | releaseView(IViewReference viewRef) Releases an instance of a view.
This factory does reference counting. | public void | removeExtension(IExtension source, Object[] objects) | public IStatus | restoreState(IMemento memento) Restore view states.
Parameters: memento - the IMemento to restore from. | public void | restoreViewState(IMemento memento) | public IStatus | saveState(IMemento memento) Save view states.
Parameters: memento - the IMemento to save to. | public IMemento | saveViewState(IMemento memento, IViewReference ref, MultiStatus res) |
ID_SEP | final static String ID_SEP(Code) | | Separates a view's primary id from its secondary id in view key strings.
|
addExtension | public void addExtension(IExtensionTracker tracker, IExtension extension)(Code) | | |
createView | public IViewReference createView(String id) throws PartInitException(Code) | | Creates an instance of a view defined by id.
This factory implements reference counting. The first call to this
method will return a new view. Subsequent calls will return the
first view with an additional reference count. The view is
disposed when releaseView is called an equal number of times
to getView.
|
createView | public IViewReference createView(String id, String secondaryId) throws PartInitException(Code) | | Creates an instance of a view defined by id and secondary id.
This factory implements reference counting. The first call to this
method will return a new view. Subsequent calls will return the
first view with an additional reference count. The view is
disposed when releaseView is called an equal number of times
to createView.
|
extractPrimaryId | static String extractPrimaryId(String compoundId)(Code) | | Extracts ths primary id portion of a compound id.
Parameters: compoundId - a compound id of the form: primaryId [':' secondaryId] the primary id |
extractSecondaryId | static String extractSecondaryId(String compoundId)(Code) | | Extracts ths secondary id portion of a compound id.
Parameters: compoundId - a compound id of the form: primaryId [':' secondaryId] the secondary id, or null if none |
getKey | static String getKey(String id, String secondaryId)(Code) | | Returns a string representing a view with the given id and (optional) secondary id,
suitable for use as a key in a map.
Parameters: id - primary id of the view Parameters: secondaryId - secondary id of the view or null the key |
getKey | static String getKey(IViewReference viewRef)(Code) | | Returns a string representing the given view reference, suitable for use as a key in a map.
Parameters: viewRef - the view reference the key |
getReferenceCount | public int getReferenceCount(IViewReference viewRef)(Code) | | Parameters: viewRef - the current reference count for the given view |
getViewReferences | public IViewReference[] getViewReferences()(Code) | | Returns the set of views being managed by this factory
the set of views being managed by this factory |
getViewRegistry | public IViewRegistry getViewRegistry()(Code) | | the IViewRegistry used by this factory. since: 3.0 |
getWorkbenchPage | public WorkbenchPage getWorkbenchPage()(Code) | | the WorkbenchPage used by this factory. since: 3.0 |
hasWildcard | static boolean hasWildcard(String viewId)(Code) | | Returns whether the given view id contains a wildcard. Wildcards cannot
be used in regular view ids, only placeholders.
Parameters: viewId - the view id true if the given view id contains a wildcard,false otherwise since: 3.1 |
releaseView | public void releaseView(IViewReference viewRef)(Code) | | Releases an instance of a view.
This factory does reference counting. For more info see
getView.
|
removeExtension | public void removeExtension(IExtension source, Object[] objects)(Code) | | |
restoreState | public IStatus restoreState(IMemento memento)(Code) | | Restore view states.
Parameters: memento - the IMemento to restore from. IStatus |
saveState | public IStatus saveState(IMemento memento)(Code) | | Save view states.
Parameters: memento - the IMemento to save to. IStatus |
|
|