diff options
Diffstat (limited to 'plugins/toolsmiths/profilemigration/org.eclipse.papyrus.toolsmiths.profilemigration.ui/src/org/eclipse/papyrus/toolsmiths/profilemigration/ui/dialogs/MoveProfileDialog.java')
-rw-r--r-- | plugins/toolsmiths/profilemigration/org.eclipse.papyrus.toolsmiths.profilemigration.ui/src/org/eclipse/papyrus/toolsmiths/profilemigration/ui/dialogs/MoveProfileDialog.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/plugins/toolsmiths/profilemigration/org.eclipse.papyrus.toolsmiths.profilemigration.ui/src/org/eclipse/papyrus/toolsmiths/profilemigration/ui/dialogs/MoveProfileDialog.java b/plugins/toolsmiths/profilemigration/org.eclipse.papyrus.toolsmiths.profilemigration.ui/src/org/eclipse/papyrus/toolsmiths/profilemigration/ui/dialogs/MoveProfileDialog.java new file mode 100644 index 00000000000..5c35222d35e --- /dev/null +++ b/plugins/toolsmiths/profilemigration/org.eclipse.papyrus.toolsmiths.profilemigration.ui/src/org/eclipse/papyrus/toolsmiths/profilemigration/ui/dialogs/MoveProfileDialog.java @@ -0,0 +1,51 @@ +/***************************************************************************** + * Copyright (c) 2017 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.toolsmiths.profilemigration.ui.dialogs; + +import org.eclipse.osgi.util.NLS; +import org.eclipse.papyrus.toolsmiths.profilemigration.ui.Messages; +import org.eclipse.papyrus.toolsmiths.profilemigration.ui.preferences.ProfileMigrationPreferenceConstants; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.uml2.uml.Profile; + +/** + * Dialog to ask to user if he want to apply a profile or not + */ +public class MoveProfileDialog extends AbstractApplyNewProfileDialog { + + private static String DIALOG_TITLE = Messages.MoveProfileDialog_title; + + private Profile movedProfile; + + /** + * Constructor. + * + * @param shell + * the active shell + * @param movedProfile + * the moved profile + * @param newProfile + * the new profile to apply + */ + public MoveProfileDialog(Shell shell, Profile movedProfile, Profile newProfile) { + super(shell, DIALOG_TITLE, ProfileMigrationPreferenceConstants.PROFILE_MOVE, newProfile); + this.movedProfile = movedProfile; + } + + @Override + protected String getDecription() { + return NLS.bind(Messages.MoveProfileDialog_description, movedProfile.getName(), newProfile.getName()); + } + +} |