1 package org
.argeo
.security
.ui
.rap
;
3 import org
.eclipse
.swt
.graphics
.Point
;
4 import org
.eclipse
.ui
.IWorkbenchWindow
;
5 import org
.eclipse
.ui
.actions
.ActionFactory
;
6 import org
.eclipse
.ui
.actions
.ActionFactory
.IWorkbenchAction
;
7 import org
.eclipse
.ui
.application
.ActionBarAdvisor
;
8 import org
.eclipse
.ui
.application
.IActionBarConfigurer
;
9 import org
.eclipse
.ui
.application
.IWorkbenchWindowConfigurer
;
10 import org
.eclipse
.ui
.application
.WorkbenchWindowAdvisor
;
12 public class SecureWorkbenchWindowAdvisor
extends WorkbenchWindowAdvisor
{
14 public SecureWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer
) {
18 public ActionBarAdvisor
createActionBarAdvisor(
19 IActionBarConfigurer configurer
) {
20 return new SecureActionBarAdvisor(configurer
, true);
23 public void preWindowOpen() {
24 IWorkbenchWindowConfigurer configurer
= getWindowConfigurer();
25 configurer
.setInitialSize(new Point(1200, 900));
26 configurer
.setShowCoolBar(true);
27 configurer
.setShowMenuBar(true);
28 configurer
.setShowStatusLine(false);
30 configurer
.setShowPerspectiveBar(true);
31 configurer
.setTitle("Argeo Secure UI"); //$NON-NLS-1$
35 public void postWindowOpen() {
36 String defaultPerspective
= getWindowConfigurer()
37 .getWorkbenchConfigurer().getWorkbench()
38 .getPerspectiveRegistry().getDefaultPerspective();
39 if (defaultPerspective
== null) {
40 IWorkbenchWindow window
= getWindowConfigurer().getWindow();
44 IWorkbenchAction openPerspectiveDialogAction
= ActionFactory
.OPEN_PERSPECTIVE_DIALOG
46 openPerspectiveDialogAction
.run();