Error while generating model [message #636233] |
Fri, 29 October 2010 19:21 |
saurav sarkar Messages: 428 Registered: July 2009 |
Senior Member |
|
|
Hi All,
I had an existing model which was working fine.
I made some changes to the ecore, now when i try to generate the model code.
I get 'Problem encountered while generating model code'.
This is what i get in the stack trace
!ENTRY org.eclipse.emf.codegen.ecore 2 0 2010-10-30 00:39:51.564
!MESSAGE org.eclipse.emf.common.util.DiagnosticException: A problem was detected while parsing a Java file
!STACK 0
org.eclipse.emf.common.util.WrappedException: org.eclipse.emf.common.util.DiagnosticException: A problem was detected while parsing a Java file
at org.eclipse.emf.codegen.merge.java.facade.ast.ASTFacadeHelper.createCompilationUnit(ASTFacadeHelper.java:285)
at org.eclipse.emf.codegen.merge.java.facade.ast.ASTFacadeHelper.createCompilationUnit(ASTFacadeHelper.java:1)
at org.eclipse.emf.codegen.merge.java.JMerger.createCompilationUnitForContents(JMerger.java:381)
at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.generateJava(AbstractGeneratorAdapter.java:998)
at org.eclipse.emf.codegen.ecore.genmodel.generator.GenClassGeneratorAdapter.generateInterface(GenClassGeneratorAdapter.java:123)
at org.eclipse.emf.codegen.ecore.genmodel.generator.GenClassGeneratorAdapter.generateModel(GenClassGeneratorAdapter.java:106)
at org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter.doGenerate(GenBaseGeneratorAdapter.java:221)
at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.generate(AbstractGeneratorAdapter.java:290)
at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:617)
at org.eclipse.emf.codegen.ecore.genmodel.presentation.GeneratorUIUtil$GeneratorOperation.execute(GeneratorUIUtil.java:167)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
I reverted the changes made to the model, but still getting the same error.I ran the validation check on the model its not reporting any errors.I am clueless as what is happening
Thanks and Regards,
Saurav
My Blog http://codifyit.blogspot.com/
Follow me: http://twitter.com/sauravs
|
|
|
|
|
Re: Error while generating model [message #636258 is a reply to message #636238] |
Fri, 29 October 2010 21:58 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Saurav,
That's very strange. I can't imagine how that would happen, except
maybe if you have a model documentation annotation that has such an
extra pair of characters...
saurav wrote:
> Thanks Ed for the reply.
>
> I was reluctant to delete the model classes since i was depending on
> them heavily :p
> anyways i took a backup and deleted the files and generated them again
> ...very strangely the class comment section is generating with an
> extra '*/', that makes the syntax error.
> I am sure i did not touch any templates :p
>
> Now i removed the syntaxes and the test cases work fine.But i am
> circumspect that this problem remains.
>
> cheers,
> Saurav
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03069 seconds