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.
Whereas you would reasonably expect it to open foo.xml in the NetBeans text editor. The reason is that XMLDataObject (from xml/core) has EditCookie, EditorCookie, and ViewCookie, but no OpenCookie. (Assuming no xml/tree-edit module.) DefaultOpenFileImpl.openDataObjectByCookie has this check: if ((line != -1 && (cookie = dataObject.getCookie(cookieClass = EditorCookie.class)) != null) || (cookie = dataObject.getCookie(cookieClass = OpenCookie.class)) != null || (cookie = dataObject.getCookie(cookieClass = ViewCookie.class)) != null) { return openByCookie(cookie, cookieClass, line); } If you do not specify a line number, the only matching clause is thus for ViewCookie. It should add a check for EditCookie, probably after OpenCookie. (There is no perfect way to find out which cookie should be preferred, esp. among OpenCookie and EditCookie; one trick would be to get the node delegate, and if the default action of the node is one of OpenAction or EditAction or ViewAction, use that cookie in preference to the others. Do this in the event queue.)
Accepted. Jesse, thank you for the investigation and suggestion how to fix it.
There is an issue #24429 that calls for explaining effect of Open vs. Edit actions. Probably text representation vs. visual representation (XML tree, form, ...).
I will add the check for EditCookie. I won't implement the described check for the default action of the node delegate until issue #24429 is resolved.
Fixed in the trunk.