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 160208 - XML files no longer have a default action
Summary: XML files no longer have a default action
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords: REGRESSION
: 163845 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-12 19:40 UTC by Jesse Glick
Modified: 2009-04-28 16:40 UTC (History)
2 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 Jesse Glick 2009-03-12 19:40:57 UTC
090311, cluster.config=basic. Double-clicking an XML file does nothing, nor does hitting Enter when it is selected. Edit
and View are both available in the context menu and work fine.

Possibly a side-effect of the fix for issue #151153, not sure. Note that XMLDataNode specifies its default action as
OpenAction whereas the layer offers EditAction.
Comment 1 Jesse Glick 2009-04-15 19:09:37 UTC
Still reproducible in my standard userdir, though not in a fresh userdir. (What the difference is, I have no idea -
tried and failed to find any settings in my std userdir which would be responsible.) Using apisupport.beanbrowser I can
confirm that

1. The preferred action is OpenAction, not EditAction as you might expect. (Context menu contains EditAction and
ViewAction.) Indeed XMLDataNode says

        @Override
        public SystemAction getDefaultAction() {
            return SystemAction.get (OpenAction.class);
        }

for no obvious reason; if deleted, would default to first action in context menu, i.e. EditAction, which would probably
make it work.

2. DataObject and Node lookups contain TextEditorSupport, assignable to OpenCookie among other things. Yet by using

http://blogs.sun.com/roller/resources/jglick/jrunscriptin.jar

I can confirm that lookup.lookup(OpenCookie.class) returns null (even in the fresh userdir!) while
.lookup(EditCookie.class) is not null.
Comment 2 Jesse Glick 2009-04-24 19:28:22 UTC
Can no longer reproduce in my userdir (as a result of trying to reproduce?). Anyway, I will delete the apparently
useless action override: core-main #7800f05bebd7
Comment 3 Quality Engineering 2009-04-25 07:26:05 UTC
Integrated into 'main-golden', will be available in build *200904250201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7800f05bebd7
User: Jesse Glick <jglick@netbeans.org>
Log: #160208: Edit vs. Open problem in default action of *.xml. Anyway default action defaults to first in context menu which is good enough.
Comment 4 Jesse Glick 2009-04-28 16:40:02 UTC
*** Issue 163845 has been marked as a duplicate of this issue. ***