blob: 5b0b93c26aad1dd454ee87fbf8b659472c74b375 [file] [log] [blame]
kchonge0590cf2006-04-19 14:44:09 +00001/*******************************************************************************
2 * Copyright (c) 2001, 2006 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
csaltera28ae452006-04-16 22:04:44 +000011package org.eclipse.wst.xsd.ui.internal.common.commands;
12
13import org.eclipse.gef.commands.Command;
14import org.w3c.dom.Element;
15
16/*
17 * This command is used from the extension view to edit extension elements
18 * and attributes which are implemented as DOM objects (not part of the EMF model)
19 */
20public class UpdateAttributeValueCommand extends Command
21{
22 Element element;
23 String attributeName;
24 String attributeValue;
25
26 public UpdateAttributeValueCommand(Element element, String attributeName, String attributeValue)
27 {
28 this.element = element;
29 this.attributeName = attributeName;
30 this.attributeValue = attributeValue;
31 }
32
33
34 public void execute()
35 {
36 element.setAttribute(attributeName, attributeValue);
37 }
38}