blob: 551285bbfaa99ae71a241a6854bb4f1c6e257d3a [file] [log] [blame]
/*****************************************************************************
* Copyright (c) 2019 CEA LIST, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation
*
*****************************************************************************/
package org.eclipse.papyrus.interoperability.sysml16.sysml14.handlers;
import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
import org.eclipse.papyrus.interoperability.sysml16.sysml14.transformations.SysMLImportTransformationLauncher;
import org.eclipse.papyrus.uml.m2m.qvto.common.MigrationParameters.ThreadConfig;
import org.eclipse.papyrus.uml.m2m.qvto.common.handler.AbstractMigrationHandler;
import org.eclipse.papyrus.uml.m2m.qvto.common.transformation.IImportTransformationLauncher;
import org.eclipse.swt.widgets.Control;
import com.google.common.collect.Sets;
/**
* The handler to run SysML1.4 import action when a file is selected.
*/
public class ImportSysMLHandler extends AbstractMigrationHandler {
/**
* Constructor.
*/
public ImportSysMLHandler() {
super(Sets.newHashSet(DiModel.DI_FILE_EXTENSION));
}
/**
* {@inheritDoc}
*
* @see org.eclipse.papyrus.migration.common.handler.AbstractMigrationHandler#createImportTransformationLauncher(org.eclipse.papyrus.migration.common.MigrationParameters.Config, org.eclipse.swt.widgets.Control)
*/
@Override
protected IImportTransformationLauncher createImportTransformationLauncher(final ThreadConfig config, final Control baseControl) {
return new SysMLImportTransformationLauncher(config, baseControl);
}
}