Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: f0317ad9a49c700ca583b93e0cac0fbea7ac5c1a (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
61
62
63
64
65
66
67
68
69
70
71
72
/*
 * Copyright (c) 2006 Borland Software Corporation
 * 
 * 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:
 *    Dmitry Stadnik (Borland) - initial API and implementation
 */

«IMPORT "http://www.eclipse.org/gmf/2008/GenModel"»

«DEFINE BaseEditHelper FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::copyright FOR editorGen-»
package «editHelpersPackageName»;

«EXPAND xpt::Common::generatedClassComment»
public class «baseEditHelperClassName» extends org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper {

	«EXPAND xpt::Common::generatedMemberComment»
	public static final String EDIT_POLICY_COMMAND = "edit policy command"; //$NON-NLS-1$

	«EXPAND xpt::Common::generatedMemberComment»
	protected org.eclipse.gmf.runtime.common.core.command.ICommand getInsteadCommand(
			org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest req) {
		org.eclipse.gmf.runtime.common.core.command.ICommand epCommand =
				(org.eclipse.gmf.runtime.common.core.command.ICommand) req.getParameter(EDIT_POLICY_COMMAND);
		req.setParameter(EDIT_POLICY_COMMAND, null);
		org.eclipse.gmf.runtime.common.core.command.ICommand ehCommand = super.getInsteadCommand(req);
		if (epCommand == null) {
			return ehCommand;
		}
		if (ehCommand == null) {
			return epCommand;
		}
		org.eclipse.gmf.runtime.common.core.command.CompositeCommand command =
				new org.eclipse.gmf.runtime.common.core.command.CompositeCommand(null);
		command.add(epCommand);
		command.add(ehCommand);
		return command;
	}

	«EXPAND xpt::Common::generatedMemberComment»
	protected org.eclipse.gmf.runtime.common.core.command.ICommand getCreateCommand(
			org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req) {
		return null;
	}

	«EXPAND xpt::Common::generatedMemberComment»
	protected org.eclipse.gmf.runtime.common.core.command.ICommand getCreateRelationshipCommand(
			org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest req) {
		return null;
	}

	«EXPAND xpt::Common::generatedMemberComment»
	protected org.eclipse.gmf.runtime.common.core.command.ICommand getDestroyElementCommand(
			org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest req) {
		return null;
	}

	«EXPAND xpt::Common::generatedMemberComment»
	protected org.eclipse.gmf.runtime.common.core.command.ICommand getDestroyReferenceCommand(
			org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest req) {
		return null;
	}
	«EXPAND additions-»
}
«ENDDEFINE»

«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE»

Back to the top