1 package org.catacomb.druid.blocks;
2
3
4 import org.catacomb.druid.build.Context;
5 import org.catacomb.druid.build.Druid;
6 import org.catacomb.druid.build.GUIPath;
7 import org.catacomb.druid.build.Realizer;
8 import org.catacomb.report.E;
9
10
11 public class Insert implements Realizer {
12
13 public String name;
14 public String id;
15 public String source;
16 public String controllerClass;
17
18
19
20 public Object realize(Context ctx, GUIPath gpathin) {
21 GUIPath gpath = gpathin;
22
23 gpath = gpath.extend(id);
24
25 Druid druid = new Druid(source, ctx);
26
27 druid.buildGUI();
28
29 if (controllerClass != null && controllerClass.length() > 1) {
30
31 E.missing("Insert accesses druid? - probably shouldn't - " + "ignoring controller for now");
32
33 } else {
34 druid.selfActivate();
35 }
36
37 druid.setID(id);
38
39
40 ctx.addComponent(druid, gpath);
41
42
43
44
45 return druid.getRootComponent();
46 }
47
48
49
50 }