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

Bug 355311

Summary: error regarding abstract method in non-abstract role may be displayed at position 0
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTJAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1 M2   
Hardware: Other   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Test & fix none

Description Stephan Herrmann CLA 2011-08-21 07:37:49 EDT
If a role implicitly inherits one or more abstract methods, the error

 The abstract method foo in type Product can only be defined by an abstract class

will be displayed at position 0 of the text buffer. Since we cannot
highlight the invisible abstract method we should at least position
the error at the role class.
Comment 1 Stephan Herrmann CLA 2011-08-21 13:09:07 EDT
Created attachment 201872 [details]
Test & fix

Patch contains a test and fixes the problem by assigning valid
source positions to copied method declarations.

This should *not* affect the generated code because source positions of
a copied method are copied directly from the inherited byte code
(plus adjustment from BytecodeTransformer.mapLines(..)).
Comment 2 Stephan Herrmann CLA 2011-08-21 13:09:52 EDT
Patch has been release for 2.1M2
Comment 3 Stephan Herrmann CLA 2012-06-05 17:51:50 EDT
Verified for 2.1 using build 201206040338.