1
2
3
4
5
6
7
8
9
10
11
12 package sk.uniba.euromath.editor.xmlEditor.actions;
13
14 import java.util.ArrayList;
15 import java.util.List;
16
17 import org.eclipse.ui.IWorkbenchPart;
18
19 import sk.uniba.euromath.editor.xmlEditor.actions.lang.Messages;
20
21 /***
22 * Selects node(or part, depends on id) specified by id in constructor.
23 *
24 * @author Tomáš Studva 9.7.2005
25 */
26 public class SelectAction extends XMLAccessModifyAction {
27
28 /***
29 * Default id of action.
30 */
31 public static final String id = SelectAction.class.toString();
32
33 /***
34 * Id of (part of) node to select.
35 */
36 private final String nodeId;
37
38 /***
39 * Constructor.
40 *
41 * @param id
42 * of node to select
43 * @param part
44 */
45 public SelectAction(String id, IWorkbenchPart part) {
46 super(part);
47 this.nodeId = id;
48 setId(SelectAction.id);
49 setText(Messages.getString("SelectAction.Text"));
50 }
51
52 /***
53 * Selects node with id = nodeId in selection provider.
54 */
55 @Override
56 public void run() {
57 List<String> data = new ArrayList<String>();
58 data.add(getNodeId());
59
60
61
62 }
63
64 /***
65 * @return Returns the id.
66 */
67 protected String getNodeId() {
68 return this.nodeId;
69 }
70
71 }