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 31832 - Useless Open action
Summary: Useless Open action
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: -S1S-
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on: 17597
Blocks:
  Show dependency tree
 
Reported: 2003-03-10 16:21 UTC by Martin Schovanek
Modified: 2007-09-25 01:31 UTC (History)
5 users (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 Martin Schovanek 2003-03-10 16:21:40 UTC
[Nb Build 200303100100, jdk1.4.1]

Although tree-editor is not installed disabled
Open actions is on the XML and DTD nodes.
Comment 1 _ pkuzel 2003-03-10 18:13:26 UTC
I can remove the open action from XMLDataObject actions. It'd mean
that tree editor should add it exlicitly (it has under its control
presentation node than can overwrite actions being presented).

Interesting architectural question. I do not know how should I solve
it for the Edit action. Text editor module does not have an access to
presentation nodes.

Another interesting issue is default action. There is a setting for
its value.

If time permits I'll try to solve it till NB35.
Comment 2 Rich Unger 2003-03-10 18:36:46 UTC
Looking at o.n.m.xml.tree.TreeEditModuleInstall, it seems that the
tree edit module has the code to explicitly add the Open action.  It
also looks like this code is never called.

Is there any particular reason we shouldn't remove OpenAction from the
XML and DTD data loaders, and add

public void restored() {
  installActions();
}

to TreeEditModuleInstall?
Comment 3 _ pkuzel 2003-03-10 18:54:09 UTC
What an ugly code :-). Except it there is perfomance penalty because
it loads many XML module classes right during startup.

Anyway it's instant solution. Thank you for pointing it out!
Comment 4 _ pkuzel 2003-03-11 13:21:07 UTC
Correct solution would be a kind of that XMLCore examines lookup for
active OpenCookie providers. If at least none is active it could
present the OpenAction (extends CookieAction).
Comment 5 _ pkuzel 2003-03-12 10:01:05 UTC
Uglyness reason: actions are presentation layer and should be fully
configureable by user. Direct access to loader actions ignores all
user customizations. It in fact "corrupts" these on each tree module
enable/disable operation.

Local action pools seem to address it:
http://openide.netbeans.org/proposals/actions/design.html#pools

=> depends on issue 17597.
Comment 6 _ pkuzel 2003-07-09 08:33:41 UTC
*** Issue 34805 has been marked as a duplicate of this issue. ***
Comment 7 _ pkuzel 2003-07-09 08:35:03 UTC
CCs from issue 34805 added.
Comment 8 Milan Kuchtiak 2004-06-01 08:45:00 UTC
Open action was  removed from xml node.
DTD node still contains disabled Open action.
Comment 9 Milan Kuchtiak 2004-08-11 12:56:53 UTC
Fixed for 4.0
Comment 10 Martin Schovanek 2006-03-28 21:28:29 UTC
Verified in #200603280200.