+++ /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.view.datasource.e4.handler;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-
-import eu.etaxonomy.cdm.config.ICdmSource;
-import eu.etaxonomy.cdm.database.ICdmDataSource;
-import eu.etaxonomy.taxeditor.local.datasource.wizard.CdmDataSourceWizard;
-import eu.etaxonomy.taxeditor.local.view.datasource.CdmMetaDataAwareDataSourceContainer;
-import eu.etaxonomy.taxeditor.local.view.datasource.e4.CdmDataSourceViewPartE4;
-
-/**
- *
- * @author pplitzner
- * @date 22.08.2017
- *
- */
-public class CloneDataSourceHandlerE4 extends AbstractDataSourceHandlerE4 {
-
- /** {@inheritDoc} */
- @Override
- public boolean specificExecute(CdmDataSourceViewPartE4 dataSourceViewPart, CdmMetaDataAwareDataSourceContainer container, Shell shell) {
- ICdmSource cdmSource = container.getCdmSource();
- //FIXME:Remoting we need another wizard for ICdmRemoteSource
- if(cdmSource instanceof ICdmDataSource) {
- Wizard wizard = new CdmDataSourceWizard((ICdmDataSource)cdmSource, CdmDataSourceWizard.Mode.CLONE);
- WizardDialog dialog = new WizardDialog(shell, wizard);
-
- int result = dialog.open();
-
- if(result == IStatus.OK){
- if(dataSourceViewPart != null){
- container.getMetaDataFromDataSource();
- dataSourceViewPart.getViewer().update(new CdmMetaDataAwareDataSourceContainer[]{container}, null);
- }
- }
- }
- return true;
- }
-
-}