import org.apache.tools.ant.Project;\r
import org.apache.tools.ant.helper.ProjectHelperImpl;\r
\r
-import org.argeo.slc.core.structure.StructurePath;\r
import org.argeo.slc.core.structure.tree.TreeSElement;\r
import org.argeo.slc.core.structure.tree.TreeSPath;\r
import org.argeo.slc.core.structure.tree.TreeSRegistry;\r
\r
public class SlcProjectHelper extends ProjectHelperImpl {\r
public static String PROP_APPLICATION_CONTEXT = "org.argeo.slc.slcRootContext";\r
+ //public static String PROP_REGISTRY_MODE = "org.argeo.slc.slcRegistryMode";\r
public static String REF_ROOT_CONTEXT = "slcApplicationContext";\r
public static String REF_STRUCTURE_REGISTRY = "slcStructureRegistry";\r
\r
ApplicationContext context = new FileSystemXmlApplicationContext(acPath);\r
project.addReference(REF_ROOT_CONTEXT, context);\r
\r
- // init structure register\r
- TreeSRegistry registry = new TreeSRegistry();\r
- project.addReference(REF_STRUCTURE_REGISTRY, registry);\r
+ // init structure register if it does not exist\r
+ TreeSRegistry registry = new TreeSRegistry();\r
+ project.addReference(REF_STRUCTURE_REGISTRY, registry);\r
\r
- // call the underlying implementation to do the actual work\r
- super.parse(project, source);\r
+ // call the underlying implementation to do the actual work\r
+ super.parse(project, source);\r
\r
- String projectDescription = project.getDescription() != null ? project\r
- .getDescription() : "Root";\r
- TreeSElement element = TreeSElement.createRootElelment(\r
- getProjectPathName(project), projectDescription);\r
- registry.register(element);\r
+ String projectDescription = project.getDescription() != null ? project\r
+ .getDescription()\r
+ : "Root";\r
+ TreeSElement element = TreeSElement.createRootElelment(\r
+ getProjectPathName(project), projectDescription);\r
+ registry.register(element);\r
}\r
\r
private static void stdOut(Object o) {\r