Bug 551395

Summary: Clean-up action to add missing @Override annotations changes unrelated line indentation type
Product: [Eclipse Project] JDT Reporter: Simeon Andreev <simeon.danailov.andreev>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: christian.dietrich.opensource, loskutov
Version: 4.12   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Simeon Andreev CLA 2019-09-24 02:27:43 EDT
If a project is configured to use white spaces but its source has tab, the "Add missing @Override annotations" action will change the indentation type (from tab to spaces) of the method definitions, for methods that lack the @Override annotation.

Background:

We have quite a few projects that are missing @Override annotations and would like to add them at once with the respective clean-up action. Some projects have changed formatting settings but not all their sources were updated, i.e. we have in some cases tabs in source but white spaces configured in the formatter.

When I run the action, I see *a ton of* similar changes:

+	@Override
+    public void run(IAction action) {
 	    EditorExamplesUI.main(null);
 	}

I.e. the clean-up action changes the formatting of the next line, for me at least with no apparent reason. This is not nice; it will probably force us to first format all files (a really huge change) and only then apply the actual clean-up action that we wanted in the first place.
Comment 1 Eclipse Genie CLA 2021-09-14 03:08:30 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Eclipse Genie CLA 2023-09-05 13:39:34 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.