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.

Technorati-Tags: ,
Kick it on dotnet-kicks.de

Tags: ,

10 Responses to “ReSharper NHibernate Plugin – Early bird release”

  1. Tobin Harris Says:

    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…

  2. David Hanson Says:

    So its coming along Stefan…. Good job.

  3. Gabriel Schenker Says:

    cool! Keep going. I’m very interested.

  4. Fabio Maulo Says:

    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.

  5. Evan Says:

    I’ll definitely be keeping my eye on this..way cool

  6. Morten Lyhr Says:

    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.

  7. Chris Says:

    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)

  8. Colin Jack Says:

    Very cool, keep up the good work.

  9. Indika Says:

    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?

  10. Stefan Lieser Says:

    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

Leave a Reply