Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Misplaced annotations
Misplaced annotations [message #434862] Tue, 15 April 2008 16:45 Go to next message
Mike Yawn is currently offline Mike YawnFriend
Messages: 50
Registered: July 2009
Member
This only happens when my own code generator is active, not with the
standard Dali code gen, so the problem is obviously mine. But since I'm
not yet clear on how the mapping is done between editor and JPA details
view, maybe someone can nudge me in the right direction . . .

When I select a 'get' method in the editor, the corresponding mapping
details are shown in the JPA Details view. Most modifications that I
make in the detail view are correctly mapped as annotations and applied
to the editor. However, the @Temporal and @Enumerated annotations
behave oddly:
1) The correct annotation is attached to the wrong place -- it
appears on the method preceding the one that should have received the
annotation.
2) A second annotation is attached in the correct location -- but the
annotation has only the annotation itself, not the value attribute.

For example, I selected the 'getDate' method in the example below, and
made selections in JPA Details to cause Basic, Temporal, and Embedded
annotations to be added. Here is the result:

public String getInstruction();

@Temporal(DATE)
@Enumerated(ORDINAL)
public void setInstruction(String instruction);

@Temporal
@Enumerated
@Basic
public Date getDate();

public void setDate(Date date);

There shouldn't be any annotations on the setInstruction method, and the
(DATE) and (ORDINAL) attribute values should be attached to the
annotation on the getDate() method.

Any ideas on this? I'm trying to work my way through the inheritance
hierarchy and understand the various classes that implement/extend Model
and JavaResourceNode, as I suspect the answer is in there somewhere.

Thanks,
Mike
Re: Misplaced annotations [message #434864 is a reply to message #434862] Tue, 15 April 2008 17:18 Go to previous message
Karen Butzke is currently offline Karen ButzkeFriend
Messages: 220
Registered: July 2009
Senior Member
Mike,

Actually, this is reproducible with just Dali, but only if you use
property access instead of field access. I just entered
https://bugs.eclipse.org/bugs/show_bug.cgi?id=227160 for this problem.
Appears you found another manifestation of a larger problem we are trying
to solve.

Karen
Re: Misplaced annotations [message #610515 is a reply to message #434862] Tue, 15 April 2008 17:18 Go to previous message
Karen Butzke is currently offline Karen ButzkeFriend
Messages: 220
Registered: July 2009
Senior Member
Mike,

Actually, this is reproducible with just Dali, but only if you use
property access instead of field access. I just entered
https://bugs.eclipse.org/bugs/show_bug.cgi?id=227160 for this problem.
Appears you found another manifestation of a larger problem we are trying
to solve.

Karen
Previous Topic:Generating Interfaces
Next Topic:Any guidelines (now or planned) for extenders?
Goto Forum:
  


Current Time: Tue Apr 23 09:49:31 GMT 2024

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

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

Back to the top