]> git.argeo.org Git - gpl/argeo-suite.git/blob - org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/rap/AsWorkbenchAdvisor.java
Add Documents to Eclipse 4
[gpl/argeo-suite.git] / org.argeo.suite.workbench.rap / src / org / argeo / suite / workbench / rap / AsWorkbenchAdvisor.java
1 package org.argeo.suite.workbench.rap;
2
3 import org.argeo.cms.ui.workbench.rap.RapWorkbenchAdvisor;
4 import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
5 import org.eclipse.ui.application.WorkbenchWindowAdvisor;
6
7 /** Eclipse RAP specific workbench advisor */
8 public class AsWorkbenchAdvisor extends RapWorkbenchAdvisor {
9
10 private String username;
11
12 @Override
13 public void postStartup() {
14 super.postStartup();
15 // ExitConfirmation confirmation = RWT.getClient().getService(
16 // ExitConfirmation.class);
17 // confirmation.setMessage("Are you sure you want to leave the page? "
18 // + "All un-saved information will be lost.");
19 }
20
21 public void postShutdown() {
22 super.postShutdown();
23 // ExitConfirmation confirmation = RWT.getClient().getService(
24 // ExitConfirmation.class);
25 // if (confirmation != null)
26 // confirmation.setMessage(null);
27 }
28
29 public AsWorkbenchAdvisor(String username) {
30 super(username);
31 this.username = username;
32 }
33
34 public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(
35 IWorkbenchWindowConfigurer configurer) {
36 return new AsWindowAdvisor(configurer, username);
37 }
38 }