ReSharper NHibernate Plugin – Early bird release
Please note that there is an update to the plugin!
I started to implement a ReSharper plugin to support NHibernate mapping files. It runs with ReSharper 4.0 only, so you need to get one of the nightly EAP builds from here.
Please note that the plugin is in a very early state and far away from complete. What we have so far is analysis of .hbm.xml files:
- Name and type of mapped class is verified
- Id name and type is verified
- Property names and types are verified (not the access attribute!)
- many-to-one and one-to-one names and types are verified
- Component names and types are verified, including properties and nested components
- Subclass names are verified
Pease note that the access attribute is not evaluated, so mapped properties have to exist as a property in the mapped class. I will work on this next and will support the standard access methods like field.pascalcase-m-underscore.
After finishing the analysis stage I will start to implement features like navigation (for example from mapped property to mapping file), refactoring (support for rename class/property/field beeing the most wanted) and quick-fixes (for example map this property).
I will release the plugin as open source later. First I have to check many things with JetBrains (for example how to do automated unit tests) and have to clean up the code.
For those of you who can’t wait, here is the download link. You will find a little batch script that copies the plugin files. Please close VS2008 before copying.
Feel free to contact me for feedback, bug reports and feature requests.
Tags: NHibernate, ReSharper
March 28th, 2008 at 0:11
Sounds like a really useful plugin
Look forward to tyring it out.
P.S – I really wanted to make ALT.NET UK, hopefully next year…
March 28th, 2008 at 11:29
So its coming along Stefan…. Good job.
March 28th, 2008 at 16:28
cool! Keep going. I’m very interested.
March 28th, 2008 at 16:35
Hi Stefan.
Do you like to public your work in NHibernate.Contrib ?
https://sourceforge.net/projects/nhcontrib
Like you know we move all “no Core” project there.
If you want let me know.
Bye.
March 30th, 2008 at 6:18
I’ll definitely be keeping my eye on this..way cool
March 30th, 2008 at 8:34
Sweet!
Keep up the good work.
I hate programming by XML, so I guess the next best thing is a good non-invasive tool to help me.
March 31st, 2008 at 12:18
Hi Stefan,
Nice plugin, will be keeping a tab on your progress. However, I’m the Type attribute on a property highlighted as an error “Type String not resolved” (replace String with any type)
April 28th, 2008 at 22:33
Very cool, keep up the good work.
May 26th, 2009 at 15:05
Sounds extremely useful. Ran into a bit of trouble with it though. You mention that it is only for ReSharper 4.0. Does that imply that it is incompatible for ReSharper 4.5?
May 26th, 2009 at 16:41
Indika,
yes the plugin doesn’t work with R# 4.5 yet. Please see http://code.google.com/p/nhplugin/ for the current version.
I need to compile it against 4.5 but that means a lot of changes… I don’t know when I will have the time for that, sorry. I’m using Fluent NHibernate in current project, so there is no need for .hbm.xml files.
Cheers
Stefan