422
|
1 |
/*
|
|
2 |
* Copyright (c) 2006 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 |
|
|
15 |
«DEFINE BaseEditHelper FOR gmfgen::GenDiagram-»
|
|
16 |
«EXPAND xpt::Common::copyright FOR editorGen-»
|
|
17 |
package «editHelpersPackageName»;
|
|
18 |
|
|
19 |
«EXPAND xpt::Common::generatedClassComment»
|
|
20 |
public class «baseEditHelperClassName» extends org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper {
|
|
21 |
|
|
22 |
«EXPAND xpt::Common::generatedMemberComment»
|
|
23 |
public static final String EDIT_POLICY_COMMAND = "edit policy command"; //$NON-NLS-1$
|
|
24 |
|
|
25 |
«EXPAND xpt::Common::generatedMemberComment»
|
|
26 |
protected org.eclipse.gmf.runtime.common.core.command.ICommand getInsteadCommand(
|
|
27 |
org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest req) {
|
|
28 |
org.eclipse.gmf.runtime.common.core.command.ICommand epCommand =
|
|
29 |
(org.eclipse.gmf.runtime.common.core.command.ICommand) req.getParameter(EDIT_POLICY_COMMAND);
|
|
30 |
req.setParameter(EDIT_POLICY_COMMAND, null);
|
|
31 |
org.eclipse.gmf.runtime.common.core.command.ICommand ehCommand = super.getInsteadCommand(req);
|
|
32 |
if (epCommand == null) {
|
|
33 |
return ehCommand;
|
|
34 |
}
|
|
35 |
if (ehCommand == null) {
|
|
36 |
return epCommand;
|
|
37 |
}
|
|
38 |
org.eclipse.gmf.runtime.common.core.command.CompositeCommand command =
|
|
39 |
new org.eclipse.gmf.runtime.common.core.command.CompositeCommand(null);
|
|
40 |
command.add(epCommand);
|
|
41 |
command.add(ehCommand);
|
|
42 |
return command;
|
|
43 |
}
|
|
44 |
|
|
45 |
«EXPAND xpt::Common::generatedMemberComment»
|
|
46 |
protected org.eclipse.gmf.runtime.common.core.command.ICommand getCreateCommand(
|
|
47 |
org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req) {
|
|
48 |
return null;
|
|
49 |
}
|
|
50 |
|
|
51 |
«EXPAND xpt::Common::generatedMemberComment»
|
|
52 |
protected org.eclipse.gmf.runtime.common.core.command.ICommand getCreateRelationshipCommand(
|
|
53 |
org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest req) {
|
|
54 |
return null;
|
|
55 |
}
|
|
56 |
|
|
57 |
«EXPAND xpt::Common::generatedMemberComment»
|
|
58 |
protected org.eclipse.gmf.runtime.common.core.command.ICommand getDestroyElementCommand(
|
|
59 |
org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest req) {
|
|
60 |
return null;
|
|
61 |
}
|
|
62 |
|
|
63 |
«EXPAND xpt::Common::generatedMemberComment»
|
|
64 |
protected org.eclipse.gmf.runtime.common.core.command.ICommand getDestroyReferenceCommand(
|
|
65 |
org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest req) {
|
|
66 |
return null;
|
|
67 |
}
|
|
68 |
«EXPAND additions-»
|
|
69 |
}
|
|
70 |
«ENDDEFINE»
|
|
71 |
|
|
72 |
«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE»
|