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 56256 - Need to control showing of confirmation dialog when deleting a node in explorer
Summary: Need to control showing of confirmation dialog when deleting a node in explorer
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: _ rkubacki
: 40992 (view as bug list)
Depends on:
Blocks: 49517
  Show dependency tree
Reported: 2005-03-11 11:40 UTC by _ rkubacki
Modified: 2008-12-22 10:59 UTC (History)
1 user (show)

See Also:
Exception Reporter:

patch (12.79 KB, patch)
2005-03-11 12:13 UTC, _ rkubacki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2005-03-11 11:40:11 UTC
There is a request from various modules to control the appearance of dialog that
is shown when a delete action is invoked on node(s) in explorer. Modules
providing nodes shown in explorer might want to replace default confirmation
dialog containing yes/no buttons with more complex deleting logic. 

One of these issues is #49517 - the semantic of delete action on EJB node is not
clear and it can mean delete the record from deployment descriptors and keep
related Java sources untouched or delete the information together with sources.
Both choices are valid so the module wants to show customized dialog before
delete that will also serve as input what should be deleted.
Comment 1 _ rkubacki 2005-03-11 11:49:40 UTC
Proposed solution is to provide a hint from a node obtained by explorer via
Node.getValue() that will supress showing of default confirm dialog by explorer
support and nodes can do handling in their own code.

This is obviously not perfect solution. Some known drawbacks:
- Default policy for showing of confirm dialog will be ignored. (In the
particular case of EJBs we need additional input anyway.)
- More dialog can be shown for multiselection of nodes that override default
behaviour. Bad but better than limiting the module.
- Multiselection containing nodes with default behaviour and modified nodes will
show both dialog.

Comment 2 _ rkubacki 2005-03-11 12:13:50 UTC
Created attachment 20779 [details]
Comment 3 _ rkubacki 2005-03-11 12:15:31 UTC
patch with suggested change, apichange, documentation and test

Martin, can you confirm if it helps you?
Comment 4 Martin Adamek 2005-03-11 13:17:25 UTC
Work fine for me. 
I have just one suggestion: can you introduce String constant "customDelete"
somewhere so I can use it instead of direct usage of String value?
Comment 5 _ rkubacki 2005-03-11 14:18:17 UTC
So far I intentionaly did not published the name of attribute - it is in arch
document only. Of course API reviewers can comment this.
Comment 6 Jaroslav Tulach 2005-03-15 09:10:28 UTC
I am amazed by the test and I like the whole patch. We do not know of better
solution to this need in current times.

Re. publishing customDelete - if it is only "under development" API we cannot
publish it as a field of any of org.openide.** class - that would immediatelly
make it "official" api. While I agree with the patch, I do not think the whole
solution clasifies for "official" api, it really does not support multiselection
well which would be imho one needed feature of such "official" api.
Comment 7 Petr Jiricka 2005-03-15 11:25:54 UTC
Any other opinions on this change? We need another reviewer to close this fast
track. Thanks.
Comment 8 Pavel Buzek 2005-03-16 05:55:19 UTC
I agree with Jarda. I think the patch can be integrated as it is proposed, with
stability under development.
Comment 9 _ rkubacki 2005-03-16 19:51:27 UTC
Checking in openide/;
/cvs/openide/,v  <--
new revision: 1.167; previous revision: 1.166
Checking in openide/api/doc/changes/apichanges.xml;
/cvs/openide/api/doc/changes/apichanges.xml,v  <--  apichanges.xml
new revision: 1.235; previous revision: 1.234
Checking in openide/arch/arch-openide-explorer.xml;
/cvs/openide/arch/arch-openide-explorer.xml,v  <--  arch-openide-explorer.xml
new revision: 1.20; previous revision: 1.19
Checking in openide/src/org/openide/explorer/;
/cvs/openide/src/org/openide/explorer/,v  <--
new revision: 1.66; previous revision: 1.65
Checking in openide/src/org/openide/explorer/;
/cvs/openide/src/org/openide/explorer/,v  <--
new revision: 1.8; previous revision: 1.7
Checking in openide/test/unit/src/org/openide/explorer/;
new revision: 1.7; previous revision: 1.6
Checking in openide/test/unit/src/org/openide/explorer/;
/cvs/openide/test/unit/src/org/openide/explorer/,v  <--
new revision: 1.12; previous revision: 1.11
Comment 10 _ rkubacki 2005-03-17 12:53:48 UTC
reopening to changed 'assigned to'
Comment 11 _ rkubacki 2005-03-17 12:54:40 UTC
closing as fixed again
Comment 12 t_h 2008-10-20 10:00:27 UTC
*** Issue 33931 has been marked as a duplicate of this issue. ***
Comment 13 t_h 2008-10-20 10:53:01 UTC
*** Issue 40992 has been marked as a duplicate of this issue. ***