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 - delete not enabled for openide-util.jar in Explorer
Summary: delete not enabled for openide-util.jar in Explorer
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on: 18325
Blocks:
  Show dependency tree
 
Reported: 2001-11-28 02:53 UTC by rrochat
Modified: 2008-12-22 17:55 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Possible patch (pozor: 2 API additions) (7.63 KB, patch)
2001-12-03 14:54 UTC, Jesse Glick
Details | Diff
Thread dump of win sys activating some docked TC after dialog has been opened; without EP.cDea() patch, this unattaches the dialog's EM (4.15 KB, text/plain)
2001-12-03 14:55 UTC, Jesse Glick
Details
Revised patch using reflection (5.39 KB, patch)
2001-12-06 18:04 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 
<http://openide.netbeans.org/servlets/ReadMsg?msgId=201936&listName=dev> 
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  1.21.22.1  
core/src/org/netbeans/core/windows/RegistryImpl.java
committed   * Up-To-Date  1.42.2.1   
openide/src/org/openide/explorer/ExplorerActions.java
committed   * Up-To-Date  1.30.4.2   
openide/src/org/openide/explorer/ExplorerPanel.java
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.