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 202766 - Local history window opens when clicking on "Edit server.xml" for Tomcat instance
Summary: Local history window opens when clicking on "Edit server.xml" for Tomcat inst...
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 7.1
Hardware: PC All
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: REGRESSION
: 202900 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-28 08:33 UTC by host
Modified: 2011-11-23 15:30 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of wrong window opening when trying to edit server.xml (81.58 KB, image/png)
2011-09-28 08:33 UTC, host
Details
patch for Tomcat5 module (6.37 KB, patch)
2011-09-30 11:31 UTC, Svata Dedic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description host 2011-09-28 08:33:58 UTC
Created attachment 111268 [details]
Screenshot of wrong window opening when trying to edit server.xml

I have a newly installed NetBeans daily built with bundled Glassfish and Tomcat.
On the "Services" tab under "Servers", I remove the predefined Glassfish and Tomcat instances and create a new Tomcat instance (see bug reports 202564 and 202566).
When I now right-click on the Tomcat instance and select "Edit server.xml" then the local history window opens. (see attached screenshot)
Also, wenn I try to expand the tomcat instance (to see the configuration files), the no files are shown and the arrow to expand the instance vanishes.
Comment 1 Petr Hejl 2011-09-30 08:41:23 UTC
Introduced by http://hg.netbeans.org/web-main/rev/f055a06ca829
Comment 2 Svata Dedic 2011-09-30 11:31:24 UTC
Fixed - this is because the text multiview tab is attached to plain+xml only to prevent potentially incorrect registrations in more concrete subtypes.
I added a backwards-compatible behaviour for files with only different MIME type but no specific data object.

Please review and/or apply the attached patch; it adds multiview source tab registration to tomcat5 module, which overrides the compat behaviour.
Comment 3 Svata Dedic 2011-09-30 11:31:53 UTC
Created attachment 111360 [details]
patch for Tomcat5 module
Comment 4 Petr Hejl 2011-09-30 12:02:36 UTC
I don't really understand (but I'm not a DO expert). Is the old behavior preserved? If so then I would not expect changes in Tomcat. If it is not it looks like incompatible change that may regress in many other places.

Otherwise I don't have strong objections against the change in Tomcat code. I just worry about other regressions, possibly in code we do not own.
Comment 5 Svata Dedic 2011-09-30 12:06:32 UTC
The old behaviour is preserved by my fix. However it was requested for this release that (ideally) all the editor panes support history (e.g. local history) - that's why XMLDO behaviour was changed originally.
. 
Maybe the multiview request is not applicable to the Tomcat node - then pls. ignore the patch and close defect. If it's desirable to show multiview with source+history buttons for tomcat config, then review/apply patch.

Sorry for previous short explanation
Comment 6 Petr Hejl 2011-09-30 13:51:11 UTC
Fixed in web-main b84777833e9e.
Comment 7 Svata Dedic 2011-09-30 17:37:35 UTC
*** Bug 202900 has been marked as a duplicate of this bug. ***
Comment 8 Quality Engineering 2011-10-01 14:02:04 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/56825855b1ee
User: Svata Dedic <sdedic@netbeans.org>
Log: #202766: if the file has compoung xx+xml MIME, but no specific DataObject, fall back to the non-multiview behaviour so text editor is shown.