1e6d925ccd870d0dbb915283757e32349ead6d42
[taxeditor.git] / eu.etaxonomy.taxeditor.local / src / main / java / eu / etaxonomy / taxeditor / local / view / datasource / e4 / handler / EditRemoteServerHandler.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.taxeditor.local.view.datasource.e4.handler;
10
11 import org.eclipse.core.runtime.IStatus;
12 import org.eclipse.jface.wizard.Wizard;
13 import org.eclipse.jface.wizard.WizardDialog;
14 import org.eclipse.swt.widgets.Shell;
15
16 import eu.etaxonomy.taxeditor.local.datasource.wizard.CdmRemoteServerWizard;
17 import eu.etaxonomy.taxeditor.local.view.datasource.e4.CdmRemoteServerViewPart;
18 import eu.etaxonomy.taxeditor.remoting.source.CdmServerInfoConfig;
19
20 /**
21 * @author k.luther
22 * @date 23.01.2023
23 *
24 */
25 public class EditRemoteServerHandler extends AbstractRemoteServerHandler {
26
27 @Override
28 public boolean specificExecute(CdmRemoteServerViewPart remoteServerViewPart, CdmServerInfoConfig container, Shell shell) {
29
30 //FIXME:Remoting we need another wizard for ICdmRemoteSource
31 Wizard wizard = new CdmRemoteServerWizard(container, CdmRemoteServerWizard.Mode.EDIT);
32 WizardDialog dialog = new WizardDialog(shell, wizard);
33
34 int result = dialog.open();
35
36 if(result == IStatus.OK){
37 if(remoteServerViewPart != null){
38
39 remoteServerViewPart.getViewer().update(container, null);
40 }
41 }
42
43 return false;
44 }
45 }