Bug 13008 - Move a Java file, errors remain
Summary: Move a Java file, errors remain
Status: RESOLVED DUPLICATE of bug 2857
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 14193 (view as bug list)
Depends on: 2857
Blocks:
  Show dependency tree
 
Reported: 2002-04-08 11:58 EDT by Jed Anderson CLA
Modified: 2003-03-17 12:03 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jed Anderson CLA 2002-04-08 11:58:33 EDT
Build: 20020404

If you move a Java file that has errors in it from a source folder to somewhere
not on the build path the errors remain.  Then if you rebuild all, the error
disappears.  Moving the file to its previous location produces an error again.

To reproduce this problem:
1. Start with a new workspace
2. Switch to Java perspective
3. Create a Java project
4. Create a source folder "src", set the output folder to "bin"
5. Create another folder "not-src", but do not put it on the build path
6. Create a Java file in src, Foo.java.
7. Make an error in Foo.java.
8. Save, autobuild runs and you should get an error. (expected)
9. Move (either drag & drop, or move... from the popup) Foo.java to the folder
not-src
10. The error remains, even though the file is no longer being built. (<-- NOT
expected)
11. Rebuild all, the error disappears (expected)
12. Move Foo.java back, the error reappears (expected)
Comment 1 Erich Gamma CLA 2002-04-09 08:52:07 EDT
Markers are attached to a resource and move with the resource. When the file is 
moved out of the class path then the problem markers should be removed. 
Moving to JDT CORE for comment.
Comment 2 Philipe Mulet CLA 2002-04-09 09:51:50 EDT
We are addressing the case where a JAVA file becomes a non-java one (see bug 
2857). And this scenario is very similar to the other issue.

Now we cannot easily get rid of markers in the JavaModel update, since this one 
is implemented in term of POST_CHANGE event, where the resource tree is locked.

Post 2.0, we might want to revisit this and move the JavaModel update onto the 
PRE/POST_AUTO_BUILD change notification.

Comment 3 Philipe Mulet CLA 2002-04-09 09:52:40 EDT
Will reconsider post 2.0
Comment 4 Philipe Mulet CLA 2002-04-19 09:15:09 EDT
*** Bug 14193 has been marked as a duplicate of this bug. ***
Comment 5 Philipe Mulet CLA 2002-07-25 06:59:40 EDT
Reopening
Comment 6 Philipe Mulet CLA 2002-07-25 07:00:58 EDT
Clearing resolution
Comment 7 Philipe Mulet CLA 2002-07-31 10:36:00 EDT

*** This bug has been marked as a duplicate of 2857 ***