*/
package org.argeo.slc.client.rcp;
-import org.eclipse.ui.application.IWorkbenchConfigurer;
+import org.argeo.security.ui.rcp.SecureWorkbenchAdvisor;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-/** Implements initial perspective and saveAndRestore status of the workbench. */
-public class SlcSecureWorkbenchAdvisor extends WorkbenchAdvisor {
- public final static String INITIAL_PERSPECTIVE_PROPERTY = "org.argeo.security.ui.initialPerspective";
- private String initialPerspective = System
- .getProperty(INITIAL_PERSPECTIVE_PROPERTY);
- private String username;
-
+/**
+ * Custom {@link SecureWorkbenchAdvisor} in order to create a
+ * {@link SlcSecureWorkbenchWindowAdvisor}.
+ */
+public class SlcSecureWorkbenchAdvisor extends SecureWorkbenchAdvisor {
public SlcSecureWorkbenchAdvisor(String username) {
- super();
- this.username = username;
+ super(username);
}
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(
IWorkbenchWindowConfigurer configurer) {
- return new SlcSecureWorkbenchWindowAdvisor(configurer, username);
- }
-
- public String getInitialWindowPerspectiveId() {
- return initialPerspective;
+ return new SlcSecureWorkbenchWindowAdvisor(configurer, getUsername());
}
-
- @Override
- public void initialize(IWorkbenchConfigurer configurer) {
- super.initialize(configurer);
- // To remember the user's layout and window size for the next time he
- // starts the application
- //configurer.setSaveAndRestore(true);
- }
-
}
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.part.EditorInputTransfer;
-/** Set here initial default size of the UI */
+/**
+ * Custom {@link SecureWorkbenchWindowAdvisor} which can add a tray. TODO: to
+ * be factorized in Argeo Commons and made more generic.
+ */
public class SlcSecureWorkbenchWindowAdvisor extends
SecureWorkbenchWindowAdvisor {
public final static String IN_TRAY_PROPERTY = "org.argeo.slc.ui.inTray";