|
|
Re: [Xpand] Dynamic position of generated text [message #843730 is a reply to message #843704] |
Fri, 13 April 2012 10:07 |
Hai Le Messages: 9 Registered: April 2012 Location: Vietnam |
Junior Member |
|
|
Hi Christian,
Of course it is always working. The point here is that I have a "common" template just like the above sample:
«DEFINE variable FOR X»
int a = 0;
int b = 0;
int c = 0;
«ENDDEFINE»
This template shall be called from the others such as:
«DEFINE class FOR X»
public class MyClass {
«EXPAND variable»
}
«ENDDEFINE»
--> The output here is OK:
public class MyClass {
int a = 0;
int b = 0;
int c = 0;
}
However, due to this template is common, so there is another usecase like this:
«DEFINE class FOR X»
public class MyClass {
public static String methodA() {
«EXPAND variable»
}
}
«ENDDEFINE»
The code is actually generated as:
public class MyClass {
public static String methodA() {
int a = 0;
int b = 0;
int c = 0;
}
}
But expected as:
public class MyClass {
int a = 0;
int b = 0;
int c = 0;
public static String methodA() {
int a = 0;
int b = 0;
int c = 0;
}
}
How do you think?
[Updated on: Fri, 13 April 2012 10:08] Report message to a moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04571 seconds