+++ /dev/null
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.local.handler;
-
-import java.util.Collection;
-
-import javax.inject.Named;
-
-import org.eclipse.e4.core.di.annotations.Execute;
-import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.ui.basic.MPart;
-import org.eclipse.e4.ui.services.IServiceConstants;
-import org.eclipse.e4.ui.workbench.modeling.EModelService;
-import org.eclipse.e4.ui.workbench.modeling.EPartService;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IPerspectiveRegistry;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-import eu.etaxonomy.taxeditor.local.server.RemotingLoginDialogLocal;
-import eu.etaxonomy.taxeditor.remoting.source.ICdmRemoteSource;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
-/**
- * @author pplitzner
- * @date 10.10.2017
- */
-public class SwitchUserHandlerE4 {
-
- @Execute
- public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell, EModelService modelService, EPartService partService, MApplication application) {
- Collection<MPart> parts = partService.getParts();
- String partId = "eu.etaxonomy.taxeditor.navigation.navigator";
- for (MPart part : parts) {
- partService.hidePart(part);
-
- }
-
- RemotingLoginDialogLocal loginDialog = new RemotingLoginDialogLocal(shell,
- SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
-
- loginDialog.open((ICdmRemoteSource) CdmStore.getActiveCdmSource(), false, false);
-
- IWorkbench workbench = PlatformUI.getWorkbench();
- IWorkbenchWindow window = workbench
- .getActiveWorkbenchWindow();
-
- IPerspectiveRegistry registry = workbench.getPerspectiveRegistry();
- IWorkbenchPage page = window.getActivePage();
- page.resetPerspective();
- }
-}