[jira] Updated: (VELOCITY-362) can't load macros in file loaded with #parse

2007-08-27 Thread Supun Kamburugamuva (JIRA)
[ https://issues.apache.org/jira/browse/VELOCITY-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Supun Kamburugamuva updated VELOCITY-362: - Attachment: small.patch There is a lack of a feature in the code due

VELOCITY-362 and VELOCITY-529 Solved

2007-08-23 Thread Supun Kamburugamuva
Hi list, I'm really glad that I could solve both VELOCITY-362 and VELOCITY-529. Here is a general description about how I solved the two problems. These two problems are interrelated and solving one gives the chance to solve the other as well. For example if we can specify that a set of macro

[jira] Updated: (VELOCITY-362) can't load macros in file loaded with #parse

2007-08-20 Thread Supun Kamburugamuva (JIRA)
[ https://issues.apache.org/jira/browse/VELOCITY-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Supun Kamburugamuva updated VELOCITY-362: - Attachment: patch.zip I have attached a zip file with a patch. This patch

Re: Including macros using #parse

2007-08-05 Thread Supun Kamburugamuva
I was trying to preserve everything including whitespaces incase the call to macro does not have a macro definition. But still I couldn't find a proper solution. I'm not a Javacc expert and if someone can give me a hint I'd really appreciate it. Regards, Supun.

Compiling Parser using JavaCC

2007-07-26 Thread Supun Kamburugamuva
Hi, Can I directly compile the Parser.jj and put the generated files in to Velocity? If the changes are done to the generated files manually and they are not reflected in the parser.jj this can be a issue. Regards, Supun.. - To

Including macros using #parse

2007-07-19 Thread Supun Kamburugamuva
Hi, I was looking into the issue of including macros via the #parse method. Following is the my understanding of the problem. The main reason that causes this to be a hard problem to solve without touching the parser implementation is described below. At the moment when the parser encounter a

Re: macros - what's next?

2007-07-09 Thread Supun Kamburugamuva
Hi, I have done according to the Will's suggestions (Not in the way that I have proposed in a previous mail) and there are few issues that need to be solved. They are 1) When a macro is called and if the macro cannot be found libraries normally Velocity prints the macro call i.e #foo(1). But

Re: macros - what's next?

2007-07-04 Thread Supun Kamburugamuva
In our approach we try to call template = Velocity.getTemplate(templateFile); before loading the templates containing the macro definitions. The above call builds the node tree. But if this file contains a call to a macro in a seperate macro file the macro is not registered yet(the macros in

Need a help to Clarify the Macro Namespaces

2007-07-04 Thread Supun Kamburugamuva
Hi, At the moment Velocity macro namespace concept and scoping is not very clear to me. What I would like to know is the policy behind these things i.e. how macros become global, how to determine the namespace of a macro. I would really appreciate it if someone can give me a short description.

Re: macros - what's next?

2007-06-23 Thread Supun Kamburugamuva
Hi, Sorry, I'm little bit confused about what should I do. Can I go ahead and implement the method that you have suggested in the second approach? Supun, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: macros - what's next?

2007-06-17 Thread Supun Kamburugamuva
Hi, In the past few days I was looking into VELOCITY-529 and other issues that you have mention. I would like to start with the VELOCITY-529. But before doing this do I have to resolve VELOCITY-362? Supun. - To unsubscribe,

Re: macros - what's next?

2007-06-17 Thread Supun Kamburugamuva
Hi, In the past few days I was looking into VELOCITY-529 and other issues that you have mention. I would like to start with the VELOCITY-529. But before doing this do I have to resolve VELOCITY-362? Supun.. - To unsubscribe,

[jira] Updated: (VELOCITY-297) Maximum recursion depth for macro calls

2007-06-07 Thread Supun Kamburugamuva (JIRA)
[ https://issues.apache.org/jira/browse/VELOCITY-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Supun Kamburugamuva updated VELOCITY-297: - Attachment: MacroMaxCallDepth.patch I have fixed this issue by giving the user

Re: macros - max recursion depth

2007-06-06 Thread Supun Kamburugamuva
Hi, +1 for velocimacro.depth.max. I have alomost completed the implementation. Can I submit a patch? I'm sure there are lot of things to consider. Supun. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: macros - max recursion depth

2007-06-03 Thread Supun Kamburugamuva
I'm not sure what is the correct place to keep track of macros. I'm keeping track of Macro execution in VelociMacroFactory. Is it sufficient to use the current template name and the macro name to uniquely identify a macro in the runtime? Supun.

Re: macros - max recursion depth

2007-06-02 Thread Supun Kamburugamuva
On 6/1/07, Will Glass-Husain [EMAIL PROTECTED] wrote: I agree with Claude. It seems there are two approaches -- track max recursion: for each macro call in a sequence, track the number of times you call it. (basically, maintain a map of macros with a counter for each) -- track embedded macro

Re: macros - max recursion depth

2007-06-01 Thread Supun Kamburugamuva
I think the first challenge is to discover recursion. I was thinking about discovering recursion when a macro call is being executed. When the node tree is rendered lets say at some point it reaches a macro. At this point, if I can keep track of whether children of this node calls the same macro

Re: Velocity Macro Improvement - GSCO

2007-05-30 Thread Supun Kamburugamuva
but AFAIK not supported since the valid syntax is: #macro (myNamedMacro, $arg1, $arg2, $arg3) ... do something with $arg1, $arg2, $arg3 #end Supporting the former syntax would be great. Claude Le mardi 29 mai 2007 à 18:28 +0530, Supun Kamburugamuva a écrit

Re: Velocity Macro Improvement - GSCO

2007-05-30 Thread Supun Kamburugamuva
On 5/30/07, Henning Schmiedehausen [EMAIL PROTECTED] wrote: Yes, Claude is right. This was unintended (though it would be cool). :-) Supun, if you want to start here, please go in slow steps first. Don't try to tackle all problems at once. First getting the , to work is great (as shown in

Re: Velocity Macro Improvement - GSCO

2007-05-29 Thread Supun Kamburugamuva
time). At the moment I'm working on it and trying to figure out how it should be done. Regards, Supun.. On 5/10/07, Henning P. Schmiedehausen [EMAIL PROTECTED] wrote: Supun Kamburugamuva [EMAIL PROTECTED] writes: Hi Supun, I would like to start working on the macro issues as soon as possible

Velocity Macro Improvement - GSCO

2007-05-08 Thread Supun Kamburugamuva
Hi, I would like to start working on the macro issues as soon as possible. I know the code writing officially starts on 28th May. But I thought starting early would be better. I have gone through the macro code and still I don't have a clear picture of how the macro stuff is working. What I

Re: Need a clarifcation about some issues

2007-04-29 Thread Supun Kamburugamuva
PROTECTED] wrote: Supun Kamburugamuva [EMAIL PROTECTED] writes: 2.I couldn't call inner class methods. I put an inner class object in to Velocity context and then tried to call its methods from the template. But it didn't work. Velocity just outputs the calling method name. Yes, this is AFAIK

Need a clarifcation about some issues

2007-04-27 Thread Supun Kamburugamuva
Hi, I have been playing with Velocity in the past few days. By doing so I encountered couple of problems. I'm not sure weather these are the documented behavior so I thought I should ask the list. 1.I couldn't set a property after I initialize the Velocity Engine (After calling the init()

Re: Need some help with running tests

2007-04-18 Thread Supun Kamburugamuva
. WILL On 4/17/07, Supun Kamburugamuva [EMAIL PROTECTED] wrote: Hi, I got some problems while trying to run test cases. 1. When I try to run the tests using Ant build(ant test) I got the following error. Could not create task or type of type: junit. Ant could not find the task or a class

Re: welcome!

2007-04-15 Thread Supun Kamburugamuva
Hi, Thanks for choosing my project and for the advice. I'm going through the list you have provided (Already I have done most of them). I did subscribe to the mailing lists and got a SVN checkout of the project. As a starting point I'm trying to use Velocity. I have used Velocity previously but

Thank you for choosing my GSOC project

2007-04-13 Thread Supun Kamburugamuva
Hi all, I would like to thank you all for choosing my Google Summer of Code project (Improving Velocity Macro capability) for Velocity. As I'm going to work very closely with you all, I'd like to introduce myself to the list. My name is Supun Kamburugamuva, you can call me Supun. I'm

Re: Google Summer of Code project idea request

2007-03-24 Thread Supun Kamburugamuva
Hi, On the second thought I think I should go with Nathan's point. I have included it in the wiki and removed the expression passing. Thanks, Supun... On 3/24/07, Nathan Bubna [EMAIL PROTECTED] wrote: On 3/24/07, Supun Kamburugamuva [EMAIL PROTECTED] wrote: Hi, Thanks for the feedback. I'll

Re: Google Summer of Code project idea request

2007-03-23 Thread Supun Kamburugamuva
. *On spelling, change cashing to caching. If you want grammar corrections let me know, and i can go through it again and send you a list later today. On 3/21/07, Supun Kamburugamuva [EMAIL PROTECTED] wrote: Hi, I have almost completed my proposal for Veocimacro improvements. It is in http

Re: Google Summer of Code project idea request

2007-03-21 Thread Supun Kamburugamuva
Hi, I have almost completed my proposal for Veocimacro improvements. It is in http://wiki.apache.org/general/GSOC2007/Supun/Velocimacro. I'd really appreciate, if anyone can look in to that. I'm pretty sure there are lot of things that can be improved. Thanks, Supun Kamburugamuva. On 3/18/07

Re: Google Summer of Code project idea request

2007-03-17 Thread Supun Kamburugamuva
Hi, I like to work on macro stuff with velocty as a project for gsoc 2007. I'm new to velocty. So can anyone ponit me to the right direction? Thanks in advance Supun On 3/16/07, Ahmed Mohombe [EMAIL PROTECTED] wrote: Ideas from the community? What about some *real* performance improvements?

Re: Google Summer of Code project idea request

2007-03-16 Thread Supun Kamburugamuva
ideas as well? WILL On 3/15/07, Supun Kamburugamuva [EMAIL PROTECTED] wrote: Hi all, I'm a computer science and engineering undergraduate student at the University of Moratuwa, Sri Lanka. I'm interested in doing a project on Apache/Velocity for the Google Summer of Code 2007 competition. I'm