Bug 510789 - [Feature request] [C++11] Add 'final' option to 'New C++ Class' window.
Summary: [Feature request] [C++11] Add 'final' option to 'New C++ Class' window.
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-other (show other bugs)
Version: 9.1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 10.0.0   Edit
Assignee: Marco Stornelli CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords: ui, usability
Depends on:
Blocks:
 
Reported: 2017-01-20 15:50 EST by soman namos CLA
Modified: 2020-04-09 06:46 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soman namos CLA 2017-01-20 15:50:13 EST
It would be nice to see some checkbox 'final' in New C++ Class which generates 'final' class which denies inheritance in c++11. Small and sweet feature.
Comment 1 Eclipse Genie CLA 2020-02-02 10:16:16 EST
New Gerrit change created: https://git.eclipse.org/r/157025
Comment 3 Jonah Graham CLA 2020-02-14 10:14:40 EST
Hi Marco,

Thank you for the fix. There is a little cleanup needed as the change introduces API changes that imply a major version bump. I have reopened the bug as it needs resolving before the release.

Errors:
The major version should be incremented in version 6.7.0, since API breakage occurred since version 6.6.100
The constant value 255 of the field org.eclipse.cdt.ui.wizards.NewClassCreationWizardPage.ALL_FIELDS has been changed
The field org.eclipse.cdt.ui.wizards.NewClassCreationWizardPage.FINAL_ID has been added to a class
The field org.eclipse.cdt.ui.wizards.NewClassCreationWizardPage.fIsFinalClassField has been added to a class
The field org.eclipse.cdt.ui.wizards.NewClassCreationWizardPage.fIsFinalStatus has been added to a class
Comment 4 Marco Stornelli CLA 2020-02-14 10:32:23 EST
Do we need 7.0.0?
Comment 5 Jonah Graham CLA 2020-02-14 11:25:43 EST
(In reply to Marco Stornelli from comment #4)
> Do we need 7.0.0?

No, we can't bump the major version now as that needs notifcation ahead of time. We may be able to bump it for 2020-06 release in June though.
Comment 6 Marco Stornelli CLA 2020-02-14 12:06:52 EST
I'm a bit confused then, what's the short term action needed now?
Comment 7 Jonah Graham CLA 2020-02-14 12:24:17 EST
Your change has broken API, so you need to rework it to not require a major version bump, or add API filters if this is not real API and just API leaking. However, you are in CDT core the bar is pretty high for just doing a filter.
Comment 8 Jonah Graham CLA 2020-02-14 12:24:55 EST
PS, do you see the errors in your workspace? If not, you need to check your api baseline is set up.
Comment 9 Marco Stornelli CLA 2020-02-14 12:37:02 EST
At the moment I can't see how I could modify it to avoid the modification of ALL_FIELDS or how I could avoid to use additional fields. Tomorrow I will take a look. If there's no way, since it's an enhancement, we could revert the change and insert the modification in 2020-06.
Comment 10 Eclipse Genie CLA 2020-02-14 13:35:44 EST
New Gerrit change created: https://git.eclipse.org/r/157735
Comment 11 Jonah Graham CLA 2020-02-14 13:41:32 EST
(In reply to Eclipse Genie from comment #10)
> New Gerrit change created: https://git.eclipse.org/r/157735

This is an example that makes it API compatible at the Java API level. 

Note that cases like this are nearly impossible to know how to change because the original code did not document the API and how it was intended to be extended. So the change I provided makes the code not generate runtime class loading/method invocation errors, but that is it.
Comment 12 Eclipse Genie CLA 2020-02-15 02:21:45 EST
New Gerrit change created: https://git.eclipse.org/r/157749
Comment 14 Jonah Graham CLA 2020-04-01 12:19:34 EDT
This bug had been targeted at CDT 9.12.0 and is now targeted at CDT 10.0.0. Following announcement on cdt-dev[1] CDT 9.12.0 is no longer being released and instead CDT 10.0.0 will be released in September and CDT 9.11.1 in June.

If this bug/fix needs to be released as soon as possible, please cherry-pick to the CDT 9.11 branch and update the target milestone.


[1] https://www.eclipse.org/lists/cdt-dev/msg34317.html
Comment 15 Eclipse Genie CLA 2020-04-04 03:25:52 EDT
New Gerrit change created: https://git.eclipse.org/r/160468