Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Texo] How to add java annotation whose full qualified name only contain one DOT
[Texo] How to add java annotation whose full qualified name only contain one DOT [message #808228] Mon, 27 February 2012 14:55 Go to next message
Henry He is currently offline Henry HeFriend
Messages: 4
Registered: February 2012
Junior Member
I am trying to add @lombok.EqualsAndHashCode as follwing.

<eClassifiers xsi:type="ecore:EClass" name="Policy">
<eAnnotations source="texo.java.annotation">
<details key="type" value="@lombok.EqualsAndHashCode(callSuper=false, of={&quot;effectDate&quot;, &quot;expiryDate&quot;, &quot;policyId&quot;, &quot;policyNo&quot;, &quot;grossPremium&quot;, &quot;netPremium&quot;, &quot;taxAndFee&quot;})"/>
</eAnnotations>
...

However I encounter an error "org.eclipse.text.edits.MalformedTreeException: Overlapping text edits". Please help.

Here is the error stack.
Caused by: java.lang.IllegalStateException: org.eclipse.text.edits.MalformedTreeException: Overlapping text edits
at org.eclipse.emf.texo.generator.ImportResolver.resolve(ImportResolver.java:168)
at org.eclipse.emf.texo.generator.SourceMerger.organizeImports(SourceMerger.java:144)
at org.eclipse.emf.texo.generator.SourceMerger.merge(SourceMerger.java:73)
at org.eclipse.emf.texo.generator.MergingOutputHandler.beforeWriteAndClose(MergingOutputHandler.java:63)
at org.eclipse.xpand2.output.Outlet.beforeWriteAndClose(Outlet.java:98)
at org.eclipse.xpand2.output.FileHandleImpl.writeAndClose(FileHandleImpl.java:137)
...
Caused by: org.eclipse.text.edits.MalformedTreeException: Overlapping text edits
at org.eclipse.text.edits.TextEdit$InsertionComparator.compare(TextEdit.java:121)
at java.util.Collections.indexedBinarySearch(Collections.java:319)
at java.util.Collections.binarySearch(Collections.java:307)
at org.eclipse.text.edits.TextEdit.computeInsertionIndex(TextEdit.java:796)
at org.eclipse.text.edits.TextEdit.internalAdd(TextEdit.java:781)
at org.eclipse.text.edits.TextEdit.addChild(TextEdit.java:335)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.addEdit(ASTRewriteAnalyzer.java:271)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doTextRemove(ASTRewriteAnalyzer.java:331)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doTextRemoveAndVisit(ASTRewriteAnalyzer.java:339)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.rewriteRequiredNode(ASTRewriteAnalyzer.java:731)
at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.visit(ASTRewriteAnalyzer.java:2707)
Re: [Texo] How to add java annotation whose full qualified name only contain one DOT [message #808292 is a reply to message #808228] Mon, 27 February 2012 16:04 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
Is it this annotation, or are there also other annotations in the model? Can you enter a bugzilla with an example model,
then I can take it from there.

Thanks!

gr. Martin

On 02/27/2012 03:55 PM, Henry He wrote:
> I am trying to add @lombok.EqualsAndHashCode as follwing.
> <eClassifiers xsi:type="ecore:EClass" name="Policy">
> <eAnnotations source="texo.java.annotation">
> <details key="type" value="@lombok.EqualsAndHashCode(callSuper=false, of={"effectDate", "expiryDate", "policyId",
> "policyNo", "grossPremium", "netPremium", "taxAndFee"})"/>
> </eAnnotations>
> ...
>
> However I encounter an error "org.eclipse.text.edits.MalformedTreeException: Overlapping text edits". Please help.
>
> Here is the error stack.
> Caused by: java.lang.IllegalStateException: org.eclipse.text.edits.MalformedTreeException: Overlapping text edits
> at org.eclipse.emf.texo.generator.ImportResolver.resolve(ImportResolver.java:168)
> at org.eclipse.emf.texo.generator.SourceMerger.organizeImports(SourceMerger.java:144)
> at org.eclipse.emf.texo.generator.SourceMerger.merge(SourceMerger.java:73)
> at org.eclipse.emf.texo.generator.MergingOutputHandler.beforeWriteAndClose(MergingOutputHandler.java:63)
> at org.eclipse.xpand2.output.Outlet.beforeWriteAndClose(Outlet.java:98)
> at org.eclipse.xpand2.output.FileHandleImpl.writeAndClose(FileHandleImpl.java:137)
> ...
> Caused by: org.eclipse.text.edits.MalformedTreeException: Overlapping text edits
> at org.eclipse.text.edits.TextEdit$InsertionComparator.compare(TextEdit.java:121)
> at java.util.Collections.indexedBinarySearch(Collections.java:319)
> at java.util.Collections.binarySearch(Collections.java:307)
> at org.eclipse.text.edits.TextEdit.computeInsertionIndex(TextEdit.java:796)
> at org.eclipse.text.edits.TextEdit.internalAdd(TextEdit.java:781)
> at org.eclipse.text.edits.TextEdit.addChild(TextEdit.java:335)
> at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.addEdit(ASTRewriteAnalyzer.java:271)
> at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doTextRemove(ASTRewriteAnalyzer.java:331)
> at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doTextRemoveAndVisit(ASTRewriteAnalyzer.java:339)
> at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.rewriteRequiredNode(ASTRewriteAnalyzer.java:731)
> at org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.visit(ASTRewriteAnalyzer.java:2707)


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Texo] How to add java annotation whose full qualified name only contain one DOT [message #809624 is a reply to message #808292] Wed, 29 February 2012 03:53 Go to previous messageGo to next message
Henry He is currently offline Henry HeFriend
Messages: 4
Registered: February 2012
Junior Member
Thanks. Bug 372813
Re: [Texo] How to add java annotation whose full qualified name only contain one DOT [message #809695 is a reply to message #809624] Wed, 29 February 2012 06:10 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
I have seen both bugzillas. I will comment/update the bug when they are solved (a week or so).

gr. Martin

On 02/29/2012 04:53 AM, Henry He wrote:
> Thanks. Bug 372813


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:[Texo] Annotate EAttribute whose type was EEnum by ModelGenAnnotator take too much time
Next Topic:safe bi-directional association API for many to many association
Goto Forum:
  


Current Time: Fri Apr 26 18:29:35 GMT 2024

Powered by FUDForum. Page generated in 0.02981 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top