Summary: | Moving code with compile errors outside of a source folder preserve compile errors | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Pascal Rapicault <pascal> | ||||
Component: | Core | Assignee: | Kent Johnson <kent_johnson> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | markus.kell.r, philippe_mulet | ||||
Version: | 3.3 | Flags: | philippe_mulet:
review+
|
||||
Target Milestone: | 3.4 RC1 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Pascal Rapicault
2006-11-02 08:07:28 EST
I would expect that the builder takes care of removing the markers when the file is moved out of the source path. Happens when moving in Package Explorer as well as in Navigator. We have code in place doing this; apparently there is a hole in our story. This works for me using 3.3RC4. Steps from comment 0 still show the problem in I20070615-1200: - paste this to empty Package Explorer: package a; public class A { } package b; public class B extends Invalid { } - in Navigator, drag folder /_pasted_code_/src/b (not B.java) to /_pasted_code_ => Error marker "Invalid cannot be resolved to a type" stays on _pasted_code_/b/B.java I'm not sure why I wrote "Happens when moving in Package Explorer as well" in comment 1, since it is not (and was not) possible to move a package to a folder or a project in the Package Explorer. Thanks Markus. Reproduced as well. My mistake was to interpret 'it' in 'move it at the root of the project' as being the class. In fact 'it' is the package. The Java builder should remove the markers when the delta corresponds to a .java file moved to a folder that is not on any classpath. Moving to Kent to resolve post 3.4 Created attachment 99131 [details]
Proposed patch with testcase
Added code used to 'move' a source file so it also handles moving a package
Fix for bug 2857 indeed did not consider folders. +1 for 3.4RC1 Released for 3.4RC1 Added IncrementalTests.testMovePackage2() Verified for 3.4 RC1 using build I20080513-2000. |