Skip to main content
summaryrefslogtreecommitdiffstats
blob: 00eed906e14d4a605af19844378e07a70297b81e (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
/*******************************************************************************
 * Copyright (c) 2003, 2004 IBM Corporation and others.
 * 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:
 * IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.wst.common.internal.emfworkbench.integration;

import org.eclipse.emf.common.command.Command;



/**
 * Insert the type's description here. Creation date: (05/22/01 8:57:00 AM)
 * 
 * @author: Administrator
 */
public abstract class EditModelCommand extends AbstractEditModelCommand {
	protected EditModelCommand() {
		super();
	}

	public EditModelCommand(Command targetCommand) {
		super(targetCommand);
	}

	public boolean canUndo() {
		return getTarget().canUndo();
	}

	protected abstract void executeInModel(AbstractEditModelCommand cmd);

	public EditModelCommand getEditModelCommand() {
		return this;
	}

	public String getLabel() {
		return getTarget().getLabel();
	}

	public void invertAndPush() {
		executeInModel(this.inverted());
	}
}

Back to the top