Bug 4513 - Unable to assign default XML schema if file extension has a dot in it (i.e ".hbm.xml")
Summary: Unable to assign default XML schema if file extension has a dot in it (i.e "....
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: Trunk
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: Mikayla Hutchinson [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2012-04-18 22:53 UTC by arithmetech
Modified: 2012-04-26 21:55 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description arithmetech 2012-04-18 22:53:57 UTC
To recreate:

1) download nhibernate

2) navigate thusly: Edit > Preferences... > XML Schemas

3) import "nhibernate-mapping.xsd" schema

4) assign the schema from step 3 to extension ".hbm.xml"

5) create a file with the extension ".hbm.xml"

6) observe that there is no intellisense.  if an extension without a dot in the middle is used (such as ".hbmxml") things work smoothly, however nhibernate looks for mapping files with .hbm.xml extensions.

Note: MonoDevelop 2.9.5 was installed from source cloned from git.  Running on Slackware 13.37.
Comment 1 Mike Krüger 2012-04-19 01:18:22 UTC
@mhucth: is .hbmxml valid in that case ? (If it would be another language or something different I would say .hbm.xml is the way to go and that we don't support .hbmxml - but .xml is a bit different)
Comment 3 Mikayla Hutchinson [MSFT] 2012-04-25 13:08:56 UTC
ProjectFileCollection probably needs a Dictionary to make GetFile performant. Currently it does linear lookups.
Comment 4 Mikayla Hutchinson [MSFT] 2012-04-25 13:09:58 UTC
Oops, wrong tab.

Answer for this one is: The XML addin should probably check the filename ending, not extension.
Comment 5 Mikayla Hutchinson [MSFT] 2012-04-26 21:55:00 UTC
Fixed in master.