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

Bug 362972

Summary: [quick fix] quick fix on invalid error marker produces wrong code (was: Late update on fixed problem)
Product: [Eclipse Project] JDT Reporter: Gregory Ryan Norris <gregrnorris>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: daniel_megert, deepakazad
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
Screen Shot before fixing it.
none
Screen Shot Eclipse still shows error after fixing
none
Screen Shot Eclipse auto-fix breaks my comments. none

Description Gregory Ryan Norris CLA 2011-11-05 14:48:52 EDT
Build Identifier: I20110613-1736

I imported a bunch of packages from another project and they didn't add the proper package identifier.  I corrected this and it showed that the package was not declared properly on the comment line at the top.  As I was writing this report I noticed that it started reporting correctly but that was probably 5 minutes after the fact (not helpful).

Reproducible: Always

Steps to Reproduce:
1. Can't remember if used import manager or just copied data directly
2. Fix a package declaration (manually type the new declaration)
3. The problem doesn't claim to be fixed and it gives an option for fixed that changes the first couple line of the top line (where my comments are) to the package name (but not a proper package declaration).
Comment 1 Gregory Ryan Norris CLA 2011-11-05 14:56:50 EDT
Created attachment 206490 [details]
Screen Shot before fixing it.
Comment 2 Gregory Ryan Norris CLA 2011-11-05 14:57:24 EDT
Created attachment 206491 [details]
Screen Shot Eclipse still shows error after fixing
Comment 3 Gregory Ryan Norris CLA 2011-11-05 14:58:10 EDT
Created attachment 206492 [details]
Screen Shot Eclipse auto-fix breaks my comments.
Comment 4 Gregory Ryan Norris CLA 2011-11-05 15:01:22 EDT
The 3 attachments are made in order of what I did.  I know if I stop after step two it will eventually detect that I actually fixed the problem and stop showing the error.
Comment 5 Deepak Azad CLA 2011-11-23 05:57:04 EST
(In reply to comment #2)
> Created attachment 206491 [details]
> Screen Shot Eclipse still shows error after fixing

I think you had disabled 'Build Automatically'. Can you please confirm this?

(In reply to comment #3)
> Created attachment 206492 [details]
> Screen Shot Eclipse auto-fix breaks my comments.

Steps to reproduce
- Enable 'Build Automatically'
- Create a java file with missing package statement => error
- Disable 'Build Automatically'
- Add the package statement via quick fix or manually. => error remains because nothing is built
- Use the quick fix again => Only the package name is added to the java file as shown in the screenshot.
Comment 6 Eclipse Genie CLA 2020-02-01 10:31:24 EST
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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.