tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-tapestry/src/documentation/content/xdocs/QuickStart tutorials-structure.aart index.xml
Date Sat, 02 Jul 2005 22:51:24 GMT
hlship      2005/07/02 15:51:24

  Modified:    .        status.xml
               annotations/src/java/org/apache/tapestry/annotations
                        InjectStateAnnotationWorker.java
                        PersistAnnotationWorker.java
                        AnnotationMessages.java
                        MethodAnnotationEnhancementWorker.java
                        InjectMetaAnnotationWorker.java
                        InjectComponentAnnotationWorker.java
                        AnnotationStrings.properties
                        AssetAnnotationWorker.java
                        BeanAnnotationWorker.java
                        ComponentClassAnnotationWorker.java
                        AnnotationEnhancementWorker.java
                        InjectPageAnnotationWorker.java
                        ParameterAnnotationWorker.java
                        InjectAssetAnnotationWorker.java
                        InjectScriptAnnotationWorker.java
                        ClassAnnotationEnhancementWorker.java
                        ComponentAnnotationWorker.java
                        InjectObjectAnnotationWorker.java
                        MessageAnnotationWorker.java
               annotations/src/test/org/apache/tapestry/annotations
                        TestInjectObjectAnnotationWorker.java
                        TestComponentClassAnnotationWorker.java
                        TestSimpleAnnotationWorkers.java
                        TestPersistAnnotationWorker.java
                        TestComponentAnnotationWorker.java
                        TestParameterAnnotationWorker.java
                        TestAnnotationEnhancementWorker.java
                        TestAssetAnnotationWorker.java
                        TestInjectComponentAnnotationWorker.java
                        TestInjectStateAnnotationWorker.java
                        BaseAnnotationTestCase.java
                        TestMessageAnnotationWorker.java
                        TestInjectAssetAnnotationWorker.java
                        TestBeanAnnotationWorker.java
               src/documentation/content/xdocs links.ent
               src/documentation/content/xdocs/QuickStart
                        tutorials-structure.aart index.xml
  Added:       annotations/src/java/org/apache/tapestry/annotations
                        AnnotationLocation.java
  Log:
  TAPESTRY-355: Annotations bypass line precise exception reporting
  
  Revision  Changes    Path
  1.150     +1 -0      jakarta-tapestry/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/status.xml,v
  retrieving revision 1.149
  retrieving revision 1.150
  diff -u -r1.149 -r1.150
  --- status.xml	1 Jul 2005 20:42:03 -0000	1.149
  +++ status.xml	2 Jul 2005 22:51:23 -0000	1.150
  @@ -57,6 +57,7 @@
         <action type="fix" dev="HLS" fixes-bug="TAPESTRY-357">AbstractComponent: getMessages() and format() were removed, but should have been deprecated</action>
         <action type="fix" dev="HLS" fixes-bug="TAPESTRY-361">Using @Asset annotation causes NullPointerException</action>
         <action type="fix" dev="PF" fixes-bug="TAPESTRY-367">Removed obsolete "format" parameter from DatePicker</action>
  +      <action type="fix" dev="HLS" fixes-bug="TAPESTRY-355">Annotations bypass line precise exception reporting</action>
       </release>
       <release version="4.0-beta-1" date="Jun 24 2005">
          <action type="add" dev="HLS">Add InvokeListener component.</action>
  
  
  
  1.3       +2 -1      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/InjectStateAnnotationWorker.java
  
  Index: InjectStateAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/InjectStateAnnotationWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InjectStateAnnotationWorker.java	15 Jun 2005 13:34:30 -0000	1.2
  +++ InjectStateAnnotationWorker.java	2 Jul 2005 22:51:23 -0000	1.3
  @@ -16,6 +16,7 @@
   
   import java.lang.reflect.Method;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.engine.state.ApplicationStateManager;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.enhance.InjectStateWorker;
  @@ -44,7 +45,7 @@
       }
   
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method)
  +            Method method, Location location)
       {
           InjectState is = method.getAnnotation(InjectState.class);
   
  
  
  
  1.3       +3 -1      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/PersistAnnotationWorker.java
  
  Index: PersistAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/PersistAnnotationWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PersistAnnotationWorker.java	15 Jun 2005 13:34:30 -0000	1.2
  +++ PersistAnnotationWorker.java	2 Jul 2005 22:51:23 -0000	1.3
  @@ -16,6 +16,7 @@
   
   import java.lang.reflect.Method;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.IComponentSpecification;
   import org.apache.tapestry.spec.IPropertySpecification;
  @@ -33,7 +34,7 @@
   public class PersistAnnotationWorker implements MethodAnnotationEnhancementWorker
   {
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method)
  +            Method method, Location location)
       {
           Persist p = method.getAnnotation(Persist.class);
   
  @@ -44,6 +45,7 @@
   
           pspec.setName(propertyName);
           pspec.setPersistence(stategy);
  +        pspec.setLocation(location);
   
           spec.addPropertySpecification(pspec);
       }
  
  
  
  1.5       +10 -0     jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/AnnotationMessages.java
  
  Index: AnnotationMessages.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/AnnotationMessages.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AnnotationMessages.java	22 Jun 2005 12:47:21 -0000	1.4
  +++ AnnotationMessages.java	2 Jul 2005 22:51:23 -0000	1.5
  @@ -81,4 +81,14 @@
           return _formatter.format("binding-wrong-format", binding);
       }
   
  +    public static String methodAnnotation(Annotation annotation, Method method)
  +    {
  +        return _formatter.format("method-annotation", annotation, method);
  +    }
  +
  +    public static String classAnnotation(Annotation annotation, Class clazz)
  +    {
  +        return _formatter.format("class-annotation", annotation, clazz.getName());
  +    }
  +
   }
  
  
  
  1.4       +3 -1      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/MethodAnnotationEnhancementWorker.java
  
  Index: MethodAnnotationEnhancementWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/MethodAnnotationEnhancementWorker.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MethodAnnotationEnhancementWorker.java	15 Jun 2005 13:34:30 -0000	1.3
  +++ MethodAnnotationEnhancementWorker.java	2 Jul 2005 22:51:23 -0000	1.4
  @@ -16,6 +16,7 @@
   
   import java.lang.reflect.Method;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.IComponentSpecification;
   
  @@ -38,8 +39,9 @@
        * @param method
        *            the method to which the annotation is attached. The annotation
        *            may be obtained from the method.
  +     * @param location TODO
        */
   
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method);
  +            Method method, Location location);
   }
  
  
  
  1.2       +4 -2      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/InjectMetaAnnotationWorker.java
  
  Index: InjectMetaAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/InjectMetaAnnotationWorker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InjectMetaAnnotationWorker.java	22 Jun 2005 13:36:46 -0000	1.1
  +++ InjectMetaAnnotationWorker.java	2 Jul 2005 22:51:23 -0000	1.2
  @@ -16,6 +16,7 @@
   
   import java.lang.reflect.Method;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhanceUtils;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.IComponentSpecification;
  @@ -30,7 +31,7 @@
   {
   
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method)
  +            Method method, Location location)
       {
           String propertyName = AnnotationUtils.getPropertyName(method);
   
  @@ -40,7 +41,8 @@
           is.setProperty(propertyName);
           is.setType("meta");
           is.setObject(annotation.value());
  -
  +        is.setLocation(location);
  +        
           spec.addInjectSpecification(is);
       }
   
  
  
  
  1.3       +2 -1      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/InjectComponentAnnotationWorker.java
  
  Index: InjectComponentAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/InjectComponentAnnotationWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InjectComponentAnnotationWorker.java	15 Jun 2005 13:34:30 -0000	1.2
  +++ InjectComponentAnnotationWorker.java	2 Jul 2005 22:51:23 -0000	1.3
  @@ -16,6 +16,7 @@
   
   import java.lang.reflect.Method;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.enhance.InjectComponentWorker;
   import org.apache.tapestry.spec.IComponentSpecification;
  @@ -43,7 +44,7 @@
       }
   
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method)
  +            Method method, Location location)
       {
           InjectComponent ic = method.getAnnotation(InjectComponent.class);
           String propertyName = AnnotationUtils.getPropertyName(method);
  
  
  
  1.5       +3 -1      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/AnnotationStrings.properties
  
  Index: AnnotationStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/AnnotationStrings.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AnnotationStrings.properties	22 Jun 2005 12:47:21 -0000	1.4
  +++ AnnotationStrings.properties	2 Jul 2005 22:51:23 -0000	1.5
  @@ -20,4 +20,6 @@
   failure-processing-annotation=An error occured processing annotation {0} of {1}: {2}
   failure-processing-class-annotation=An error occured processing annotation {0} of class {1}: {2}
   return-string-only=The method''s return type is {0}; this annotation is only allowed on methods that return java.lang.String.
  -binding-wrong-format=The specified binding, ''{0}'', is not properly formatted. It should be ''name=binding reference''.
  \ No newline at end of file
  +binding-wrong-format=The specified binding, ''{0}'', is not properly formatted. It should be ''name=binding reference''.
  +method-annotation=Annotation {0} of {1}
  +class-annotation=Annotation {0} of class {1}
  \ No newline at end of file
  
  
  
  1.4       +7 -2      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/AssetAnnotationWorker.java
  
  Index: AssetAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/AssetAnnotationWorker.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AssetAnnotationWorker.java	1 Jul 2005 17:26:05 -0000	1.3
  +++ AssetAnnotationWorker.java	2 Jul 2005 22:51:23 -0000	1.4
  @@ -16,6 +16,8 @@
   
   import java.lang.reflect.Method;
   
  +import org.apache.hivemind.Location;
  +import org.apache.hivemind.Resource;
   import org.apache.hivemind.impl.LocationImpl;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.AssetSpecification;
  @@ -34,7 +36,7 @@
   {
   
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method)
  +            Method method, Location location)
       {
           Asset asset = method.getAnnotation(Asset.class);
           String propertyName = AnnotationUtils.getPropertyName(method);
  @@ -46,7 +48,10 @@
           // Very important for assets, as they need a location (really, the Resource
           // of a location) to figure out what kind of asset they are.
   
  -        as.setLocation(new LocationImpl(spec.getSpecificationLocation()));
  +        Resource specResource = spec.getSpecificationLocation();
  +        Location assetLocation = new AnnotationLocation(specResource, location.toString());
  +
  +        as.setLocation(assetLocation);
   
           spec.addAsset(propertyName, as);
       }
  
  
  
  1.3       +3 -1      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/BeanAnnotationWorker.java
  
  Index: BeanAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/BeanAnnotationWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BeanAnnotationWorker.java	15 Jun 2005 13:34:30 -0000	1.2
  +++ BeanAnnotationWorker.java	2 Jul 2005 22:51:23 -0000	1.3
  @@ -17,6 +17,7 @@
   import java.lang.reflect.Method;
   
   import org.apache.hivemind.HiveMind;
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.bean.LightweightBeanInitializer;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.BeanSpecification;
  @@ -33,7 +34,7 @@
   public class BeanAnnotationWorker implements MethodAnnotationEnhancementWorker
   {
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method)
  +            Method method, Location location)
       {
           Bean bean = method.getAnnotation(Bean.class);
           String propertyName = AnnotationUtils.getPropertyName(method);
  @@ -49,6 +50,7 @@
   
           bs.setClassName(beanClass.getName());
           bs.setPropertyName(propertyName);
  +        bs.setLocation(location);
   
           // Starting to like enums!
   
  
  
  
  1.2       +5 -3      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/ComponentClassAnnotationWorker.java
  
  Index: ComponentClassAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/ComponentClassAnnotationWorker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ComponentClassAnnotationWorker.java	21 Jun 2005 19:46:15 -0000	1.1
  +++ ComponentClassAnnotationWorker.java	2 Jul 2005 22:51:23 -0000	1.2
  @@ -14,14 +14,15 @@
   
   package org.apache.tapestry.annotations;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.TapestryUtils;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.IComponentSpecification;
   
   /**
    * Sets properties of the {@link org.apache.tapestry.spec.IComponentSpecification} based on the
  - * {@link org.apache.tapestry.annotations.ComponentClass} annotation. In addition, marks the component as
  - * deprecated if the {@link java.lang.Deprecated} annotation is present on the class.
  + * {@link org.apache.tapestry.annotations.ComponentClass} annotation. In addition, marks the
  + * component as deprecated if the {@link java.lang.Deprecated} annotation is present on the class.
    * 
    * @author Howard Lewis Ship
    * @since 4.0
  @@ -30,12 +31,13 @@
   {
   
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Class baseClass)
  +            Class baseClass, Location location)
       {
           ComponentClass component = (ComponentClass) baseClass.getAnnotation(ComponentClass.class);
   
           spec.setAllowBody(component.allowBody());
           spec.setAllowInformalParameters(component.allowInformalParameters());
  +        spec.setLocation(location);
   
           String[] names = TapestryUtils.split(component.reservedParameters());
           for (String name : names)
  
  
  
  1.4       +31 -8     jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/AnnotationEnhancementWorker.java
  
  Index: AnnotationEnhancementWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/AnnotationEnhancementWorker.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AnnotationEnhancementWorker.java	15 Jun 2005 13:34:30 -0000	1.3
  +++ AnnotationEnhancementWorker.java	2 Jul 2005 22:51:23 -0000	1.4
  @@ -18,7 +18,11 @@
   import java.lang.reflect.Method;
   import java.util.Map;
   
  +import org.apache.hivemind.ClassResolver;
   import org.apache.hivemind.ErrorLog;
  +import org.apache.hivemind.Location;
  +import org.apache.hivemind.Resource;
  +import org.apache.hivemind.util.ClasspathResource;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.enhance.EnhancementWorker;
   import org.apache.tapestry.spec.IComponentSpecification;
  @@ -34,6 +38,8 @@
    */
   public class AnnotationEnhancementWorker implements EnhancementWorker
   {
  +    private ClassResolver _classResolver;
  +
       private ErrorLog _errorLog;
   
       private Map _methodWorkers;
  @@ -49,19 +55,26 @@
       {
           Class clazz = op.getBaseClass();
   
  +        Resource classResource = newClassResource(clazz);
  +
           for (Annotation a : clazz.getAnnotations())
           {
  -            performClassEnhancement(op, spec, clazz, a);
  +            performClassEnhancement(op, spec, clazz, a, classResource);
           }
   
           for (Method m : clazz.getMethods())
           {
  -            performMethodEnhancement(op, spec, m);
  +            performMethodEnhancement(op, spec, m, classResource);
           }
       }
   
  +    private ClasspathResource newClassResource(Class clazz)
  +    {
  +        return new ClasspathResource(_classResolver, clazz.getName().replace('.', '/'));
  +    }
  +
       void performClassEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Class clazz, Annotation annotation)
  +            Class clazz, Annotation annotation, Resource classResource)
       {
           ClassAnnotationEnhancementWorker worker = (ClassAnnotationEnhancementWorker) _classWorkers
                   .get(annotation.annotationType());
  @@ -71,7 +84,10 @@
   
           try
           {
  -            worker.performEnhancement(op, spec, clazz);
  +            Location location = new AnnotationLocation(classResource, AnnotationMessages
  +                    .classAnnotation(annotation, clazz));
  +
  +            worker.performEnhancement(op, spec, clazz, location);
           }
           catch (Exception ex)
           {
  @@ -84,16 +100,16 @@
       }
   
       void performMethodEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method)
  +            Method method, Resource classResource)
       {
           for (Annotation a : method.getAnnotations())
           {
  -            performMethodEnhancement(op, spec, method, a);
  +            performMethodEnhancement(op, spec, method, a, classResource);
           }
       }
   
       void performMethodEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method, Annotation annotation)
  +            Method method, Annotation annotation, Resource classResource)
       {
           MethodAnnotationEnhancementWorker worker = (MethodAnnotationEnhancementWorker) _methodWorkers
                   .get(annotation.annotationType());
  @@ -103,7 +119,9 @@
   
           try
           {
  -            worker.performEnhancement(op, spec, method);
  +            Location location = new AnnotationLocation(classResource, AnnotationMessages
  +                    .methodAnnotation(annotation, method));
  +            worker.performEnhancement(op, spec, method, location);
           }
           catch (Exception ex)
           {
  @@ -124,4 +142,9 @@
       {
           _errorLog = errorLog;
       }
  +
  +    public void setClassResolver(ClassResolver classResolver)
  +    {
  +        _classResolver = classResolver;
  +    }
   }
  
  
  
  1.3       +3 -1      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/InjectPageAnnotationWorker.java
  
  Index: InjectPageAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/InjectPageAnnotationWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InjectPageAnnotationWorker.java	21 Jun 2005 11:53:32 -0000	1.2
  +++ InjectPageAnnotationWorker.java	2 Jul 2005 22:51:23 -0000	1.3
  @@ -16,6 +16,7 @@
   
   import java.lang.reflect.Method;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.IComponentSpecification;
   import org.apache.tapestry.spec.InjectSpecification;
  @@ -33,7 +34,7 @@
   {
   
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method)
  +            Method method, Location location)
       {
           InjectPage injectPage = method.getAnnotation(InjectPage.class);
   
  @@ -44,6 +45,7 @@
           is.setProperty(propertyName);
           is.setType("page");
           is.setObject(injectPage.value());
  +        is.setLocation(location);
   
           spec.addInjectSpecification(is);
       }
  
  
  
  1.3       +3 -1      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/ParameterAnnotationWorker.java
  
  Index: ParameterAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/ParameterAnnotationWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ParameterAnnotationWorker.java	15 Jun 2005 13:34:30 -0000	1.2
  +++ ParameterAnnotationWorker.java	2 Jul 2005 22:51:23 -0000	1.3
  @@ -17,6 +17,7 @@
   import java.lang.reflect.Method;
   
   import org.apache.hivemind.HiveMind;
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.IComponentSpecification;
   import org.apache.tapestry.spec.IParameterSpecification;
  @@ -34,7 +35,7 @@
   {
   
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method)
  +            Method method, Location location)
       {
           Parameter parameter = method.getAnnotation(Parameter.class);
   
  @@ -65,6 +66,7 @@
           ps.setPropertyName(propertyName);
           ps.setRequired(parameter.required());
           ps.setType(propertyType.getName());
  +        ps.setLocation(location);
   
           spec.addParameter(ps);
       }
  
  
  
  1.3       +2 -1      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/InjectAssetAnnotationWorker.java
  
  Index: InjectAssetAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/InjectAssetAnnotationWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InjectAssetAnnotationWorker.java	15 Jun 2005 13:34:30 -0000	1.2
  +++ InjectAssetAnnotationWorker.java	2 Jul 2005 22:51:23 -0000	1.3
  @@ -16,6 +16,7 @@
   
   import java.lang.reflect.Method;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.enhance.InjectAssetWorker;
   import org.apache.tapestry.spec.IComponentSpecification;
  @@ -43,7 +44,7 @@
       }
   
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method)
  +            Method method, Location location)
       {
           InjectAsset as = method.getAnnotation(InjectAsset.class);
           
  
  
  
  1.2       +3 -1      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/InjectScriptAnnotationWorker.java
  
  Index: InjectScriptAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/InjectScriptAnnotationWorker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InjectScriptAnnotationWorker.java	22 Jun 2005 13:36:46 -0000	1.1
  +++ InjectScriptAnnotationWorker.java	2 Jul 2005 22:51:23 -0000	1.2
  @@ -16,6 +16,7 @@
   
   import java.lang.reflect.Method;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.IComponentSpecification;
   import org.apache.tapestry.spec.InjectSpecification;
  @@ -29,7 +30,7 @@
   {
   
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method)
  +            Method method, Location location)
       {
           InjectScript annotation = method.getAnnotation(InjectScript.class);
   
  @@ -40,6 +41,7 @@
           is.setProperty(propertyName);
           is.setType("script");
           is.setObject(annotation.value());
  +        is.setLocation(location);
   
           spec.addInjectSpecification(is);
       }
  
  
  
  1.3       +4 -1      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/ClassAnnotationEnhancementWorker.java
  
  Index: ClassAnnotationEnhancementWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/ClassAnnotationEnhancementWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ClassAnnotationEnhancementWorker.java	15 Jun 2005 13:34:30 -0000	1.2
  +++ ClassAnnotationEnhancementWorker.java	2 Jul 2005 22:51:23 -0000	1.3
  @@ -14,6 +14,7 @@
   
   package org.apache.tapestry.annotations;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.IComponentSpecification;
   
  @@ -35,9 +36,11 @@
        *            the specification of the component for which a class is being enhanced
        * @param baseClass
        *            the class containing the annotation
  +     * @param location
  +     *            the location associated with the annotation
        */
   
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Class baseClass);
  +            Class baseClass, Location location);
   
   }
  
  
  
  1.7       +6 -3      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/ComponentAnnotationWorker.java
  
  Index: ComponentAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/ComponentAnnotationWorker.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ComponentAnnotationWorker.java	22 Jun 2005 12:57:44 -0000	1.6
  +++ ComponentAnnotationWorker.java	2 Jul 2005 22:51:23 -0000	1.7
  @@ -17,6 +17,7 @@
   import java.lang.reflect.Method;
   
   import org.apache.hivemind.ApplicationRuntimeException;
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.BindingSpecification;
   import org.apache.tapestry.spec.BindingType;
  @@ -38,7 +39,7 @@
   {
   
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method)
  +            Method method, Location location)
       {
           Component component = method.getAnnotation(Component.class);
   
  @@ -49,10 +50,11 @@
           cc.setInheritInformalParameters(component.inheritInformalParameters());
           cc.setType(component.type());
           cc.setPropertyName(propertyName);
  +        cc.setLocation(location);
   
           for (String binding : component.bindings())
           {
  -            addBinding(cc, binding);
  +            addBinding(cc, binding, location);
           }
   
           String id = component.id();
  @@ -63,7 +65,7 @@
           spec.addComponent(id, cc);
       }
   
  -    void addBinding(IContainedComponent component, String binding)
  +    void addBinding(IContainedComponent component, String binding, Location location)
       {
           int equalsx = binding.indexOf('=');
   
  @@ -79,6 +81,7 @@
           IBindingSpecification bs = new BindingSpecification();
           bs.setType(BindingType.PREFIXED);
           bs.setValue(value);
  +        bs.setLocation(location);
   
           component.setBinding(name, bs);
       }
  
  
  
  1.4       +2 -1      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/InjectObjectAnnotationWorker.java
  
  Index: InjectObjectAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/InjectObjectAnnotationWorker.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InjectObjectAnnotationWorker.java	15 Jun 2005 13:34:30 -0000	1.3
  +++ InjectObjectAnnotationWorker.java	2 Jul 2005 22:51:23 -0000	1.4
  @@ -16,6 +16,7 @@
   
   import java.lang.reflect.Method;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.enhance.InjectObjectWorker;
   import org.apache.tapestry.services.InjectedValueProvider;
  @@ -46,7 +47,7 @@
       }
   
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method)
  +            Method method, Location location)
       {
           InjectObject io = method.getAnnotation(InjectObject.class);
   
  
  
  
  1.3       +2 -1      jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/MessageAnnotationWorker.java
  
  Index: MessageAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/MessageAnnotationWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MessageAnnotationWorker.java	22 Jun 2005 13:51:00 -0000	1.2
  +++ MessageAnnotationWorker.java	2 Jul 2005 22:51:23 -0000	1.3
  @@ -18,6 +18,7 @@
   import java.lang.reflect.Modifier;
   
   import org.apache.hivemind.ApplicationRuntimeException;
  +import org.apache.hivemind.Location;
   import org.apache.hivemind.service.BodyBuilder;
   import org.apache.hivemind.service.MethodSignature;
   import org.apache.tapestry.Tapestry;
  @@ -34,7 +35,7 @@
   {
   
       public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
  -            Method method)
  +            Method method, Location location)
       {
           if (!method.getReturnType().equals(String.class))
               throw new ApplicationRuntimeException(AnnotationMessages.returnStringOnly(method
  
  
  
  1.1                  jakarta-tapestry/annotations/src/java/org/apache/tapestry/annotations/AnnotationLocation.java
  
  Index: AnnotationLocation.java
  ===================================================================
  // Copyright 2005 The Apache Software Foundation
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
  
  package org.apache.tapestry.annotations;
  
  import org.apache.hivemind.Location;
  import org.apache.hivemind.Resource;
  import org.apache.hivemind.util.Defense;
  
  /**
   * Implementation of {@link org.apache.hivemind.Location} that is used to identify the class and/or
   * method and annotation. This is useful for line-precise exception reporting of errors related to
   * annotations.
   * 
   * @author Howard Lewis Ship
   * @since 4.0
   */
  public class AnnotationLocation implements Location
  {
      private final Resource _resource;
  
      private final String _description;
  
      public AnnotationLocation(Resource resource, String description)
      {
          Defense.notNull(resource, "resource");
          Defense.notNull(description, "description");
  
          _resource = resource;
          _description = description;
      }
  
      /**
       * Returns the location's description.
       */
  
      public String toString()
      {
          return _description;
      }
  
      /**
       * Returns a resource corresponding to the Java class.
       */
  
      public Resource getResource()
      {
          return _resource;
      }
  
      /**
       * Always returns 0.
       */
  
      public int getLineNumber()
      {
          return 0;
      }
  
      /**
       * Always returns 0.
       */
  
      public int getColumnNumber()
      {
          return 0;
      }
  
      @Override
      public boolean equals(Object other)
      {
          if (other instanceof AnnotationLocation)
          {
              AnnotationLocation otherLocation = (AnnotationLocation) other;
  
              return _resource.equals(otherLocation._resource)
                      && _description.equals(otherLocation._description);
          }
  
          return false;
      }
  }
  
  
  
  1.4       +1 -1      jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestInjectObjectAnnotationWorker.java
  
  Index: TestInjectObjectAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestInjectObjectAnnotationWorker.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestInjectObjectAnnotationWorker.java	15 Jun 2005 13:34:31 -0000	1.3
  +++ TestInjectObjectAnnotationWorker.java	2 Jul 2005 22:51:24 -0000	1.4
  @@ -62,7 +62,7 @@
   
           replayControls();
   
  -        worker.performEnhancement(op, spec, m);
  +        worker.performEnhancement(op, spec, m, null);
   
           verifyControls();
       }
  
  
  
  1.2       +9 -6      jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestComponentClassAnnotationWorker.java
  
  Index: TestComponentClassAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestComponentClassAnnotationWorker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestComponentClassAnnotationWorker.java	21 Jun 2005 19:46:16 -0000	1.1
  +++ TestComponentClassAnnotationWorker.java	2 Jul 2005 22:51:24 -0000	1.2
  @@ -14,6 +14,7 @@
   
   package org.apache.tapestry.annotations;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.ComponentSpecification;
   import org.apache.tapestry.spec.IComponentSpecification;
  @@ -38,14 +39,14 @@
           return op;
       }
   
  -    private IComponentSpecification attempt(Class baseClass)
  +    private IComponentSpecification attempt(Class baseClass, Location location)
       {
           EnhancementOperation op = newOp();
           IComponentSpecification spec = new ComponentSpecification();
   
           replayControls();
   
  -        new ComponentClassAnnotationWorker().performEnhancement(op, spec, baseClass);
  +        new ComponentClassAnnotationWorker().performEnhancement(op, spec, baseClass, location);
   
           verifyControls();
   
  @@ -54,18 +55,20 @@
   
       public void testBasic()
       {
  -        IComponentSpecification spec = attempt(BasicComponent.class);
  +        Location l = newLocation();
  +        IComponentSpecification spec = attempt(BasicComponent.class, l);
   
           assertEquals(true, spec.getAllowBody());
           assertEquals(true, spec.getAllowInformalParameters());
           assertEquals(false, spec.isReservedParameterName("foo"));
           assertEquals(false, spec.isReservedParameterName("bar"));
           assertEquals(false, spec.isDeprecated());
  +        assertSame(l, spec.getLocation());
       }
   
       public void testFormalOnly()
       {
  -        IComponentSpecification spec = attempt(FormalOnlyComponent.class);
  +        IComponentSpecification spec = attempt(FormalOnlyComponent.class, null);
   
           assertEquals(false, spec.getAllowBody());
           assertEquals(false, spec.getAllowInformalParameters());
  @@ -74,14 +77,14 @@
   
       public void testDeprecated()
       {
  -        IComponentSpecification spec = attempt(DeprecatedComponent.class);
  +        IComponentSpecification spec = attempt(DeprecatedComponent.class, null);
   
           assertEquals(true, spec.isDeprecated());
       }
   
       public void testReservedParameters()
       {
  -        IComponentSpecification spec = attempt(ReservedParametersComponent.class);
  +        IComponentSpecification spec = attempt(ReservedParametersComponent.class, null);
   
           assertEquals(true, spec.isReservedParameterName("foo"));
           assertEquals(true, spec.isReservedParameterName("bar"));
  
  
  
  1.2       +12 -8     jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestSimpleAnnotationWorkers.java
  
  Index: TestSimpleAnnotationWorkers.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestSimpleAnnotationWorkers.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestSimpleAnnotationWorkers.java	22 Jun 2005 13:36:45 -0000	1.1
  +++ TestSimpleAnnotationWorkers.java	2 Jul 2005 22:51:24 -0000	1.2
  @@ -16,6 +16,7 @@
   
   import java.lang.reflect.Method;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.ComponentSpecification;
   import org.apache.tapestry.spec.IComponentSpecification;
  @@ -32,44 +33,47 @@
   {
       public void testInjectPage()
       {
  -        IComponentSpecification spec = execute(new InjectPageAnnotationWorker(), "getMyPage");
  +        Location l = newLocation();
  +        IComponentSpecification spec = execute(new InjectPageAnnotationWorker(), "getMyPage", l);
   
           InjectSpecification is = (InjectSpecification) spec.getInjectSpecifications().get(0);
   
           assertEquals("myPage", is.getProperty());
           assertEquals("page", is.getType());
           assertEquals("SomePageName", is.getObject());
  -        assertNull(is.getLocation());
  +        assertSame(l, is.getLocation());
       }
   
       public void testInjectMeta()
       {
  -        IComponentSpecification spec = execute(new InjectMetaAnnotationWorker(), "getMetaFred");
  +        Location l = newLocation();
  +        IComponentSpecification spec = execute(new InjectMetaAnnotationWorker(), "getMetaFred", l);
   
           InjectSpecification is = (InjectSpecification) spec.getInjectSpecifications().get(0);
   
           assertEquals("metaFred", is.getProperty());
           assertEquals("meta", is.getType());
           assertEquals("fred", is.getObject());
  -        assertNull(is.getLocation());
  +        assertSame(l, is.getLocation());
   
       }
   
       public void testInjectScript()
       {
  -        IComponentSpecification spec = execute(new InjectScriptAnnotationWorker(), "getScript");
  +        Location l = newLocation();
  +        IComponentSpecification spec = execute(new InjectScriptAnnotationWorker(), "getScript", l);
   
           InjectSpecification is = (InjectSpecification) spec.getInjectSpecifications().get(0);
   
           assertEquals("script", is.getProperty());
           assertEquals("script", is.getType());
           assertEquals("foo.script", is.getObject());
  -        assertNull(is.getLocation());
  +        assertSame(l, is.getLocation());
   
       }
   
       private IComponentSpecification execute(MethodAnnotationEnhancementWorker worker,
  -            String methodName)
  +            String methodName, Location location)
       {
           EnhancementOperation op = newOp();
           IComponentSpecification spec = new ComponentSpecification();
  @@ -78,7 +82,7 @@
   
           replayControls();
   
  -        worker.performEnhancement(op, spec, method);
  +        worker.performEnhancement(op, spec, method, location);
   
           verifyControls();
   
  
  
  
  1.3       +5 -1      jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestPersistAnnotationWorker.java
  
  Index: TestPersistAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestPersistAnnotationWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestPersistAnnotationWorker.java	15 Jun 2005 13:34:31 -0000	1.2
  +++ TestPersistAnnotationWorker.java	2 Jul 2005 22:51:24 -0000	1.3
  @@ -16,6 +16,7 @@
   
   import java.lang.reflect.Method;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.ComponentSpecification;
   import org.apache.tapestry.spec.IComponentSpecification;
  @@ -32,6 +33,8 @@
   {
       public void testInject()
       {
  +        Location l = newLocation();
  +
           EnhancementOperation op = newOp();
           IComponentSpecification spec = new ComponentSpecification();
   
  @@ -39,7 +42,7 @@
   
           Method m = findMethod(AnnotatedPage.class, "getClientPersistentProperty");
   
  -        new PersistAnnotationWorker().performEnhancement(op, spec, m);
  +        new PersistAnnotationWorker().performEnhancement(op, spec, m, l);
   
           verifyControls();
   
  @@ -47,5 +50,6 @@
   
           assertEquals("client", ps.getPersistence());
           assertEquals("clientPersistentProperty", ps.getName());
  +        assertSame(l, ps.getLocation());
       }
   }
  
  
  
  1.6       +16 -12    jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestComponentAnnotationWorker.java
  
  Index: TestComponentAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestComponentAnnotationWorker.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestComponentAnnotationWorker.java	22 Jun 2005 12:57:44 -0000	1.5
  +++ TestComponentAnnotationWorker.java	2 Jul 2005 22:51:24 -0000	1.6
  @@ -16,8 +16,7 @@
   
   import java.lang.reflect.Method;
   
  -import org.apache.hivemind.ApplicationRuntimeException;
  -import org.apache.tapestry.enhance.EnhanceUtils;
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.BindingType;
   import org.apache.tapestry.spec.ComponentSpecification;
  @@ -33,7 +32,7 @@
    */
   public class TestComponentAnnotationWorker extends BaseAnnotationTestCase
   {
  -    private IContainedComponent run(String id, String methodName)
  +    private IContainedComponent run(String id, String methodName, Location location)
       {
           Method method = findMethod(AnnotatedPage.class, methodName);
   
  @@ -43,7 +42,7 @@
   
           IComponentSpecification spec = new ComponentSpecification();
   
  -        new ComponentAnnotationWorker().performEnhancement(op, spec, method);
  +        new ComponentAnnotationWorker().performEnhancement(op, spec, method, location);
   
           verifyControls();
   
  @@ -52,36 +51,39 @@
   
       public void testSimple()
       {
  -        IContainedComponent cc = run("textField", "getTextField");
  +        Location l = newLocation();
  +
  +        IContainedComponent cc = run("textField", "getTextField", l);
   
           assertEquals("TextField", cc.getType());
           assertEquals(false, cc.getInheritInformalParameters());
           assertEquals(null, cc.getCopyOf());
  -        assertNull(cc.getLocation());
  +        assertSame(l, cc.getLocation());
           assertEquals(true, cc.getBindingNames().isEmpty());
           assertEquals("textField", cc.getPropertyName());
       }
   
       public void testExplicitId()
       {
  -        IContainedComponent cc = run("email", "getEmailField");
  +        IContainedComponent cc = run("email", "getEmailField", null);
   
           assertEquals("emailField", cc.getPropertyName());
       }
   
       public void testInheritInformalParameters()
       {
  -        IContainedComponent cc = run("inherit", "getInherit");
  +        IContainedComponent cc = run("inherit", "getInherit", null);
   
           assertEquals(true, cc.getInheritInformalParameters());
       }
   
       public void testWithBindings()
       {
  -        IContainedComponent cc = run("componentWithBindings", "getComponentWithBindings");
  +        Location l = newLocation();
  +        IContainedComponent cc = run("componentWithBindings", "getComponentWithBindings", l);
   
           IBindingSpecification bs1 = cc.getBinding("condition");
  -        assertNull(bs1.getLocation());
  +        assertSame(l, bs1.getLocation());
           assertEquals(BindingType.PREFIXED, bs1.getType());
           assertEquals("message", bs1.getValue());
   
  @@ -91,10 +93,12 @@
   
       public void testBindingWhitespaceTrimmed()
       {
  -        IContainedComponent cc = run("whitespace", "getWhitespace");
  +        Location l = newLocation();
  +
  +        IContainedComponent cc = run("whitespace", "getWhitespace", l);
   
           IBindingSpecification bs1 = cc.getBinding("value");
  -        assertNull(bs1.getLocation());
  +        assertSame(l, bs1.getLocation());
           assertEquals(BindingType.PREFIXED, bs1.getType());
           assertEquals("email", bs1.getValue());
   
  
  
  
  1.3       +16 -12    jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestParameterAnnotationWorker.java
  
  Index: TestParameterAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestParameterAnnotationWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestParameterAnnotationWorker.java	15 Jun 2005 13:34:31 -0000	1.2
  +++ TestParameterAnnotationWorker.java	2 Jul 2005 22:51:24 -0000	1.3
  @@ -16,6 +16,7 @@
   
   import java.lang.reflect.Method;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.ComponentSpecification;
   import org.apache.tapestry.spec.IComponentSpecification;
  @@ -30,12 +31,13 @@
    */
   public class TestParameterAnnotationWorker extends BaseAnnotationTestCase
   {
  -    private IParameterSpecification attempt(String propertyName)
  +    private IParameterSpecification attempt(String propertyName, Location location)
       {
  -        return attempt(propertyName, propertyName);
  +        return attempt(propertyName, propertyName, location);
       }
   
  -    private IParameterSpecification attempt(String propertyName, String parameterName)
  +    private IParameterSpecification attempt(String propertyName, String parameterName,
  +            Location location)
       {
           Method m = findMethod(AnnotatedPage.class, "get"
                   + propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1));
  @@ -50,7 +52,7 @@
   
           replayControls();
   
  -        new ParameterAnnotationWorker().performEnhancement(op, spec, m);
  +        new ParameterAnnotationWorker().performEnhancement(op, spec, m, location);
   
           verifyControls();
   
  @@ -59,14 +61,16 @@
   
       public void testSimple()
       {
  -        IParameterSpecification ps = attempt("simpleParameter");
  +        Location l = newLocation();
  +
  +        IParameterSpecification ps = attempt("simpleParameter", l);
   
           assertListsEqual(new Object[] {}, ps.getAliasNames().toArray());
           assertEquals(true, ps.getCache());
           assertEquals(null, ps.getDefaultBindingType());
           assertEquals(null, ps.getDefaultValue());
           assertEquals(null, ps.getDescription());
  -        assertNull(ps.getLocation());
  +        assertSame(l, ps.getLocation());
           assertEquals("simpleParameter", ps.getParameterName());
           assertEquals("simpleParameter", ps.getPropertyName());
           assertEquals("java.lang.String", ps.getType());
  @@ -74,14 +78,14 @@
   
       public void testRequired()
       {
  -        IParameterSpecification ps = attempt("requiredParameter");
  +        IParameterSpecification ps = attempt("requiredParameter", null);
   
           assertEquals(true, ps.isRequired());
       }
   
       public void testDefaultBinding()
       {
  -        IParameterSpecification ps = attempt("beanDefaultParameter");
  +        IParameterSpecification ps = attempt("beanDefaultParameter", null);
   
           assertEquals("bean", ps.getDefaultBindingType());
           assertEquals("java.lang.Object", ps.getType());
  @@ -89,14 +93,14 @@
   
       public void testCacheOff()
       {
  -        IParameterSpecification ps = attempt("nonCachedParameter");
  +        IParameterSpecification ps = attempt("nonCachedParameter", null);
   
           assertEquals(false, ps.getCache());
       }
   
       public void testAliases()
       {
  -        IParameterSpecification ps = attempt("aliasedParameter");
  +        IParameterSpecification ps = attempt("aliasedParameter", null);
   
           assertListsEqual(new String[]
           { "fred" }, ps.getAliasNames().toArray());
  @@ -104,13 +108,13 @@
   
       public void testDeprecated()
       {
  -        IParameterSpecification ps = attempt("deprecatedParameter");
  +        IParameterSpecification ps = attempt("deprecatedParameter", null);
           assertEquals(true, ps.isDeprecated());
       }
   
       public void testNamed()
       {
  -        IParameterSpecification ps = attempt("namedParameter", "fred");
  +        IParameterSpecification ps = attempt("namedParameter", "fred", null);
   
           assertEquals("fred", ps.getParameterName());
           assertEquals("namedParameter", ps.getPropertyName());
  
  
  
  1.5       +72 -5     jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestAnnotationEnhancementWorker.java
  
  Index: TestAnnotationEnhancementWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestAnnotationEnhancementWorker.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestAnnotationEnhancementWorker.java	21 Jun 2005 22:31:37 -0000	1.4
  +++ TestAnnotationEnhancementWorker.java	2 Jul 2005 22:51:24 -0000	1.5
  @@ -14,11 +14,15 @@
   
   package org.apache.tapestry.annotations;
   
  +import java.lang.annotation.Annotation;
   import java.lang.reflect.Method;
   import java.util.Collections;
   import java.util.Map;
   
  +import org.apache.hivemind.ClassResolver;
   import org.apache.hivemind.ErrorLog;
  +import org.apache.hivemind.Resource;
  +import org.apache.hivemind.impl.DefaultClassResolver;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.IComponentSpecification;
   import org.easymock.MockControl;
  @@ -68,6 +72,8 @@
   
       public void testAnnotationMatch()
       {
  +        ClassResolver resolver = new DefaultClassResolver();
  +
           EnhancementOperation op = newOp(AnnotatedPage.class);
           IComponentSpecification spec = newSpec();
   
  @@ -75,20 +81,49 @@
   
           Method m = findMethod(AnnotatedPage.class, "getInjectedObject");
   
  -        methodWorker.performEnhancement(op, spec, m);
  +        AnnotationLocation location = newMethodLocation(
  +                resolver,
  +                AnnotatedPage.class,
  +                m,
  +                InjectObject.class);
  +
  +        methodWorker.performEnhancement(op, spec, m, location);
   
           replayControls();
   
           AnnotationEnhancementWorker worker = new AnnotationEnhancementWorker();
           worker.setMethodWorkers(newMap(InjectObject.class, methodWorker));
  +        worker.setClassResolver(resolver);
   
           worker.performEnhancement(op, spec);
   
           verifyControls();
       }
   
  +    protected AnnotationLocation newMethodLocation(ClassResolver resolver, Class baseClass,
  +            Method m, Class annotationClass)
  +    {
  +        Resource classResource = newResource(resolver, baseClass);
  +
  +        return new AnnotationLocation(classResource, AnnotationMessages.methodAnnotation(m
  +                .getAnnotation(annotationClass), m));
  +    }
  +
  +    private AnnotationLocation newClassLocation(ClassResolver resolver, Class baseClass,
  +            Class annotationClass)
  +    {
  +        Resource classResource = newResource(resolver, baseClass);
  +        Annotation annotation = baseClass.getAnnotation(annotationClass);
  +
  +        return new AnnotationLocation(classResource, AnnotationMessages.classAnnotation(
  +                annotation,
  +                baseClass));
  +    }
  +
       public void testAnnotationWithSubclass()
       {
  +        ClassResolver resolver = new DefaultClassResolver();
  +
           EnhancementOperation op = newOp(AnnotatedPageSubclass.class);
           IComponentSpecification spec = newSpec();
   
  @@ -96,12 +131,19 @@
   
           Method m = findMethod(AnnotatedPageSubclass.class, "getInjectedObject");
   
  -        methodWorker.performEnhancement(op, spec, m);
  +        AnnotationLocation location = newMethodLocation(
  +                resolver,
  +                AnnotatedPageSubclass.class,
  +                m,
  +                InjectObject.class);
  +
  +        methodWorker.performEnhancement(op, spec, m, location);
   
           replayControls();
   
           AnnotationEnhancementWorker worker = new AnnotationEnhancementWorker();
           worker.setMethodWorkers(newMap(InjectObject.class, methodWorker));
  +        worker.setClassResolver(resolver);
   
           worker.performEnhancement(op, spec);
   
  @@ -110,6 +152,8 @@
   
       public void testAnnotationFailure()
       {
  +        ClassResolver resolver = new DefaultClassResolver();
  +
           ErrorLog log = newLog();
           Throwable t = new RuntimeException("Woops!");
   
  @@ -122,7 +166,13 @@
   
           Method m = findMethod(AnnotatedPage.class, "getInjectedObject");
   
  -        methodWorker.performEnhancement(op, spec, m);
  +        AnnotationLocation location = newMethodLocation(
  +                resolver,
  +                AnnotatedPage.class,
  +                m,
  +                InjectObject.class);
  +
  +        methodWorker.performEnhancement(op, spec, m, location);
           methodWorkerc.setThrowable(t);
   
           log
  @@ -138,6 +188,7 @@
           AnnotationEnhancementWorker worker = new AnnotationEnhancementWorker();
           worker.setMethodWorkers(newMap(InjectObject.class, methodWorker));
           worker.setErrorLog(log);
  +        worker.setClassResolver(resolver);
   
           worker.performEnhancement(op, spec);
   
  @@ -151,17 +202,25 @@
   
       public void testClassAnnotation()
       {
  +        ClassResolver resolver = new DefaultClassResolver();
  +
           EnhancementOperation op = newOp(DeprecatedBean.class);
           IComponentSpecification spec = newSpec();
   
           ClassAnnotationEnhancementWorker classWorker = (ClassAnnotationEnhancementWorker) newMock(ClassAnnotationEnhancementWorker.class);
   
  -        classWorker.performEnhancement(op, spec, DeprecatedBean.class);
  +        AnnotationLocation location = newClassLocation(
  +                resolver,
  +                DeprecatedBean.class,
  +                Deprecated.class);
  +
  +        classWorker.performEnhancement(op, spec, DeprecatedBean.class, location);
   
           replayControls();
   
           AnnotationEnhancementWorker worker = new AnnotationEnhancementWorker();
           worker.setClassWorkers(newMap(Deprecated.class, classWorker));
  +        worker.setClassResolver(resolver);
   
           worker.performEnhancement(op, spec);
   
  @@ -170,6 +229,8 @@
   
       public void testClassAnnotationFailure()
       {
  +        ClassResolver resolver = new DefaultClassResolver();
  +
           ErrorLog log = newLog();
           EnhancementOperation op = newOp(DeprecatedBean.class);
           IComponentSpecification spec = newSpec();
  @@ -180,7 +241,12 @@
   
           Throwable t = new RuntimeException("Simulated failure.");
   
  -        classWorker.performEnhancement(op, spec, DeprecatedBean.class);
  +        AnnotationLocation location = newClassLocation(
  +                resolver,
  +                DeprecatedBean.class,
  +                Deprecated.class);
  +
  +        classWorker.performEnhancement(op, spec, DeprecatedBean.class, location);
           classWorkerc.setThrowable(t);
   
           log
  @@ -195,6 +261,7 @@
           AnnotationEnhancementWorker worker = new AnnotationEnhancementWorker();
           worker.setClassWorkers(newMap(Deprecated.class, classWorker));
           worker.setErrorLog(log);
  +        worker.setClassResolver(resolver);
   
           worker.performEnhancement(op, spec);
   
  
  
  
  1.4       +3 -2      jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestAssetAnnotationWorker.java
  
  Index: TestAssetAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestAssetAnnotationWorker.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestAssetAnnotationWorker.java	1 Jul 2005 17:26:05 -0000	1.3
  +++ TestAssetAnnotationWorker.java	2 Jul 2005 22:51:24 -0000	1.4
  @@ -35,6 +35,7 @@
   {
       public void testSuccess()
       {
  +        Location l = newLocation();
           Resource r = (Resource) newMock(Resource.class);
           EnhancementOperation op = newOp();
           IComponentSpecification spec = new ComponentSpecification();
  @@ -44,13 +45,13 @@
   
           Method m = findMethod(AnnotatedPage.class, "getGlobalStylesheet");
   
  -        new AssetAnnotationWorker().performEnhancement(op, spec, m);
  +        new AssetAnnotationWorker().performEnhancement(op, spec, m, l);
   
           verifyControls();
   
           IAssetSpecification as = spec.getAsset("globalStylesheet");
           assertEquals("/style/global.css", as.getPath());
  -        assertEquals(new LocationImpl(r), as.getLocation());
  +        assertEquals(new AnnotationLocation(r, l.toString()), as.getLocation());
           assertEquals("globalStylesheet", as.getPropertyName());
       }
   }
  
  
  
  1.3       +1 -1      jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestInjectComponentAnnotationWorker.java
  
  Index: TestInjectComponentAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestInjectComponentAnnotationWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestInjectComponentAnnotationWorker.java	15 Jun 2005 13:34:31 -0000	1.2
  +++ TestInjectComponentAnnotationWorker.java	2 Jul 2005 22:51:24 -0000	1.3
  @@ -47,7 +47,7 @@
   
           InjectComponentAnnotationWorker worker = new InjectComponentAnnotationWorker(delegate);
   
  -        worker.performEnhancement(op, spec, findMethod(AnnotatedPage.class, "getFredField"));
  +        worker.performEnhancement(op, spec, findMethod(AnnotatedPage.class, "getFredField"), null);
   
           verifyControls();
       }
  
  
  
  1.3       +1 -1      jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestInjectStateAnnotationWorker.java
  
  Index: TestInjectStateAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestInjectStateAnnotationWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestInjectStateAnnotationWorker.java	15 Jun 2005 13:34:31 -0000	1.2
  +++ TestInjectStateAnnotationWorker.java	2 Jul 2005 22:51:24 -0000	1.3
  @@ -48,7 +48,7 @@
   
           InjectStateAnnotationWorker worker = new InjectStateAnnotationWorker(delegate);
   
  -        worker.performEnhancement(op, spec, findMethod(AnnotatedPage.class, "getBarney"));
  +        worker.performEnhancement(op, spec, findMethod(AnnotatedPage.class, "getBarney"), null);
   
           verifyControls();
       }
  
  
  
  1.3       +8 -0      jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/BaseAnnotationTestCase.java
  
  Index: BaseAnnotationTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/BaseAnnotationTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BaseAnnotationTestCase.java	9 Jun 2005 22:53:48 -0000	1.2
  +++ BaseAnnotationTestCase.java	2 Jul 2005 22:51:24 -0000	1.3
  @@ -16,7 +16,10 @@
   
   import java.lang.reflect.Method;
   
  +import org.apache.hivemind.ClassResolver;
  +import org.apache.hivemind.Resource;
   import org.apache.hivemind.test.HiveMindTestCase;
  +import org.apache.hivemind.util.ClasspathResource;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.IComponentSpecification;
   
  @@ -49,4 +52,9 @@
           return (EnhancementOperation) newMock(EnhancementOperation.class);
       }
   
  +    protected Resource newResource(ClassResolver resolver, Class clazz)
  +    {
  +        return new ClasspathResource(resolver, clazz.getName().replace('.', '/'));
  +    }
  +
   }
  
  
  
  1.2       +4 -4      jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestMessageAnnotationWorker.java
  
  Index: TestMessageAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestMessageAnnotationWorker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestMessageAnnotationWorker.java	22 Jun 2005 12:47:22 -0000	1.1
  +++ TestMessageAnnotationWorker.java	2 Jul 2005 22:51:24 -0000	1.2
  @@ -69,7 +69,7 @@
   
           try
           {
  -            new MessageAnnotationWorker().performEnhancement(op, spec, method);
  +            new MessageAnnotationWorker().performEnhancement(op, spec, method, null);
               unreachable();
           }
           catch (ApplicationRuntimeException ex)
  @@ -98,7 +98,7 @@
   
           replayControls();
   
  -        new MessageAnnotationWorker().performEnhancement(op, spec, method);
  +        new MessageAnnotationWorker().performEnhancement(op, spec, method, null);
   
           verifyControls();
       }
  @@ -114,7 +114,7 @@
   
           replayControls();
   
  -        new MessageAnnotationWorker().performEnhancement(op, spec, method);
  +        new MessageAnnotationWorker().performEnhancement(op, spec, method, null);
   
           verifyControls();
       }
  @@ -130,7 +130,7 @@
       {
           try
           {
  -            new ComponentAnnotationWorker().addBinding(null, binding);
  +            new ComponentAnnotationWorker().addBinding(null, binding, null);
               unreachable();
           }
           catch (ApplicationRuntimeException ex)
  
  
  
  1.3       +1 -1      jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestInjectAssetAnnotationWorker.java
  
  Index: TestInjectAssetAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestInjectAssetAnnotationWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestInjectAssetAnnotationWorker.java	15 Jun 2005 13:34:31 -0000	1.2
  +++ TestInjectAssetAnnotationWorker.java	2 Jul 2005 22:51:24 -0000	1.3
  @@ -50,7 +50,7 @@
   
           InjectAssetAnnotationWorker worker = new InjectAssetAnnotationWorker(delegate);
   
  -        worker.performEnhancement(op, spec, m);
  +        worker.performEnhancement(op, spec, m, null);
   
           verifyControls();
       }
  
  
  
  1.3       +9 -6      jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestBeanAnnotationWorker.java
  
  Index: TestBeanAnnotationWorker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/annotations/src/test/org/apache/tapestry/annotations/TestBeanAnnotationWorker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestBeanAnnotationWorker.java	15 Jun 2005 13:34:31 -0000	1.2
  +++ TestBeanAnnotationWorker.java	2 Jul 2005 22:51:24 -0000	1.3
  @@ -18,6 +18,7 @@
   import java.util.HashMap;
   import java.util.List;
   
  +import org.apache.hivemind.Location;
   import org.apache.tapestry.bean.LightweightBeanInitializer;
   import org.apache.tapestry.enhance.EnhancementOperation;
   import org.apache.tapestry.spec.BeanLifecycle;
  @@ -37,6 +38,7 @@
   {
       public void testBeanClassSpecified()
       {
  +        Location l = newLocation();
           EnhancementOperation op = newOp();
           IComponentSpecification spec = new ComponentSpecification();
   
  @@ -44,7 +46,7 @@
   
           replayControls();
   
  -        new BeanAnnotationWorker().performEnhancement(op, spec, m);
  +        new BeanAnnotationWorker().performEnhancement(op, spec, m, l);
   
           verifyControls();
   
  @@ -53,7 +55,7 @@
           assertEquals("mapBean", bs.getPropertyName());
           assertEquals(HashMap.class.getName(), bs.getClassName());
           assertEquals(BeanLifecycle.REQUEST, bs.getLifecycle());
  -        assertNull(bs.getLocation());
  +        assertSame(l, bs.getLocation());
           assertNull(bs.getInitializers());
       }
   
  @@ -70,6 +72,7 @@
   
       public void testBeanClassNotSpecified()
       {
  +        Location l = newLocation();
           EnhancementOperation op = newOp("hashMapBean", HashMap.class);
           IComponentSpecification spec = new ComponentSpecification();
   
  @@ -77,7 +80,7 @@
   
           replayControls();
   
  -        new BeanAnnotationWorker().performEnhancement(op, spec, m);
  +        new BeanAnnotationWorker().performEnhancement(op, spec, m, l);
   
           verifyControls();
   
  @@ -86,7 +89,7 @@
           assertEquals("hashMapBean", bs.getPropertyName());
           assertEquals(HashMap.class.getName(), bs.getClassName());
           assertEquals(BeanLifecycle.REQUEST, bs.getLifecycle());
  -        assertNull(bs.getLocation());
  +        assertSame(l, bs.getLocation());
           assertNull(bs.getInitializers());
       }
   
  @@ -99,7 +102,7 @@
   
           replayControls();
   
  -        new BeanAnnotationWorker().performEnhancement(op, spec, m);
  +        new BeanAnnotationWorker().performEnhancement(op, spec, m, null);
   
           verifyControls();
   
  @@ -120,7 +123,7 @@
   
           replayControls();
   
  -        new BeanAnnotationWorker().performEnhancement(op, spec, m);
  +        new BeanAnnotationWorker().performEnhancement(op, spec, m, null);
   
           verifyControls();
   
  
  
  
  1.19      +1 -0      jakarta-tapestry/src/documentation/content/xdocs/links.ent
  
  Index: links.ent
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/src/documentation/content/xdocs/links.ent,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- links.ent	27 Jun 2005 04:06:54 -0000	1.18
  +++ links.ent	2 Jul 2005 22:51:24 -0000	1.19
  @@ -182,6 +182,7 @@
   <!ENTITY Saxon 			'<link href="http://sf.net/projects/saxon/">Saxon</link>'>
   <!ENTITY Spring			'<link href="http://springframework.org/">Spring</link>'>
   <!ENTITY Struts 		'<link href="http://struts.apache.org/">Struts</link>'>
  +<!ENTITY Tomcat			'<link href="http://jakarta.apache.org/tomcat/">Tomcat</link>'>
   <!ENTITY WebWork 		'<link href="http://opensymphony.com/webwork/">WebWork</link>'>
   <!ENTITY Velocity 		'<link href="http://jakarta.apache.org/velocity/">Velocity</link>'>
   
  
  
  
  1.2       +10 -0     jakarta-tapestry/src/documentation/content/xdocs/QuickStart/tutorials-structure.aart
  
  Index: tutorials-structure.aart
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/src/documentation/content/xdocs/QuickStart/tutorials-structure.aart,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- tutorials-structure.aart	27 Jun 2005 04:06:54 -0000	1.1
  +++ tutorials-structure.aart	2 Jul 2005 22:51:24 -0000	1.2
  @@ -1,5 +1,15 @@
   Tutorials Directory
   |
  ++- directlink
   +- helloworld
   +- tapestry-libraries
  +|  |
  +|  +- common.xml
  +|  +- lib
  +|     |
  +|     +- web
  +|        |
  +|        +- bsf-2.3.0.jar
  +|        +- commons-codec-1.3.jar
  +|        +- . . .  
   +- . . .
  \ No newline at end of file
  
  
  
  1.4       +31 -17    jakarta-tapestry/src/documentation/content/xdocs/QuickStart/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/src/documentation/content/xdocs/QuickStart/index.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- index.xml	27 Jun 2005 04:40:29 -0000	1.3
  +++ index.xml	2 Jul 2005 22:51:24 -0000	1.4
  @@ -50,29 +50,20 @@
   </p>
     
   <p>
  -The examples all share a set of libraries (the Tapestry framework, its dependencies, the
  -contrib library, and the annotations library).  These are available from <link href="&quickstart-download-url;">&quickstart-download-url;</link>
  -as file tapestry-libraries.tar.gz.  Choose a directory to store the tutorials and expand the contents of this tarball; this will
  -create a directory, tapestry-libraries, with files and folders beneath it (especially, many JAR files
  -inside lib/web).
  +The source code for the all the tutorials are distributed inside a single tarbar: tapestry-tutorials.tar.gz, available
  +from <link href="&quickstart-download-url;">&quickstart-download-url;</link>.
   </p>  
  -
  -<figure src="tapestry-libraries.png" alt="Tapestry Libraries Directories"/>
  -  
  -</section>
  -
  -<section>
  -  <title>Tutorial Structure</title>
  -  
  +    
   <p>
   Each tutorial is its own project (in fact, it includes .project and .classpath files so that it may be
  -used inside &Eclipse;).  Each should be expanded inside your tutorials directory:
  +used inside &Eclipse;).  In addition, the tapestry-tutorials project contains the set of libraries
  +need by the applications: the Tapestry libraries and their dependencies.
   </p>
   
   <figure src="tutorials-structure.png" alt="Tutorial Workspace Structure"/>
   
   <p>
  -Each individual tutorial has the same structure:
  +Each tutorial project has the same structure:
   </p>
   
   <figure src="single-tutorial.png" alt="Single Tutorial Structure"/>
  @@ -90,7 +81,7 @@
   </p>
   
   <p>
  -The Ant <code>war</code> target will compile the Java source files, and create a WAR file containing
  +The Ant <code>war</code> target will compile the Java source files (stored in src/java), and create a WAR file containing
   the compiled classes (inside WEB-INF/classes), the contents of src/context, and all the dependencies (from tapestry-libraries)
   packaged inside WEB-INF/lib.  The file will be stored in the target folder, which is created
   as necessary, and is named after the project (i.e., target/helloworld.war).
  @@ -102,8 +93,31 @@
     <title>Building And Deploying</title>
     
   <p>
  -  Coming soon ...
  +To build a tutorial, simply change to its directory and execute <code>ant</code>:
  +</p>
  +
  +<source><![CDATA[
  +bash-2.05b$ ant
  +Buildfile: build.xml
  +
  +compile:
  +    [mkdir] Created dir: C:\workspace\directlink\target\classes
  +    [javac] Compiling 1 source file to C:\workspace\directlink\target\classes
  +    [javac] Note: C:\workspace\directlink\src\java\tutorials\directlink\pages\Home.java uses or overrides a deprecated API.
  +    [javac] Note: Recompile with -Xlint:deprecation for details.
  +
  +war:
  +      [war] Building war: C:\workspace\directlink\target\helloworld.war
  +
  +BUILD SUCCESSFUL
  +Total time: 8 seconds
  +bash-2.05b$
  +]]></source>
  +
  +<p>
  +The resulting WAR file is ready to be deployed into any servlet container such as &Jetty; or &Tomcat;.
   </p>
  +
     
   </section>
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message