X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=plugins%2Forg.argeo.slc.client.rcp%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fclient%2Frcp%2FSlcSecureWorkbenchAdvisor.java;h=785197d16b188ce9bee05582587adae1eaf6bf59;hb=bd07be7603d234ac496652aaa07ded77d4a2a292;hp=1d2372f50265441ac33bc88b3f1e3a5a461edee8;hpb=651d33e13bfa9a7b46464be412023ee747e612e8;p=gpl%2Fargeo-slc.git diff --git a/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java b/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java index 1d2372f50..785197d16 100644 --- a/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java +++ b/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2012 Mathieu Baudier + * Copyright (C) 2007-2012 Argeo GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,38 +15,21 @@ */ 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); - } - }