notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r1531 - in development/main: central magic/core/src/main/net/dpml/magic magic/core/src/main/net/dpml/magic/tasks
- From: mcconnell AT netcompartner.com
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r1531 - in development/main: central magic/core/src/main/net/dpml/magic magic/core/src/main/net/dpml/magic/tasks
- Date: Wed, 19 Jan 2005 03:47:34 +0100
Author: mcconnell
Date: Wed Jan 19 03:47:32 2005
New Revision: 1531
Modified:
development/main/central/index.xml
development/main/magic/core/src/main/net/dpml/magic/Index.java
development/main/magic/core/src/main/net/dpml/magic/tasks/ModuleTask.java
Log:
Correct logic concerning uri/key switch.
Modified: development/main/central/index.xml
==============================================================================
--- development/main/central/index.xml (original)
+++ development/main/central/index.xml Wed Jan 19 03:47:32 2005
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<index key="dpml-central">
+<index>
<import index="../magic/index.xml"/>
<import index="../metro/index.xml"/>
Modified: development/main/magic/core/src/main/net/dpml/magic/Index.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/Index.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/Index.java Wed
Jan 19 03:47:32 2005
@@ -504,7 +504,7 @@
final Element[] elements = ElementHelper.getChildren( root );
final File anchor = source.getParentFile();
- if( ( null != key ) || ( key.length() > 0 ) )
+ if( ( null != key ) && ( key.length() > 0 ) )
{
buildLocalList( anchor, elements, "key:" + key );
}
Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/ModuleTask.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/tasks/ModuleTask.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/tasks/ModuleTask.java
Wed Jan 19 03:47:32 2005
@@ -147,7 +147,6 @@
try
{
writer.write( "<?xml version=\"1.0\"
encoding=\"ISO-8859-1\"?>" );
- //writer.write( "\n\n<module group=\"" + group + "\"
version=\"" + version + "\">" );
writer.write( "\n\n<module uri=\"" +
definition.getInfo().getURI() + "\">" );
writeHeader( writer, getHeader() );
writeModule( writer, definition );
@@ -176,12 +175,18 @@
protected void writeModule( final Writer writer, Definition definition )
throws IOException
{
+System.out.println( "#MODULE: " + definition );
+
Definition[] definitions =
getPrivateIndex().getSubsidiaryDefinitions( definition );
+
List includes = new ArrayList();
List modules = new ArrayList();
for( int i=0; i<definitions.length; i++ )
{
Definition def = definitions[i];
+
+System.out.println( "#SUB-DEF: " + def );
+
expand( definition, def, includes, modules );
}
@@ -193,6 +198,8 @@
writer.write( "\n\n <!-- imports -->\n" );
for( int i=0; i<uris.length; i++ )
{
+System.out.println( "#EXPANDED: " + uris[i] );
+
writer.write( "\n <import uri=\"" + uris[i] + "\"/>" );
}
}
@@ -302,7 +309,6 @@
String module = resource.getModule();
if(( null != module ) && !"".equals( module ) && !modules.contains(
module ) )
{
-
if( !module.equals( definition.getInfo().getURI() ) )
{
modules.add( module );
- svn commit: r1531 - in development/main: central magic/core/src/main/net/dpml/magic magic/core/src/main/net/dpml/magic/tasks, mcconnell, 01/18/2005
Archive powered by MHonArc 2.6.24.