TMF Xtext Getting Started Example [message #50972] |
Sat, 13 June 2009 16:07  |
Eclipse User |
|
|
|
Originally posted by: oba.informatik.uni-kiel.de
Hi all,
I have downloaded this
distribution( http://oaw.itemis.de/openarchitectureware/language=de/660/do wnloads)
to complete this tutorial (http://wiki.eclipse.org/Xtext/GettingStarted).
Until the step called "Content Generation" everything works fine. When I
start workflow-->MyDslGenerator.mwe as a workflow, I get the following
console output:
0 [main] INFO eclipse.emf.mwe.core.WorkflowRunner -
------------------------------------------------------------ --------------------------
9 [main] INFO eclipse.emf.mwe.core.WorkflowRunner - EMF Modeling
Workflow Engine 0.7.0, Build v200906091110
9 [main] INFO eclipse.emf.mwe.core.WorkflowRunner - (c) 2005-2009
openarchitectureware.org and contributors
9 [main] INFO eclipse.emf.mwe.core.WorkflowRunner -
------------------------------------------------------------ --------------------------
9 [main] INFO eclipse.emf.mwe.core.WorkflowRunner - running
workflow:
/home/oba/Desktop/oba_workspaces/KIELER_KIT/org.xtext.exampl e.mydsl.generator/src/workflow/MyDslGenerator.mwe
9 [main] INFO eclipse.emf.mwe.core.WorkflowRunner -
268 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering
platform uri '/home/oba/Desktop/oba_workspaces/KIELER_KIT'
748 [main] INFO e.core.container.CompositeComponent -
DirectoryCleaner: cleaning directory 'src-gen'
749 [main] INFO ipse.emf.mwe.utils.DirectoryCleaner - Cleaning
/home/oba/Desktop/oba_workspaces/KIELER_KIT/org.xtext.exampl e.mydsl.generator/src-gen
749 [main] INFO e.core.container.CompositeComponent - MweReader:
loading file from classpath:/model/MyModel.mydsl
969 [main] INFO e.core.container.CompositeComponent - Generator:
generating 'templates::Template::main FOR model' => []
1001 [main] ERROR eclipse.emf.mwe.core.WorkflowRunner - no viable
alternative at character ';' on line 15
org.eclipse.internal.xtend.xtend.parser.ParseException: no viable
alternative at character ';' on line 15
at
org.eclipse.internal.xpand2.parser.XpandParseFacade$3.handle Error(XpandParseFacade.java:77)
at
org.eclipse.internal.xpand2.parser.XpandParseFacade$1.report Error(XpandParseFacade.java:57)
at org.antlr.runtime.Lexer.nextToken(Lexer.java:119)
at
org.antlr.runtime.CommonTokenStream.fillBuffer(CommonTokenSt ream.java:119)
at org.antlr.runtime.CommonTokenStream.LT(CommonTokenStream.jav a:238)
at
org.eclipse.internal.xpand2.parser.XpandLocationAddingParser .start(XpandLocationAddingParser.java:43)
at
org.eclipse.internal.xpand2.parser.XpandLocationAddingParser .template(XpandLocationAddingParser.java:289)
at
org.eclipse.internal.xpand2.parser.XpandParseFacade.file(Xpa ndParseFacade.java:44)
at
org.eclipse.internal.xpand2.parser.XpandParseFacade.file(Xpa ndParseFacade.java:31)
at
org.eclipse.xpand2.XpandExecutionContextImpl$1.parse(XpandEx ecutionContextImpl.java:92)
at
org.eclipse.xtend.expression.ResourceManagerDefaultImpl.load Resource(ResourceManagerDefaultImpl.java:70)
at
org.eclipse.xpand2.XpandExecutionContextImpl.findTemplate(Xp andExecutionContextImpl.java:193)
at
org.eclipse.xpand2.XpandExecutionContextImpl.findTemplate(Xp andExecutionContextImpl.java:186)
at
org.eclipse.xpand2.XpandExecutionContextImpl.findDefinition( XpandExecutionContextImpl.java:145)
at
org.eclipse.internal.xpand2.ast.ExpandStatement.invokeDefini tion(ExpandStatement.java:174)
at
org.eclipse.internal.xpand2.ast.ExpandStatement.evaluateInte rnal(ExpandStatement.java:167)
at org.eclipse.internal.xpand2.ast.Statement.evaluate(Statement .java:39)
at org.eclipse.xpand2.Generator.invokeInternal2(Generator.java: 334)
at
org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflo wComponent.invokeInternal(AbstractExpressionsUsingWorkflowCo mponent.java:191)
at
org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invok e(AbstractWorkflowComponent.java:118)
at
org.eclipse.emf.mwe.core.container.CompositeComponent.intern alInvoke(CompositeComponent.java:101)
at
org.eclipse.emf.mwe.core.container.CompositeComponent.invoke (CompositeComponent.java:86)
at
org.eclipse.emf.mwe.core.WorkflowRunner.executeWorkflow(Work flowRunner.java:412)
at org.eclipse.emf.mwe.core.WorkflowRunner.run(WorkflowRunner.j ava:292)
at org.eclipse.emf.mwe.core.WorkflowRunner.main(WorkflowRunner. java:239)
1002 [main] ERROR eclipse.emf.mwe.core.WorkflowRunner - [ERROR]: no
viable alternative at character ';' on line 15(Element: EXPAND
templates::Template::main FOR model; Reported by: Generator: generating
'templates::Template::main FOR model' => [])
I really would appreciate it, when someone knows what is going on here
for I have no idea. I have been sitting at my desk for hours to no avail...
Thanks in advance
oba
|
|
|
|
Re: TMF Xtext Getting Started Example [message #51191 is a reply to message #51084] |
Sun, 14 June 2009 10:44  |
Eclipse User |
|
|
|
Originally posted by: oba.informatik.uni-kiel.de
Sven Efftinge wrote:
> Hi oba,
>
> it seems that your system file encoding is different to the one you use
> in your workspace. Xpand has these guillemeot characters ('«' and '»'),
> whichs code is different from encoding to encoding.
> You've therefore to make sure that templates are loaded iusing the same
> encoding they have been developed in.
>
> In MyDslGenerator.mwe the encoding can be configured like so:
>
> <component class="org.eclipse.xpand2.Generator">
> <metaModel
> class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel "/>
>
> <!-- add the following -->
> <fileEncoding value="UTF-8"/>
>
> <expand value="templates::Template::main FOR model"/>
> <genPath value="src-gen"/>
> </component>
>
Thank you so much! Changing the workspace encoding has solved my
problem. After reading your message, I realized that I have question
marks everywhere in the Template.xpt instead of the guillemeot
characters ('«' and '»').
> I've changed the wizard so that the workspace encoding is > >
automatically
> configured.
I assume, this will be available in the new TMF update. Thanks,
oba
|
|
|
Powered by
FUDForum. Page generated in 0.07659 seconds