Community
Participate
Working Groups
Version: 3.3.0 Build id: I20070621-1340 Many RCP applications have multiple workbench windows each with a specific function. Each window might have a number of perspectives, but you don't want to be able to open all perspectives in all windows, only those that are relevant for the specific function of the window. This is not possible with the current perspective chooser - actually it is not even possible to avoid the "open perspective" button or to limit the set of perspectives that are offered in the menu.
Some of this functionality is already described in bug 190083.
Created attachment 76976 [details] Patch for bug This patch is as simple as possible. Two new API preferences has been introduced. They are both intended to be used in a plugin_customization.ini file and thus there are no property change management involved nor are they present in the preference pages. - SHOW_OPEN_ON_PERSPECTIVE_BAR: if true (the default), will the "open perspective" button be present in the perspecive bar. - SHOW_OTHER_IN_PERSPECTIVE_MENU: if true (the default), will the "Other..." button be present in the perspecive menu. The two preferences can be combined, but for the sake of simplicity, they have been kept apart. If property change management is wanted, only SHOW_OPEN_ON_PERSPECTIVE_BAR is affected. Note though, that this means additional changes in the PerspectiveBarManager as well as this assumes the first real perspective has index 1 (and not 0).
Patch released >20070912. Tonny, thanks for the patch and keep it coming! Just one thing to think about - with this being a preference, it can be changed for each workspace, and in theory by the end user. Another way would have been to add this to the workbench window configurer instead, which ensures that it can only be set by the application. It would also fit well between the other setShow...() methods on IWorkbenchWindowConfigurer. You can earn extra points for submitting a patch that modifies your solution to use the workbench window configurer mechanism rather than a preference. :)