-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactions.xml
62 lines (61 loc) · 1.62 KB
/
actions.xml
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
<?xml version="1.0"?>
<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
<ACTIONS>
<ACTION NAME="open-luaj-shell">
<CODE>
wm.addDockableWindow("console");
dockable = wm.getDockableWindow("console");
dockable.setShell("LuaJ");
</CODE>
</ACTION>
<ACTION NAME="luaj-eval-selected">
<CODE>
text = textArea.getSelectedText();
if (text == null) {
return;
}
wm.addDockableWindow("console");
dockable = wm.getDockableWindow("console");
shell = console.Shell.getShell("LuaJ");
shell.evalCode(dockable, text);
</CODE>
</ACTION>
<ACTION NAME="luaj-print-selected">
<CODE>
text = textArea.getSelectedText();
if (text == null) {
return;
}
wm.addDockableWindow("console");
dockable = wm.getDockableWindow("console");
shell = console.Shell.getShell("LuaJ");
shell.evalCode(dockable, "print(" + text + ")");
</CODE>
</ACTION>
<ACTION NAME="luaj-eval-buffer">
<CODE>
wm.addDockableWindow("console");
dockable = wm.getDockableWindow("console");
shell = console.Shell.getShell("LuaJ");
if (buffer.isNewFile()) {
shell.evalCode(dockable, buffer.getText(0, buffer.getLength()));
} else {
shell.evalBuffer(dockable, buffer);
}
</CODE>
</ACTION>
<ACTION NAME="luaj-eval-file">
<CODE>
dialog = new VFSFileChooserDialog(view, buffer.getDirectory(),
VFSBrowser.OPEN_DIALOG, false, true);
files = dialog.getSelectedFiles();
if (files != null) {
wm.addDockableWindow("console");
dockable = wm.getDockableWindow("console");
shell = console.Shell.getShell("LuaJ");
f = new File(files[0]);
shell.evalFile(dockable, f);
}
</CODE>
</ACTION>
</ACTIONS>