- if (structureElementArg != null)\r
- getRegistry().register(treeSPath,\r
- structureElementArg.getStructureElement());\r
- else\r
- getRegistry().register(treeSPath, this);\r
+ if (getRegistry().getElement(treeSPath) == null) {\r
+ // No structure element registered.\r
+ if (structureElementArg != null) {\r
+ getRegistry().register(treeSPath,\r
+ structureElementArg.getStructureElement());\r
+ } else {\r
+ if (getDescription() != null) {\r
+ getRegistry().register(treeSPath,\r
+ new SimpleSElement(getDescription()));\r
+ }\r
+ }\r
+ }\r