Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 18c38f8dfca3d3f885062ce31cfa641098b3f8aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*****************************************************************************
 * 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 MovePackageDialog extends AbstractApplyNewProfileDialog {

	private static String DIALOG_TITLE = Messages.MovePackageDialog_title;

	private org.eclipse.uml2.uml.Package movedPackage;

	/**
	 * Constructor.
	 *
	 * @param shell
	 *            the active shell
	 * @param movedPackage
	 *            the moved package
	 * @param newProfile
	 *            the new profile to apply
	 */
	public MovePackageDialog(Shell shell, org.eclipse.uml2.uml.Package movedPackage, Profile newProfile) {
		super(shell, DIALOG_TITLE, ProfileMigrationPreferenceConstants.PACKAGE_MOVE, newProfile);
		this.movedPackage = movedPackage;
		this.newProfile = newProfile;
	}

	@Override
	protected String getDecription() {
		return NLS.bind(Messages.MovePackageDialog_description, movedPackage.getName(), newProfile.getName());
	}

}

Back to the top