Skip to Content.
Sympa Menu

notify-dpml - r1536 - in trunk/main: depot/library/src/main/net/dpml/library/impl depot/library/src/main/net/dpml/library/info depot/library/src/test/net/dpml/library/impl depot/tools/builder/etc/prefs/themes/formal/html/resources/styles depot/tools/builder/etc/prefs/themes/modern/html/resources/styles transit/core/src/main/net/dpml/lang

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1536 - in trunk/main: depot/library/src/main/net/dpml/library/impl depot/library/src/main/net/dpml/library/info depot/library/src/test/net/dpml/library/impl depot/tools/builder/etc/prefs/themes/formal/html/resources/styles depot/tools/builder/etc/prefs/themes/modern/html/resources/styles transit/core/src/main/net/dpml/lang
  • Date: Tue, 4 Jul 2006 09:43:24 +0200

Author: mcconnell
Date: 2006-07-04 09:42:22 +0200 (Tue, 04 Jul 2006)
New Revision: 1536

Modified:

trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultResource.java

trunk/main/depot/library/src/main/net/dpml/library/info/IncludeDirective.java
trunk/main/depot/library/src/main/net/dpml/library/info/LibraryDecoder.java

trunk/main/depot/library/src/main/net/dpml/library/info/ResourceDirective.java

trunk/main/depot/library/src/test/net/dpml/library/impl/DefaultResourceTestCase.java

trunk/main/depot/tools/builder/etc/prefs/themes/formal/html/resources/styles/style.css

trunk/main/depot/tools/builder/etc/prefs/themes/modern/html/resources/styles/style.css
trunk/main/transit/core/src/main/net/dpml/lang/Category.java
Log:
resolve issue relating to non-runtime dependency management

Modified:
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultResource.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultResource.java
2006-07-03 14:42:38 UTC (rev 1535)
+++
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultResource.java
2006-07-04 07:42:22 UTC (rev 1536)
@@ -956,7 +956,7 @@
catch( URISyntaxException e )
{
final String error =
- "Invalid urn value: " + include.getValue();
+ "Invalid uri value: " + include.getValue();
throw new RuntimeException( error, e );
}
catch( InvalidNameException e )
@@ -1173,9 +1173,10 @@
{
ArrayList list = new ArrayList();
for( int i=0; i<category.getValue(); i++ )
- {
+ {
+ Category c = Category.parse( i );
DefaultResource[] collection =
- getDefaultProviders( Scope.RUNTIME, true, Category.values()[i]
);
+ getDefaultProviders( Scope.RUNTIME, true, c );
for( int j=0; j<collection.length; j++ )
{
list.add( collection[j] );

Modified:
trunk/main/depot/library/src/main/net/dpml/library/info/IncludeDirective.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/IncludeDirective.java
2006-07-03 14:42:38 UTC (rev 1535)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/IncludeDirective.java
2006-07-04 07:42:22 UTC (rev 1536)
@@ -71,7 +71,7 @@
}
if( null == category )
{
- m_category = Category.PRIVATE; // was PUBLIC
+ m_category = Category.UNDEFINED; // was PRIVATE
}
else
{

Modified:
trunk/main/depot/library/src/main/net/dpml/library/info/LibraryDecoder.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/LibraryDecoder.java
2006-07-03 14:42:38 UTC (rev 1535)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/LibraryDecoder.java
2006-07-04 07:42:22 UTC (rev 1536)
@@ -421,17 +421,19 @@
{
String name = element.getTagName();
Scope scope = Scope.parse( name );
- IncludeDirective[] includes = buildIncludeDirectives( element );
if( Scope.BUILD.equals( scope ) )
{
+ IncludeDirective[] includes = buildIncludeDirectives( element,
false );
return new DependencyDirective( Scope.BUILD, includes );
}
else if( Scope.RUNTIME.equals( scope ) )
{
+ IncludeDirective[] includes = buildIncludeDirectives( element,
true );
return new DependencyDirective( Scope.RUNTIME, includes );
}
else
{
+ IncludeDirective[] includes = buildIncludeDirectives( element,
false );
return new DependencyDirective( Scope.TEST, includes );
}
}
@@ -439,28 +441,28 @@
/**
* Build an array of include directives contained within the supplied
enclosing element.
* @param element the enclosing element
+ * @param flag if category processing is required
* @return the array of includes
*/
- private IncludeDirective[] buildIncludeDirectives( Element element )
throws DecodingException
+ private IncludeDirective[] buildIncludeDirectives( Element element,
boolean flag ) throws DecodingException
{
Element[] children = ElementHelper.getChildren( element );
IncludeDirective[] includes = new IncludeDirective[ children.length
];
for( int i=0; i<children.length; i++ )
{
Element child = children[i];
- includes[i] = buildIncludeDirective( child );
+ includes[i] = buildIncludeDirective( child, flag );
}
return includes;
}

- private IncludeDirective buildIncludeDirective( Element element ) throws
DecodingException
+ private IncludeDirective buildIncludeDirective( Element element, boolean
flag ) throws DecodingException
{
final String tag = element.getTagName();
final Properties properties = buildProperties( element );
if( INCLUDE_ELEMENT_NAME.equals( tag ) )
{
- final String tagValue = ElementHelper.getAttribute( element,
"tag", "private" );
- Category category = Category.parse( tagValue );
+ Category category = buildCategory( element, flag );
if( element.hasAttribute( "key" ) )
{
final String value = ElementHelper.getAttribute( element,
"key", null );
@@ -494,6 +496,20 @@
}
}

+ private Category buildCategory( Element element, boolean flag )
+ {
+ if( !flag )
+ {
+ return Category.UNDEFINED;
+ }
+ else
+ {
+ final String value = ElementHelper.getAttribute( element, "tag",
"private" );
+ return Category.parse( value );
+ }
+ }
+
+
private ResourceDirective buildResourceDirective( File base, Element
element ) throws Exception
{
return buildResourceDirective( base, element, null );

Modified:
trunk/main/depot/library/src/main/net/dpml/library/info/ResourceDirective.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/ResourceDirective.java
2006-07-03 14:42:38 UTC (rev 1535)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/ResourceDirective.java
2006-07-04 07:42:22 UTC (rev 1536)
@@ -399,6 +399,10 @@
{
return false;
}
+ else if( !equals( m_scheme, object.m_scheme ) )
+ {
+ return false;
+ }
else if( !equals( m_version, object.m_version ) )
{
return false;
@@ -434,6 +438,7 @@
{
int hash = super.hashCode();
hash ^= super.hashValue( m_name );
+ hash ^= super.hashValue( m_scheme );
hash ^= super.hashValue( m_version );
hash ^= super.hashValue( m_basedir );
hash ^= super.hashValue( m_info );

Modified:
trunk/main/depot/library/src/test/net/dpml/library/impl/DefaultResourceTestCase.java
===================================================================
---
trunk/main/depot/library/src/test/net/dpml/library/impl/DefaultResourceTestCase.java
2006-07-03 14:42:38 UTC (rev 1535)
+++
trunk/main/depot/library/src/test/net/dpml/library/impl/DefaultResourceTestCase.java
2006-07-04 07:42:22 UTC (rev 1536)
@@ -351,6 +351,9 @@
doClasspathChainTest( "dpml/metro/dpml-composition-runtime", 0, 2,
7, 3 );
doClasspathChainTest( "dpml/tools/dpml-tools-ant", 4, 0, 0, 5 );
doClasspathChainTest( "dpml/transit/dpml-transit-tools", 0, 0, 0, 3
);
+ //doClasspathChainTest( "dpml/metro/dpml-composition-runtime" );
+ //doClasspathChainTest( "dpml/tools/dpml-tools-ant" );
+ //doClasspathChainTest( "dpml/transit/dpml-transit-tools" );
}

/**

Modified:
trunk/main/depot/tools/builder/etc/prefs/themes/formal/html/resources/styles/style.css
===================================================================
---
trunk/main/depot/tools/builder/etc/prefs/themes/formal/html/resources/styles/style.css
2006-07-03 14:42:38 UTC (rev 1535)
+++
trunk/main/depot/tools/builder/etc/prefs/themes/formal/html/resources/styles/style.css
2006-07-04 07:42:22 UTC (rev 1536)
@@ -556,7 +556,7 @@
border: none;
}

-p, td, th, pre, li
+p, td, th, li
{
font-size: 70%;
}

Modified:
trunk/main/depot/tools/builder/etc/prefs/themes/modern/html/resources/styles/style.css
===================================================================
---
trunk/main/depot/tools/builder/etc/prefs/themes/modern/html/resources/styles/style.css
2006-07-03 14:42:38 UTC (rev 1535)
+++
trunk/main/depot/tools/builder/etc/prefs/themes/modern/html/resources/styles/style.css
2006-07-04 07:42:22 UTC (rev 1536)
@@ -548,7 +548,7 @@
border: none;
}

-p, td, th, pre, li
+p, td, th, li
{
font-size: 80%;
}

Modified: trunk/main/transit/core/src/main/net/dpml/lang/Category.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/lang/Category.java
2006-07-03 14:42:38 UTC (rev 1535)
+++ trunk/main/transit/core/src/main/net/dpml/lang/Category.java
2006-07-04 07:42:22 UTC (rev 1536)
@@ -28,6 +28,11 @@
static final long serialVersionUID = 1L;

/**
+ * Undefined category.
+ */
+ public static final Category UNDEFINED = new Category( "undefined", -1 );
+
+ /**
* System category.
*/
public static final Category SYSTEM = new Category( "system", 0 );
@@ -48,11 +53,6 @@
public static final Category PRIVATE = new Category( "private", 3 );

/**
- * Implied category.
- */
- public static final Category IMPLICIT = new Category( "implicit", 3 );
-
- /**
* Array of scope enumeration values.
*/
private static final Category[] ENUM_VALUES =
@@ -61,8 +61,8 @@
SYSTEM,
PUBLIC,
PROTECTED,
- PRIVATE,
- IMPLICIT
+ PRIVATE,
+ UNDEFINED
};

/**
@@ -94,6 +94,42 @@
}

/**
+ * Create a category by parsing the supplied value.
+ * @param value the category name
+ * @return the corresponding category
+ * @exception IllegalArgumentException if the value is not recognized
+ */
+ public static Category parse( int value ) throws IllegalArgumentException
+ {
+ if( SYSTEM.getValue() == value )
+ {
+ return SYSTEM;
+ }
+ else if( PUBLIC.getValue() == value )
+ {
+ return PUBLIC;
+ }
+ else if( PROTECTED.getValue() == value )
+ {
+ return PROTECTED;
+ }
+ else if( PRIVATE.getValue() == value )
+ {
+ return PRIVATE;
+ }
+ else if( UNDEFINED.getValue() == value )
+ {
+ return UNDEFINED;
+ }
+ else
+ {
+ final String error =
+ "Unrecognized category value [" + value + "]";
+ throw new IllegalArgumentException( error );
+ }
+ }
+
+ /**
* Create a category by parsing the supplied name.
* @param value the category name
* @return the corresponding category
@@ -117,9 +153,9 @@
{
return PRIVATE;
}
- else if( value.equalsIgnoreCase( "implicit" ) )
+ else if( value.equalsIgnoreCase( "undefined" ) )
{
- return IMPLICIT;
+ return UNDEFINED;
}
else
{




  • r1536 - in trunk/main: depot/library/src/main/net/dpml/library/impl depot/library/src/main/net/dpml/library/info depot/library/src/test/net/dpml/library/impl depot/tools/builder/etc/prefs/themes/formal/html/resources/styles depot/tools/builder/etc/prefs/themes/modern/html/resources/styles transit/core/src/main/net/dpml/lang, mcconnell at BerliOS, 07/04/2006

Archive powered by MHonArc 2.6.24.

Top of Page