Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316692 - [otmodel] Anonymous classes not completely handled in OT-model
Summary: [otmodel] Anonymous classes not completely handled in OT-model
Status: NEW
Alias: None
Product: Objectteams
Classification: Tools
Component: OTDT (show other bugs)
Version: 1.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Teams CLA
QA Contact:
URL:
Whiteboard: trac
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-12 20:11 EDT by Stephan Herrmann CLA
Modified: 2010-06-29 10:09 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2010-06-12 20:11:06 EDT
(originally from http://trac.objectteams.org/ot/ticket/207)

(From Jira:TPX-95) 
 an anonymous type which is instantiated within the scope of a teamlevel-attribute assignment can only be found if 
 the anonymous class declares an innerclass (see org.objectteams.otdt.test.otmodel.anonymousinnerclass.teamlevel.Test5) 
 in all other cases it can not be found (see org.objectteams.otdt.test.otmodel.anonymousinnerclass.teamlevel.Test1, Test3 and Test7) 
 if the anonymous type is instantiated in the scope of a method it can always be found (see org.objectteams.otdt.test.otmodel.anonymousinnerclass.teamlevel.Test2, Test 4, Test6 and Test8) 
 Seems that the SourceElementParser doesn't parse anonymous types correctly. In method notifySourceElementRequestor(TypeDeclaration, boolean) the given TypeDeclaration does not contain the anonymous class in the mentioned cases. 
Note, that tests in org.objectteams.otdt.test.otmodel.anonymousinnerclass are currently disabled.

(comment:1)
Rechecking in 1.3.1 seems to indicate that 
 * anonymous classes within roles/teams are not generally a problem 
 * anonymous classes in role field initializers are generally not available in
   the otmodel 
 * anonymous classes can not have team or role properties. 
17 tests out of 60 currently pass. 

Might want to add jacks tests for anonymous roles etc (and check whether the 
OTJLD requires an update in this regard).