-
Notifications
You must be signed in to change notification settings - Fork 0
/
actions.xml
52 lines (51 loc) · 1.41 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
<?xml version="1.0"?>
<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
<ACTIONS>
<ACTION NAME="open-clojure-shell">
<CODE>
wm.addDockableWindow("console");
dockable = wm.getDockableWindow("console");
dockable.setShell("Clojure");
</CODE>
</ACTION>
<ACTION NAME="clojure-eval-selected">
<CODE>
text = textArea.getSelectedText();
if (text == null) {
return;
}
wm.addDockableWindow("console");
dockable = wm.getDockableWindow("console");
shell = console.Shell.getShell("Clojure");
shell.eval(dockable, text);
</CODE>
</ACTION>
<ACTION NAME="clojure-eval-buffer">
<CODE>
wm.addDockableWindow("console");
dockable = wm.getDockableWindow("console");
shell = console.Shell.getShell("Clojure");
if (buffer.isNewFile()) {
shell.eval(dockable, buffer.getText(0, buffer.getLength()));
} else {
shell.evalBuffer(dockable, buffer);
}
</CODE>
</ACTION>
<ACTION NAME="clojure-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("Clojure");
f = new File(files[0]);
buffer = jEdit.openTemporary(view, f.getParent(), f.getName(),
false);
shell.evalBuffer(dockable, buffer);
}
</CODE>
</ACTION>
</ACTIONS>