Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348574 - [quickfix] implement abstract methods from tsuper
Summary: [quickfix] implement abstract methods from tsuper
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTDT (show other bugs)
Version: 2.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 2.1 M3   Edit
Assignee: Project Teams CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-07 10:24 EDT by Stephan Herrmann CLA
Modified: 2012-09-22 11:27 EDT (History)
0 users

See Also:


Attachments
tests & fix (12.23 KB, patch)
2011-10-04 16:47 EDT, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2011-06-07 10:24:42 EDT
If a non-abstract role overrides an abstract role from the super team,
missing implementations for abstract methods (incl. abstract static)
are not reported well:
- error has no valid location (shown at position 0)
- error differs between building and reconciling
- error has no quickfix.
Comment 1 Stephan Herrmann CLA 2011-08-27 10:32:54 EDT
Shouldn't be too hard to fix.
Comment 2 Stephan Herrmann CLA 2011-10-04 14:42:50 EDT
(In reply to comment #0)
> If a non-abstract role overrides an abstract role from the super team,
> missing implementations for abstract methods (incl. abstract static)
> are not reported well:
> - error has no valid location (shown at position 0)
> - error differs between building and reconciling

This was resolved in duplicate bug 355311.

> - error has no quickfix.

This will be fixed here (changing the bug title accordingly).
Comment 3 Stephan Herrmann CLA 2011-10-04 16:47:56 EDT
Created attachment 204551 [details]
tests & fix

Fix comes in two steps:

Must report AbstractMethodMustBeImplemented also for copy-inherited
abstract methods. -> This will trigger the desired quickfixes

Must catch CCE in ModifierCorrectionSubProcessor.addAbstractMethodProposals:
it is expected that the error location is a method declaration,
but copy-inherited method has no local AST, so we find the type decl instead.

Tests:
+ new OTReconcilerTests.testBug348574a()
  Check that problem reported in comment 0 is really resolved
+ Adjust expected result in ImplicitInheritance
+ JavaQuickFixTests for the actual quickfixes
Comment 4 Stephan Herrmann CLA 2011-10-04 16:52:46 EDT
Released for 2.1 M3 (r2034-38)
Comment 5 Stephan Herrmann CLA 2012-09-22 11:27:18 EDT
Verified using build 2.2.1.201209182002