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 65804 - Safely delete nontrivial class shows misleading warning
Summary: Safely delete nontrivial class shows misleading warning
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords: USABILITY
Depends on:
Blocks:
 
Reported: 2005-10-04 08:40 UTC by Petr Nejedly
Modified: 2007-04-03 18:02 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 Petr Nejedly 2005-10-04 08:40:09 UTC
If you have a class that references itself and try to safely delete it,
it shows you warning that there are references to the class, while find usages
reveals only self-references.
Pressing Next, Do refactoring correctly deletes the class, but the warning is very
misleading. I haven't even thought I could try pressing Next when I saw the
warning first.
Comment 1 Jan Becicka 2005-10-04 11:00:51 UTC
References to all elements from current selection should be ignored.
If you select method foo() and method bar() and invoke Safe Delete - no warning
should be shown in this case:

private void foo() {
  bar();
}
private void bar() {
}

Bharath, please take a look at it, thanks.

Comment 2 Daniel Prusa 2005-10-17 15:01:06 UTC
Fixed in trunk.

/cvs/refactoring/src/org/netbeans/modules/refactoring/plugins/SafeDeleteRefactoringPlugin.java

new revision: 1.15; previous revision: 1.14
Comment 3 Petr Nejedly 2005-10-18 13:43:14 UTC
Verified today.