#include <berryContributionItemFactory.h>
Access to standard contribution items provided by the workbench.
Most of the functionality of this class is provided by static methods and fields. Example usage:
MenuManager menu = ...;
IContributionItem::Pointer reEdit
= ContributionItemFactory::REOPEN_EDITORS->Create(window);
menu->Add(reEdit);
Clients may declare subclasses that provide additional application-specific contribution item factories.
Definition at line 45 of file berryContributionItemFactory.h.
◆ ContributionItemFactory()
berry::ContributionItemFactory::ContributionItemFactory |
( |
const QString & |
contributionItemId | ) |
|
|
protected |
Creates a new workbench contribution item factory with the given id.
- Parameters
-
contributionItemId | the id of contribution items created by this factory |
◆ ~ContributionItemFactory()
virtual berry::ContributionItemFactory::~ContributionItemFactory |
( |
| ) |
|
|
virtualdefault |
◆ Create()
Creates a new standard contribution item for the given workbench window.
A typical contribution item automatically registers listeners against the workbench window so that it can keep its enablement state up to date. Ordinarily, the window's references to these listeners will be dropped automatically when the window closes. However, if the client needs to get rid of a contribution item while the window is still open, the client must call IContributionItem::dispose to give the item an opportunity to deregister its listeners and to perform any other cleanup.
- Parameters
-
window | the workbench window |
- Returns
- the workbench contribution item
◆ GetId()
QString berry::ContributionItemFactory::GetId |
( |
| ) |
const |
Returns the id of this contribution item factory.
- Returns
- the id of contribution items created by this factory
◆ OPEN_WINDOWS
Workbench contribution item (id "openWindows"): A list of windows currently open in the workbench. Selecting one of the items makes the corresponding window the active window. This action dynamically maintains the list of windows.
Definition at line 96 of file berryContributionItemFactory.h.
◆ PERSPECTIVES_SHORTLIST
Workbench contribution item (id "perspectivesShortlist"): A list of perspectives available to be opened, arranged as a shortlist of promising perspectives and an "Other" subitem. Selecting one of the items makes the corresponding perspective active. Should a new perspective need to be opened, a workbench user preference controls whether the prespective is opened in the active window or a new window. This action dynamically maintains the perspectives shortlist.
Definition at line 124 of file berryContributionItemFactory.h.
◆ REOPEN_EDITORS
Workbench contribution item (id "reopenEditors"): A list of recent editors (with inputs) available to be reopened in the window. Selecting one of the items reopens the corresponding editor on its input in the active window. This action dynamically maintains the list of editors.
Definition at line 113 of file berryContributionItemFactory.h.
◆ VIEWS_SHORTLIST
Workbench contribution item (id "viewsShortlist"): A list of views available to be opened in the window, arranged as a shortlist of promising views and an "Other" subitem. Selecting one of the items opens the corresponding view in the active window. This action dynamically maintains the view shortlist.
Definition at line 105 of file berryContributionItemFactory.h.
The documentation for this class was generated from the following file: