Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313934 - @Override missing on overridden methods
Summary: @Override missing on overridden methods
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Windows Vista
: P3 minor (vote)
Target Milestone: RC5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-21 11:59 EDT by Ed Willink CLA
Modified: 2017-09-19 15:54 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: helios+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2010-05-21 11:59:30 EDT
RC1: Auto-generated modules such as AbstractXXXProposalProvider do not have on @Override annotation on overridden methods.
Comment 1 Sven Efftinge CLA 2010-05-21 14:14:20 EDT
That is true, but we suppress all warnings for those files, so it shouldn't be an issue.
Does it cause you any trouble?
Comment 2 Ed Willink CLA 2010-05-21 14:42:40 EDT
Prior to M7 there were so many warnings that project-specific compiler settings were essential.

M7 gave such a major improvement that I could restore settings to the same as for other MDT/OCL pligins; except that NLS must still be switched off. Some @suppressWarnings(NLS) would be good.

When I regenerate editors, I have to manually add the @Overrides, mostly to the RunTimeModules. It is the in the grammars that you switched off all warnings.

Not a major problem; just a nuisance; hence the minor severity on the report.

Perhaps an @suppressWarnings(Override) on the relevant classes would do, unless the generation template is almost direct copy in which case fix the copy source.
Comment 3 Sven Efftinge CLA 2010-05-25 03:12:08 EDT
We don't want to suppress warnings in user managed code (e.g. <MyLanguage>RuntimeModule). The manually adding of @Overrides was only needed once, wasn't it? 

Regarding the NLS warnings. I checked with the default compiler settings and couldn't find NLS warnings in the generated code. If I missed them, could you please open a new bugzilla and provide some information about which generated classes should suppress these warnings? thanks.
Comment 4 Ed Willink CLA 2010-05-25 12:20:40 EDT
Having now regenerated my editors a few times at RC1, I've found that most of the @Override issues were indeed fixed. Typically I now have 18 rather than 120 overrides to restore in 3 files. The residual ones seem to be solely in AbstractXXXProposalProvider where a derived editor overrides an inherited editor's proposals.
Comment 5 Sebastian Zarnekow CLA 2010-06-14 04:18:31 EDT
See comment 4
Comment 6 Sebastian Zarnekow CLA 2010-06-14 05:50:58 EDT
Fixed in HEAD.
Comment 7 Karsten Thoms CLA 2017-09-19 15:54:00 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.