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 7015 - Explorer: Files are deleted without any warning.
Summary: Explorer: Files are deleted without any warning.
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC All
: P1 normal (vote)
Assignee: Jan Jancura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-07-10 12:52 UTC by Jan Becicka
Modified: 2003-06-30 17:26 UTC (History)
1 user (show)

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 Jan Becicka 2000-07-10 12:52:04 UTC
1. Select some file in Explorer
2. Use Delete-key or pop-up menu | Delete
3. File is removed without any warning or confirmation dialog

[Build 1053]
Comment 1 Jan Becicka 2000-07-10 13:51:59 UTC
File | Preferences | System Settings | Confirm Delete is set to True. If this
setting is set to False and then back to True the problem is fixed.
Comment 2 Jaroslav Tulach 2000-07-13 13:00:59 UTC
The debugger is causing the problem. Here is the stacktrace that disables the
confirmation dialog:

        at
org.openide.explorer.ExplorerActions.setConfirmDelete(ExplorerActions.java:108)
        at
org.openide.explorer.ExplorerPanel.setConfirmDelete(ExplorerPanel.java:195)
        at
org.netbeans.modules.debugger.support.nodes.DebuggerView.<init>(DebuggerView.jav
a:67)

Please change this code. My suggestion would be to use your own ExplorerAction
object (I guess that DebuggerView is subclass of ExplorerPanel):

  // add private variable
  private ExplorerActions actions = new ExplorerActions ();

  protected void componentActivated () {
    actions.attach (getExplorerManager ());
  }

  protected void componentDeactivated () {
    actions.detach ();
  }

Ok?
Comment 3 Jesse Glick 2000-07-18 19:59:59 UTC
Gaak. We *really* need a better way to do this. IMHO
ExplorerActions/DeleteAction should never display a dialog, this should be a
function of the DataNode.delete, and there should be some standard way in the
APIs to tell if something is being called interactively or not.
Comment 4 Quality Engineering 2003-06-30 17:26:37 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.