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 28961 - Should warn on deleting main class from file
Summary: Should warn on deleting main class from file
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-22 16:59 UTC by Steven Ostrowski
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Ostrowski 2002-11-22 16:59:31 UTC
In the Filesystem browse when expanding a node of a file, 
NB should either disallow or prompt the user when the user 
tries to delete the class that corresponds to the file.

For example, expanding node for A.java shows class A. If 
you delete the class A, NB deletes all the code in the 
source file except for the import statements up top. This 
basically erases the file.

A user (like I did myself) may think that by deleting the 
class, you are deleting the .class file. However, this 
actually causes your file to be almost deleted.

This is a special case, where the class being deleted is 
the same as the file. This special case should either be 
disallowed or give a warning prompt to the user.
Comment 1 Marian Mirilovic 2002-12-06 18:19:43 UTC
reassign to Tim, new owner of AWT/Swing
Comment 2 _ tboudreau 2002-12-11 01:20:40 UTC
Refiling as java/ui - this is not a core awt/swing issue.
Comment 3 Martin Matula 2004-11-12 13:06:10 UTC
The UI now prompts user. Also if user accidentally deletes the class
the change can be undone. The class node under the file node now does
not contain the word "class" so it should be less confusing.
Comment 4 Quality Engineering 2007-09-20 10:58:37 UTC
Reorganization of java component