Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316692

Summary: [otmodel] Anonymous classes not completely handled in OT-model
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTDTAssignee: Project Teams <objectteams.otdt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 1.4   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: trac

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).