MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / PluginsPlugin

Class PluginsPlugin

src/main/java/fieldbox/boxes/plugins/PluginsPlugin.java:13–26  ·  view source on GitHub ↗

Let's you edit the plugin file (~/.field/plugins.edn). This is the smallest possible plugin, it's all static. But these definitions allow you to edit EDN and .txt files directly in Field by dragging them onto the canvas. Later on we might have some UI for automatically adding a box for some of t

Source from the content-addressed store, hash-verified

11 * Later on we might have some UI for automatically adding a box for some of the more common config files and a reload action for them.
12 */
13public class PluginsPlugin extends Box {
14
15 static public final Dict.Prop<String> edn = new Dict.Prop<String>("edn").toCanon().doc("EDN (or Field configuration file)").type();
16 static public final Dict.Prop<String> txt = new Dict.Prop<String>("txt").toCanon().doc("TXT (or Field configuration file)").type();
17
18 static {
19 FieldBox.fieldBox.io.addFilespec("edn", "edn", "clojure");
20 FieldBox.fieldBox.io.addFilespec("txt", "txt", "text");
21 }
22
23 public PluginsPlugin(Box root) {
24
25 }
26}

Callers

nothing calls this directly

Calls 4

typeMethod · 0.80
docMethod · 0.80
toCanonMethod · 0.80
addFilespecMethod · 0.80

Tested by

no test coverage detected