01: /*******************************************************************************
02: * Copyright (c) 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.core.text.cheatsheet.simple;
11:
12: import java.util.ArrayList;
13: import java.util.List;
14:
15: import org.eclipse.pde.internal.core.icheatsheet.simple.ISimpleCSCommand;
16: import org.eclipse.pde.internal.core.icheatsheet.simple.ISimpleCSModel;
17:
18: /**
19: * SimpleCSCommand
20: *
21: */
22: public class SimpleCSCommand extends SimpleCSRunObject implements
23: ISimpleCSCommand {
24:
25: private static final long serialVersionUID = 1L;
26:
27: // TODO: MP: TEO: HIGH: Verify translate attribute values okay - no translate before
28:
29: /**
30: * @param model
31: */
32: public SimpleCSCommand(ISimpleCSModel model) {
33: super (model, ELEMENT_COMMAND);
34: }
35:
36: /* (non-Javadoc)
37: * @see org.eclipse.pde.internal.core.icheatsheet.simple.ISimpleCSCommand#getReturns()
38: */
39: public String getReturns() {
40: return getXMLAttributeValue(ATTRIBUTE_RETURNS);
41: }
42:
43: /* (non-Javadoc)
44: * @see org.eclipse.pde.internal.core.icheatsheet.simple.ISimpleCSCommand#getSerialization()
45: */
46: public String getSerialization() {
47: return getXMLAttributeValue(ATTRIBUTE_SERIALIZATION);
48: }
49:
50: /* (non-Javadoc)
51: * @see org.eclipse.pde.internal.core.icheatsheet.simple.ISimpleCSCommand#setReturns(java.lang.String)
52: */
53: public void setReturns(String returns) {
54: setXMLAttribute(ATTRIBUTE_RETURNS, returns);
55: }
56:
57: /* (non-Javadoc)
58: * @see org.eclipse.pde.internal.core.icheatsheet.simple.ISimpleCSCommand#setSerialization(java.lang.String)
59: */
60: public void setSerialization(String serialization) {
61: setXMLAttribute(ATTRIBUTE_SERIALIZATION, serialization);
62: }
63:
64: /* (non-Javadoc)
65: * @see org.eclipse.pde.internal.core.text.cheatsheet.simple.SimpleCSObject#getChildren()
66: */
67: public List getChildren() {
68: return new ArrayList();
69: }
70:
71: /* (non-Javadoc)
72: * @see org.eclipse.pde.internal.core.text.cheatsheet.simple.SimpleCSObject#getName()
73: */
74: public String getName() {
75: // Leave as is. Not a separate node in tree view
76: return ELEMENT_COMMAND;
77: }
78:
79: /* (non-Javadoc)
80: * @see org.eclipse.pde.internal.core.text.cheatsheet.simple.SimpleCSObject#getType()
81: */
82: public int getType() {
83: return TYPE_COMMAND;
84: }
85:
86: /* (non-Javadoc)
87: * @see org.eclipse.pde.internal.core.text.plugin.PluginDocumentNode#isLeafNode()
88: */
89: public boolean isLeafNode() {
90: return true;
91: }
92:
93: }
|