422
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 Borland Software Corporation
|
|
3 |
*
|
|
4 |
* All rights reserved. This program and the accompanying materials
|
|
5 |
* are made available under the terms of the Eclipse Public License v1.0
|
|
6 |
* which accompanies this distribution, and is available at
|
|
7 |
* http://www.eclipse.org/legal/epl-v10.html
|
|
8 |
*
|
|
9 |
* Contributors:
|
|
10 |
* Dmitry Stadnik (Borland) - initial API and implementation
|
|
11 |
*/
|
|
12 |
|
|
13 |
«IMPORT "http://www.eclipse.org/gmf/2008/GenModel"»
|
|
14 |
«IMPORT "http://www.eclipse.org/emf/2002/Ecore"»
|
|
15 |
«IMPORT "http://www.eclipse.org/emf/2002/GenModel"»
|
|
16 |
|
|
17 |
«EXTENSION xpt::GenModelUtils»
|
|
18 |
|
|
19 |
«DEFINE ReorientRefLinkCommand FOR gmfgen::GenLink-»
|
|
20 |
«EXPAND xpt::Common::copyright FOR diagram.editorGen-»
|
|
21 |
package «diagram.editCommandsPackageName»;
|
|
22 |
|
|
23 |
«EXPAND xpt::Common::generatedClassComment»
|
|
24 |
public class «reorientCommandClassName» extends org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand {
|
|
25 |
|
|
26 |
«EXPAND xpt::Common::generatedMemberComment»
|
|
27 |
private final int reorientDirection;
|
|
28 |
|
|
29 |
«EXPAND xpt::Common::generatedMemberComment»
|
|
30 |
private final org.eclipse.emf.ecore.EObject referenceOwner;
|
|
31 |
|
|
32 |
«EXPAND xpt::Common::generatedMemberComment»
|
|
33 |
private final org.eclipse.emf.ecore.EObject oldEnd;
|
|
34 |
|
|
35 |
«EXPAND xpt::Common::generatedMemberComment»
|
|
36 |
private final org.eclipse.emf.ecore.EObject newEnd;
|
|
37 |
|
|
38 |
«EXPAND xpt::Common::generatedMemberComment»
|
|
39 |
public «reorientCommandClassName»(org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest request) {
|
|
40 |
super(request.getLabel(), null, request);
|
|
41 |
reorientDirection = request.getDirection();
|
|
42 |
referenceOwner = request.getReferenceOwner();
|
|
43 |
oldEnd = request.getOldRelationshipEnd();
|
|
44 |
newEnd = request.getNewRelationshipEnd();
|
|
45 |
}
|
|
46 |
«EXPAND xpt::diagram::commands::ReorientLinkUtils::canReorient(this) FOR modelFacet-»
|
|
47 |
«EXPAND xpt::diagram::commands::ReorientLinkUtils::reorient FOR modelFacet-»
|
|
48 |
«EXPAND xpt::diagram::commands::ReorientLinkUtils::accessors-»
|
|
49 |
}
|
|
50 |
«ENDDEFINE»
|