This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 115168 - Move refactoring doesn't work
Summary: Move refactoring doesn't work
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Sonali Kochar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-10 15:09 UTC by Mikhail Matveev
Modified: 2007-09-18 23:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Matveev 2007-09-10 15:09:14 UTC
1. Create new project without main class (unmark Create Main Class checkbox during project creation) .
2. Create some schema in default package.
3. Cut schema file.
4. Paste into Test Packages and choose Refactor move.
Result: an error dialog with OK button comes. Pressing OK doesn't dismiss it. Only killing IDE helps.

In step 4, a folder in Source Packages can be used instead (create it after step 2).

If a project with a main class is used, move refactoring simply doesn't work - nothing happens after step 4.

This seems to be a showstopper for beta.
Comment 1 tonybeckham 2007-09-10 20:32:53 UTC
Confirmed on linux and Mac NetBeans IDE 6.0 Beta 1 (Build 200709100000).
Comment 2 tonybeckham 2007-09-10 20:47:21 UTC
I have found that using cut then Refactor->Move has the same problem no matter what the destination is.
Comment 3 Sonali Kochar 2007-09-10 21:30:49 UTC
There seems to be some issue with cut and Core refactoring. I debugged the code and seems like the Move refactoring
works. After the move is done, the core refactoring again invokes Move refactoring with the original object which no
longer exists. Will email to Becicka and check with him.
Comment 4 Sonali Kochar 2007-09-11 21:14:51 UTC
Fixed. The issue was that XMLRefactoringActionsProvider.canMove was not checking for valid nodes. Have added that check.
Checking in XMLRefactoringActionsProvider.java;
/cvs/xml/refactoring/src/org/netbeans/modules/xml/refactoring/XMLRefactoringActionsProvider.java,v  <-- 
XMLRefactoringActionsProvider.java
new revision: 1.8; previous revision: 1.7
done
Comment 5 Mikhail Matveev 2007-09-12 16:07:29 UTC
Is it fixed in trunk only? Last beta build still contains the bug.
Comment 6 Sonali Kochar 2007-09-12 17:27:57 UTC
Fixed in trunk. We are not putting any code into beta1 branch.
Comment 7 tonybeckham 2007-09-18 23:19:34 UTC
Issue as described Fixed.
VERIFIED in Build 200709180000.