The following comment has been added to this issue:

     Author: Heiko W. Rupp
    Created: Mon, 16 Aug 2004 12:31 PM
       Body:
Actually, I can't really tell about the/my mentionned case, as I never used it. But 
after looking at the code (again), I think you are right. What I proposed didn't make 
much sense anyway.


For testing: you propbably need to generate an instance of DocletContext() and give it 
a 'fake one' (i.e. not read from external files), that has the right 
<packagesubstitution> tag in it. 
then call PackageTagsHandler.getPackageNameFor().

I just commited a little docu for the getPackageNameFor(String,bool) method, that 
reflects my understanding of things.

---------------------------------------------------------------------
View this comment:
  
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1007?page=comments#action_14590

---------------------------------------------------------------------
View the issue:
  http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1007

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XDT-1007
    Summary: Package substitution does not seem to function correctly/consistently.
       Type: Bug

     Status: Open
   Priority: Critical

 Original Estimate: 4 hours
 Time Spent: Unknown
  Remaining: 4 hours

    Project: XDoclet
 Components: 
             Core

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: Ryan Ovrevik

    Created: Fri, 6 Aug 2004 5:49 PM
    Updated: Mon, 16 Aug 2004 12:31 PM
Environment: j2se1.4.2/win2k/xdoclet1.2.1/head

Description:
This is a reoccurring issue that has been fixed for several specific cases. Exhaustive 
test cases for complete functionality do not appear to have been captured. Please take 
a look at the examples to verify correct functionality.

Several apparently reasonable uses of package substitution produce code that does not 
reside in the anticipated package. In several cases produces code that will not 
compile. The most obvious and commonly utilized cases of package substitution seem to 
work.

Snip-its from test build file:

Are there any cases that are missing?
Should any of these NOT work as indicated?

test replace stuff on the start
====================================
given the.root.of.evil.FileBean.java
should produce some00.root.of.evil.FileLocal
<packagesubstitution packages="the" substitutewith="some00"/>

given the.root.of.evil.JavaClass.java
WORKS produces some01.root.of.evil.FileLocal
<packagesubstitution packages="the" substitutewith="some01" usefirst="true"/>

test replace stuff in the end
======================================
given the.root.of.evil.JavaClass.java
WORKS produces the.root.of.stupidity02.FileLocal
<packagesubstitution packages="evil" substitutewith="stupidity02"/>

given the.root.of.evil.JavaClass.java
WORKS produces the.root.of.stupidity03.FileLocal
<packagesubstitution packages="evil" substitutewith="stupidity03" usefirst="true"/>

test replace stuff in the middle
====================================
given the.root.of.evil.JavaClass.java
should produce the.point04.of.evil.FileLocal
<packagesubstitution packages="root" substitutewith="point04"/>

given the.root.of.evil.JavaClass.java
WORKS should produce the.point05.of.evil.FileLocal
<packagesubstitution packages="root" substitutewith="point05" usefirst="true"/>

test package prefixing
=============================================
given the.root.of.evil.JavaClass.java
should produce pre06.the.root.of.evil.FileLocal
<packagesubstitution packages="the.root.of.evil" 
substitutewith="pre06.the.root.of.evil"/>

given the.root.of.evil.JavaClass.java
should produce pre07.the.root.of.evil.FileLocal
produces bogus code
<packagesubstitution packages="the.root.of.evil" 
substitutewith="pre07.the.root.of.evil" usefirst="true"/>

test package suffix
================================================
given the.root.of.evil.JavaClass.java
should produce the.root.of.evil.post08.FileLocal
<packagesubstitution packages="the.root.of.evil" 
substitutewith="the.root.of.evil.post08"/>

given the.root.of.evil.JavaClass.java
should produce the.root.of.evil.post09.FileLocal
produces bogus code
<packagesubstitution packages="the.root.of.evil" 
substitutewith="the.root.of.evil.post09" usefirst="true"/>

test replace stuff on the start
====================================
given the.root.of.evil.JavaClass.java
should produce some10.root.of.evil.FileLocal
<packagesubstitution packages="the,bogus" substitutewith="some10"/>

given the.root.of.evil.JavaClass.java
should produce some11.root.of.evil.FileLocal
<packagesubstitution packages="the,bogus" substitutewith="some11" usefirst="true"/>

test replace stuff in the end
======================================
given the.root.of.evil.JavaClass.java
WORKS produces the.root.of.stupidity12.FileLocal
<packagesubstitution packages="evil,bogus" substitutewith="stupidity12"/>

given the.root.of.evil.JavaClass.java
should produce the.root.of.stupidity13.FileLocal
<packagesubstitution packages="evil,bogus" substitutewith="stupidity13" 
usefirst="true"/>

test replace stuff in the middle
====================================
given the.root.of.evil.JavaClass.java
should produce the.point14.of.evil.FileLocal
<packagesubstitution packages="root,bogus" substitutewith="point14"/>

given the.root.of.evil.JavaClass.java
should produce the.point15.of.evil.FileLocal
<packagesubstitution packages="root,bogus" substitutewith="point15" usefirst="true"/>

test package prefixing
=============================================
given the.root.of.evil.JavaClass.java
should produce pre16.the.root.of.evil.FileLocal
<packagesubstitution packages="the.root.of.evil,bogus" 
substitutewith="pre16.the.root.of.evil"/>

given the.root.of.evil.JavaClass.java
should produce pre17.the.root.of.evil.FileLocal
<packagesubstitution packages="the.root.of.evil,bogus" 
substitutewith="pre17.the.root.of.evil" usefirst="true"/>

test package suffix
================================================
given the.root.of.evil.JavaClass.java
should produce the.root.of.evil.post18.FileLocal
<packagesubstitution packages="the.root.of.evil,bogus" 
substitutewith="the.root.of.evil.post18"/>

given the.root.of.evil.JavaClass.java
should produce the.root.of.evil.post19.FileLocal
<packagesubstitution packages="the.root.of.evil,bogus" 
substitutewith="the.root.of.evil.post19" usefirst="true"/> 


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to