| | | 1 | try {↵
|
1 | TestElement timer = (TestElement) template.clone();↵ | | 2 | TestElement element = (TestElement) te↵
|
2 | try {↵ | | 3 | stBeanClass.newInstance();↵
|
| | | 4 | // configure(element);↵
|
3 | replacer.undoReverseReplace(timer);↵ | | 5 | ↵
|
4 | model.addComponent(timer, node);↵ | | |
|
5 | } catch (InvalidVariableException e) {↵ | | |
|
6 | // Not 100% sure, but I believe this can't happen, so↵ | | |
|
7 | // I'll log and throw an error:↵ | | |
|
8 | log.error("↵ | | 6 | // super.clear(); // set name, enabled.↵
|
| | | 7 | modifyTestElement(element); // put the default values back into the↵
|
| | | 8 | // new element↵
|
| | | 9 | return element;↵
|
| | | 10 | } catch (InstantiationException e) {↵
|
| | | 11 | log.error("Can't create test element", e);↵
|
9 | Program error", e);↵ | | 12 | throw new Error(e.toString()); // Programming error. Don't↵
|
10 | throw new Error(e);↵ | | 13 | ↵
|
11 | ↵ | | 14 | // continue.↵
|
12 | } catch (IllegalUserActionException e) {↵ | | 15 | } catch (IllegalAccessException e) {↵
|
13 | // Not 100% sure, but I believe this can't happen, so↵ | | 16 | ↵
|
14 | // I'll log and throw an error:↵ | | |
|
15 | log.error("↵ | | 17 | log.error("Can't create test element", e);↵
|
16 | Program error", e);↵ | | 18 | throw new Error(e.toString()); // Programming error. Don't↵
|
17 | throw new Error(e);↵ | | 19 | ↵
|
18 | ↵ | | 20 | // continue.↵
|
19 | } | | 21 | }
|