1 | try {↵ | | |
|
2 | IExtension extension = pluginHandler.getExtension("Subjec↵ | | 1 | if (b) {↵
|
| | | 2 | // model -> view↵
|
| | | 3 | // read configuration and set gui elements appropriately↵
|
|
| | | 4 | // navigate to treenode "text"↵
|
3 | t");↵ | | 5 | XmlElement text = parent.getElement("/config/text");↵
|
|
4 | String uiId↵ | | 6 | // read attribute "value"↵
|
5 | = extension.getMetadata().getA↵ | | 7 | String attribute = text.getAttribute("value");↵
|
|
6 | ttribute("ui");↵ | | 8 | textField.setText(attribute);↵
|
|
7 | IExtension uiExtension = pluginUIHandler.getExtension(uiId);↵ | | 9 | ↵
|
|
8 | column = (DefaultCriteriaRow) uiExtension↵ | | 10 | } else {↵
|
| | | 11 | // view -> model↵
|
| | | 12 | // write configuration given the data the user entered in the gui↵
|
|
| | | 13 | XmlElement text = parent.getElement("/config/text");↵
|
| | | 14 | text.addAttribute("value", textField.getText());↵
|
9 | ↵ | | 15 | ↵
|
10 | .instanciateExtension(args↵ | | 16 | try↵
|
| | | 17 | {↵
|
11 | );↵ | | 18 | xmlFile.save();↵
|
12 | ↵ | | 19 | ↵
|
13 | } catch (Exception ex) ↵ | | 20 | } catch ( Exception ex)↵
|
14 | {↵ | | 21 | {↵
|
15 | ex.printStackTrace();↵ | | 22 | ex.printStackTrace();↵
|
16 | }↵ | | 23 | ↵
|
|
17 | criteria.setTypeString("Subject"); | | 24 | }↵
|
| | | 25 | }
|