Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 2ede84ac883ad6f68974fff4c2d10226f5502c96 (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
54
55
56
57
58
59
60
/*****************************************************************************
 * Copyright (c) 2014 Jonathan Geoffroy.
 *
 *
 * 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:
 * 	Jonathan Geoffroy	geoffroy.jonathan@gmail.com		- initial implementation
 *
 *****************************************************************************/

package org.eclipse.papyrus.java.reverse.ui.dnd;

import org.eclipse.gef.EditPart;
import org.eclipse.gef.Request;
import org.eclipse.gef.commands.Command;
import org.eclipse.papyrus.infra.gmfdiag.dnd.strategy.DropStrategy;
import org.eclipse.swt.graphics.Image;


public class DropReverseStrategy implements DropStrategy {
	public DropReverseStrategy() {
	}

	@Override
	public String getLabel() {
		return Messages.DropReverseStrategy_LABEL; 
	}

	@Override
	public String getDescription() {
		return Messages.DropReverseStrategy_DESCRIPTION; 
	}

	@Override
	public Image getImage() {
		// No image to display
		return null;
	}

	@Override
	public String getID() {
		return "org.eclipse.papyrus.java.reverse.ui.dnd.reversedropstrategy"; //$NON-NLS-1$
	}

	@Override
	public Command getCommand(final Request request, final EditPart targetEditPart) {
		return DropReverseCommand.getInstance(request);

	}

	@Override
	public int getPriority() {
		return 0;
	}

}

Back to the top