Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 199357 - Hints, errors and code underlining lost after Move Refactor
Hints, errors and code underlining lost after Move Refactor
Status: VERIFIED FIXED
Product: editor
Classification: Unclassified
Component: Parsing & Indexing
6.x
All All
: P3 (vote)
: 7.4
Assigned To: Tomas Zezula
issues@editor
:
: 225569 (view as bug list)
Depends on: 234361
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-11 17:31 UTC by theshadow27
Modified: 2013-08-31 09:36 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description theshadow27 2011-06-11 17:31:11 UTC
User Action: A Java file is open in the editor, and it is moved to a different package using the context menu item "Refactor->Move" (from its node in Project Navigator)

Expected Result: Editor works normally.

Actual Result: Some editor hints, all errors (those that replace line numbers) as well as Erroneous Code (red) and Unused Imports (yellow) underlining are no longer displayed

Workaround: Close the current editor tab, reopen it by clicking the node in Projects navigator

Since: at least 7.0, verified on dev build 201106100600

Test case from fresh install/clean userdir, although it seems to be easy to duplicate without these precautions. 

-----SETUP--- 
(1) New project -> Java -> Java Class Library
(2) Project Name = "MoveTest201106100600" Project Location = (default)
(3) Source packages (node context menu) -> New -> Java Package... 
(3a) Package Name = "org.test"
(4) org.test (node context menu) -> New -> Java Class...
(4a) Class Name = "MoveRefactorTest"
(5) In the editor, type:
(5a) Under the package declaration: "import java.util.ArrayList;"
(5b) In the class body: "public boolean isAnObject(){" [return] (which should create the closing })
(6) Save the file. 

At this point the method declaration should be underlined in red, with a red "!" for a "missing return statement", and the import line should be underlined in yellow with a yellow triangle in the gutter for "unused import" 

-----TEST----
(7) MoveRefactorTest.java (node context menu) -> Refactor -> Move...
(7a) To Package ="org.test1"

At this point, most editor hints (except Collections initial capacity?), errors (those that replace line numbers) as well as Erroneous Code (red) and Unused Imports (yellow) underlining are no longer displayed.
Comment 1 Jan Lahoda 2011-06-13 02:28:15 UTC
Seems that the Schedulers are not properly prepared for moving DataObjects.
Comment 2 Jan Lahoda 2013-02-08 11:48:05 UTC
*** Bug 225569 has been marked as a duplicate of this bug. ***
Comment 3 Jan Lahoda 2013-07-08 12:28:22 UTC
Svata is looking into this, AFAIK.
Comment 4 Tomas Zezula 2013-08-19 11:30:11 UTC
Fixed jet-main a8b904df6ade
Comment 5 MackSix 2013-08-31 09:36:50 UTC
Verified fixed:

Product Version: NetBeans IDE Dev (Build 201308310001)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b40
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo