|
|
|
|
Re: [XPAND] Problems with getting started with defining extension [message #553173 is a reply to message #553116] |
Mon, 16 August 2010 15:26 |
Yvette Messages: 13 Registered: May 2010 |
Junior Member |
|
|
Hi Christian,
thanks a lot. I tried it without the extension and it works fine.
But it might be something else, I think the error message is quite strange:
EvaluationException : mismatched input '«' expecting EOF on line 1
GeneratateDimension.xpt[470,24] on line 25 'ReplaceWS("Hello World")'
[23,45] on line 1 'EXPAND GeneratateDimension::csClass FOR model'
1328 ERROR WorkflowRunner - Workflow interrupted. Reason: mismatched input '«' expecting EOF on line 1
1328 ERROR WorkflowRunner - [ERROR]: mismatched input '«' expecting EOF on line 1(Element: ReplaceWS("Hello World"); Reported by: Generator: generating 'GeneratateDimension::csClass FOR model' => src-gen/)
1328 ERROR WorkflowRunner - [ERROR]: mismatched input '«' expecting EOF on line 1(Element: EXPRESSION: ReplaceWS("Hello World"); Reported by: Generator: generating 'GeneratateDimension::csClass FOR model' => src-gen/)
1328 ERROR WorkflowRunner - [ERROR]: mismatched input '«' expecting EOF on line 1(Element: org.eclipse.internal.xpand2.ast.FileStatement@1fe1feb; Reported by: Generator: generating 'GeneratateDimension::csClass FOR model' => src-gen/)
1328 ERROR WorkflowRunner - [ERROR]: mismatched input '«' expecting EOF on line 1(Element: csClass : Dimension; Reported by: Generator: generating 'GeneratateDimension::csClass FOR model' => src-gen/)
1328 ERROR WorkflowRunner - [ERROR]: mismatched input '«' expecting EOF on line 1(Element: EXPAND GeneratateDimension::csClass FOR model; Reported by: Generator: generating 'GeneratateDimension::csClass FOR model' => src-gen/)
Encoding problems?
Thanks Yvette
[Updated on: Mon, 16 August 2010 15:27] Report message to a moderator
|
|
|
|
Re: [XPAND] Problems with getting started with defining extension [message #559451 is a reply to message #553116] |
Thu, 16 September 2010 16:33 |
Eclipse User |
|
|
|
Originally posted by: till.tillamma.de
Hi,
comment below.
Till
On 08/16/2010 03:59 PM, Yvette wrote:
> Hello,
> I am still new in generating text via Xpand. I want to use java Code in
> my Template. For this I implemented the following java class
>
>
> public class Helper
> {
> public static String ReplaceWS(String s)
> {
> return s.replace(' ', '_');
> }
> }
>
>
>
> Then I defined and extension class called GeneratorExtension.ext, with
> the following content
>
>
> «IMPORT autoMaisDimension»
As far as i know there is no use of the Guilletmots in an extension. The
correct Syntax would be:
import autoMaisDimension;
>
> java.lang.String ReplaceWS(String s) : JAVA Helper.ReplaceWS();
>
> In my template file, I use this lines to call the code:
>
>
> «IMPORT autoMaisDimension»
> «EXTENSION GeneratorExtension»
> «DEFINE csClass FOR Dimension»
>
> ...
>
> «ReplaceWS("Hello World")»
>
>
> I get the following error.
>
> 828 INFO CompositeComponent - Generator: generating
> 'GeneratateDimension::csClass FOR model' => src-gen/
> 1219 ERROR AbstractExpressionsUsingWorkflowComponent - Error in
> Component of type org.eclipse.xpand2.Generator: EvaluationException :
> mismatched input '«' expecting EOF on line 1
> GeneratateDimension.xpt[469,24] on line 24 'ReplaceWS("Hello World")'
> [23,45] on line 1 'EXPAND GeneratateDimension::csClass FOR model'
> 1219 ERROR WorkflowRunner - Workflow interrupted. Reason: mismatched
> input '«' expecting EOF on line 1
> 1219 ERROR WorkflowRunner - [ERROR]: mismatched input '«' expecting EOF
> on line 1(Element: ReplaceWS("Hello World"); Reported by: Generator:
> generating 'GeneratateDimension::csClass FOR model' => src-gen/)
> 1219 ERROR WorkflowRunner - [ERROR]: mismatched input '«' expecting EOF
> on line 1(Element: EXPRESSION: ReplaceWS("Hello World"); Reported by:
> Generator: generating 'GeneratateDimension::csClass FOR model' => src-gen/)
> 1219 ERROR WorkflowRunner - [ERROR]: mismatched input '«' expecting EOF
> on line 1(Element:
> org.eclipse.internal.xpand2.ast.FileStatement@1581593; Reported by:
> Generator: generating 'GeneratateDimension::csClass FOR model' => src-gen/)
> 1219 ERROR WorkflowRunner - [ERROR]: mismatched input '«' expecting EOF
> on line 1(Element: csClass : Dimension; Reported by: Generator:
> generating 'GeneratateDimension::csClass FOR model' => src-gen/)
> 1219 ERROR WorkflowRunner - [ERROR]: mismatched input '«' expecting EOF
> on line 1(Element: EXPAND GeneratateDimension::csClass FOR model;
> Reported by: Generator: generating 'GeneratateDimension::csClass FOR
> model' => src-gen/)
>
>
> Any idea what I made wrong? Do I have to define my extension in the
> workflow file?
>
> Thanks a lot
> Yvette
>
|
|
|
Powered by
FUDForum. Page generated in 0.26850 seconds