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 18137

Summary: delete not enabled for openide-util.jar in Explorer
Product: platform Reporter: rrochat <rrochat>
Component: ExplorerAssignee: Jesse Glick <jglick>
Status: CLOSED FIXED    
Severity: blocker CC: dsimonek, dstrupl, jglick, jtulach
Priority: P3    
Version: 3.x   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 18325    
Bug Blocks:    
Attachments: Possible patch (pozor: 2 API additions)
Thread dump of win sys activating some docked TC after dialog has been opened; without EP.cDea() patch, this unattaches the dialog's EM
Revised patch using reflection

Description rrochat 2001-11-28 02:53:53 UTC
When trying to remove openide-util.jar and friends in 3.3 beta 5,
'delete' is not enabled by default in 
  Explorer/Customize/Filesystems Settings
but is in 
  Options/IDE Configuration/System/Filesystems Settings/Java Libraries

See thread 
for more context.
Comment 1 David Strupl 2001-11-30 13:25:34 UTC
Hello Jesse,
I am sorry but I don't understand what you mean (in the mentioned post
on openide-dev). I am assigning to you for now.. If you want me to fix
it please tell me where (and how) can I possibly fix it.
Thanks for any help/hint (or fix! ;-) )
Comment 2 Jesse Glick 2001-11-30 13:34:15 UTC
I don't know for sure what the problem is, I only noticed that
canDestroy() on the node in the dialog seems to be true, yet Delete is
not enabled, so I guessed that ExplorerActions is not seeing it in the
dialog for some reason (because it is not a top component). Will have
to investigate.
Comment 3 Jesse Glick 2001-12-03 14:53:00 UTC
I have figured out what is wrong. ExplorerActions.attach is never
called on the dialog's ExplorerManager; there is no way it can work.
RegistryImpl.attachExplorer(Runnable,ExplorerManager) seems to be the
proper place to do it, but I am not sure.

I am attaching a patch and reassigning to Dafe/David to decide if this
is OK. I could not make it work without an API change (two actually);
with the patch all appears OK. Using a private ExplorerActions in
RegistryImpl does not seem to work; for example, after a dialog has
been shown, sometimes the window system nonetheless gives focus to
some docked ExplorerPanel (will attach thread dump), which detaches
the dialog's manager and turns off the actions.

The basic problem is the sloppy architecture, with
ExplorerPanel.actions being global state, and yet only loose
cooperation between ExplorerPanel and NbPresenter in deciding when to
attach to ExplorerManager's. There may be a better way to do this, I
just can't figure out what.
Comment 4 Jesse Glick 2001-12-03 14:54:06 UTC
Created attachment 3672 [details]
Possible patch (pozor: 2 API additions)
Comment 5 Jesse Glick 2001-12-03 14:55:55 UTC
Created attachment 3673 [details]
Thread dump of win sys activating some docked TC after dialog has been opened; without EP.cDea() patch, this unattaches the dialog's EM
Comment 6 Jesse Glick 2001-12-04 17:44:35 UTC
Yarda suggests to fix for 3.3.1 using reflection--basically the patch
I suggested, minus general API change. Ugly but should work.

Newer Actions API should render the problem obsolete since Delete will
be directly in the ActionMap of the explorer panel, whether a docked
TC or a modal dialog should make no difference; there will be no
global ExplorerActions which needs to know what is activated.
Comment 7 Jesse Glick 2001-12-06 17:35:51 UTC
Will fix using reflection for 3.3 but for 3.4 we should try to use new
Actions infrastructure. This bug would be fixed by it for free.
Comment 8 Jesse Glick 2001-12-06 17:59:13 UTC
Will attach revised patch.
Comment 9 Jesse Glick 2001-12-06 18:04:26 UTC
Created attachment 3719 [details]
Revised patch using reflection
Comment 10 Jesse Glick 2001-12-13 14:26:56 UTC
Fixed with reflection; patch as before plus one more null check.

committed   * Up-To-Date  
committed   * Up-To-Date   
committed   * Up-To-Date   
Comment 11 Jan Zajicek 2001-12-14 13:26:48 UTC
Verified in release33 build #200112140331.
Comment 12 Quality Engineering 2003-07-01 16:38:23 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.