exceptionz

Thoughts on Technology, Methodology and Programming.

Archive for June, 2007

SourceForge 2007 Community Choice Awards

Posted by Marcus Wyatt on 21 June 2007

The 2007 Community Choice Awards is open for voting, so if you like the NSpecify framework then please vote for the project.

Thanks in advance for anyone voting.

Advertisements

Posted in Software | Leave a Comment »

Ruby in Steel Goodness

Posted by Marcus Wyatt on 20 June 2007

I’ve had a play with Ruby in Steel for Visual Studio 2005 when Sapphire Steel released the first Developer edition about a year ago. The first version on my system was clunky and painfully slow. The Ruby intellisense was slow and overall the experience was not great.

Well, why would you tell this to me know?

Because, earlier this week my eye caught a post about Visual Ruby in my aggregator. So I browsed over to the post and then got reminded about Ruby in Steel. So I decided to give it another try. Wow, what an improvement.

The debugging features are just brilliant. So seamless, you would think you’re working within a language like C#.

The intellisense is crisp and rdoc information is displayed where available:

image

The following Intellisense features for Ruby source files are implemented:

  • Member Completion Lists
  • Keyword Completion Lists
  • Variable Completion Lists
  • Quick Info Tooltips
  • Parameter Info Tooltips

You also have the Snippets features of visual studio for template functionality.

image

Another cool feature is the Ruby Explorer which is a class browsing tool which can be used to view an alphabetical outline of Ruby classes and methods.

image

All in all I’m really impressed by the progress the tool made since the version 1.0 release a couple of months ago. I’m seriously considering maybe to invest in a license for the tool. But I think they should seriously consider the freelance developer out there. When ReSharper announced their personal license I was really excited about the move and yes, I did buy a personal license. Hopefully the Sapphire Steel guys would consider something similar…

If you are a  .NET developer for food and a budding RoR developer for fun and don’t have that flash MacBook Pro yet. Then maybe Ruby in Steel is just what you’d need.

del.icio.us Tags: , , ,

Posted in Development, RoR, Software | Leave a Comment »

Visual Studio Vibrant Ink Scheme

Posted by Marcus Wyatt on 17 June 2007

I’ve always liked the Textmate Vibrant Ink theme and wanted to at some point change my Visual Studio scheme to simulate the Vibrant Ink theme. Today I’ve spend some time customizing the colors and here is the results:

Source Editor:

image

Html Editor:

image

CSS Editor:

image

NVelocity Editor:

image

I’m a great fan of ReSharper and as anybody that uses ReSharper knows, if you enable the Color Identifiers within ReSharper, it changes the identifier colors. With this scheme I’ve made sure that ReSharper uses the same colors. Thus making it ReSharper friendly…

Edit: Steven Romej has offered to host the download for the scheme. thanks dude.

You can find the Vibrant-Ink.vssettings file here.

Posted in Software | 8 Comments »

Resharper 3.0 Member Re-Ordering Settings

Posted by Marcus Wyatt on 10 June 2007

In ReSharper 3.0 you now have the ability to specify how the Reformat action (Shortcut: Ctrl+Alt+F) should order the members within your code file.

image

The re-ordering feature is very nice if you want to adhere to a coding standard. e.g. Castle Project Coding Standards. Below is a breakdown of how ReSharper 3.0 would structure your code if you use the Re-order settings file:

  1. Every section is sorted by Access i.e. public, protected, internal, private
  2. Sections from top to bottom:
    1. Delegates
    2. Enums
    3. Constants
    4. Static & Readonly Fields
    5. Fields
    6. Constructors (Static then Instance)
    7. Destructors
    8. Instance Indexers (Sorted by Abstract, Virtual, Override)
    9. Instance Properties (Sorted by Abstract, Virtual, Override)
    10. Instance Methods (Sorted by Abstract, Virtual, Override)
    11. Event Handling Methods
    12. Events Declarations
    13. Operators
    14. Interface Implementations
    15. Class Indexers (Sorted by Abstract, Virtual, Override)
    16. Class Properties (Sorted by Abstract, Virtual, Override)
    17. Class Methods (Sorted by Abstract, Virtual, Override)
    18. All other members
    19. Nested Types

I thought the ReSharper 3.0 & Castle community might find the re-order settings file I created helpful. 

To add the settings you should open the Type Member Layout section of the ReSharper 3.0 beta options screen:

image

And then Copy the following XML into the Custom Patterns box:

<?xml version="1.0" encoding="utf-8" ?>
<Patterns xmlns="urn:shemas-jetbrains-com:member-reordering-patterns">

  <!--Do not reorder COM interfaces-->
  <Pattern>
    <Match>
      <And Weight="100">
        <Kind Is="interface"/>
        <HasAttribute CLRName="System.Runtime.InteropServices.InterfaceTypeAttribute"/>
      </And>
    </Match>
  </Pattern>

  <!--Special formatting of NUnit test fixture-->
  <Pattern RemoveAllRegions="true">
    <Match>
      <And Weight="100">
        <Kind Is="class"/>
        <HasAttribute CLRName="NUnit.Framework.TestFixtureAttribute" Inherit="true"/>
      </And>
    </Match>

    <!--Setup/Teardow-->
    <Entry>
      <Match>
        <And>
          <Kind Is="method"/>
          <Or>
            <HasAttribute CLRName="NUnit.Framework.SetUpAttribute" Inherit="true"/>
            <HasAttribute CLRName="NUnit.Framework.TearDownAttribute" Inherit="true"/>
            <HasAttribute CLRName="NUnit.Framework.FixtureSetUpAttribute" Inherit="true"/>
            <HasAttribute CLRName="NUnit.Framework.FixtureTearDownAttribute" Inherit="true"/>
          </Or>
        </And>
      </Match>
      <Group Region="Setup/Teardown"/>
    </Entry>

    <!--All other members-->
    <Entry/>

    <!--Test methods-->
    <Entry>
      <Match>
        <And Weight="100">
          <Kind Is="method"/>
          <HasAttribute CLRName="NUnit.Framework.TestAttribute" Inherit="false"/>
        </And>
      </Match>
      <Sort>
        <Name/>
      </Sort>
    </Entry>
  </Pattern>

  <!--Default pattern-->
  <Pattern RemoveAllRegions="true">

    <!--delegate-->
    <Entry>
      <Match>
        <And Weight="100">
          <Access Is="public"/>
          <Kind Is="delegate"/>
        </And>
      </Match>
      <Sort>
        <Access Order="public protected internal private" />
        <Name/>
      </Sort>
      <Group Region="Delegates"/>
    </Entry>

    <!--enums-->
    <Entry>
      <Match>
        <Kind Is="enum"/>
      </Match>
      <Sort>
        <Access Order="public protected internal private" />
        <Name/>
      </Sort>
      <Group Region="Enums"/>
    </Entry>

    <!--constants-->
    <Entry>
      <Match>
        <Kind Is="constant"/>
      </Match>
      <Sort>
        <Access Order="public protected internal private" />
        <Name/>
      </Sort>
      <Group Region="Constants"/>
    </Entry>

    <!--static and readonly fields-->
    <Entry>
      <Match>
        <And>
          <Kind Is="field"/>
          <Or>
            <Static/>
            <Readonly/>
          </Or>
        </And>
      </Match>
      <Sort>
        <Access Order="public protected internal private" />
        <Name/>
      </Sort>
      <Group Region="Readonly &amp; Static Fields"/>
    </Entry>

    <!--fields-->
    <Entry>
      <Match>
        <Kind Is="field"/>
      </Match>
      <Sort>
        <Access Order="public protected internal private" />
        <Name/>
      </Sort>
      <Group Region="Fields"/>
    </Entry>

    <!--Constructors. Place static one first-->
    <Entry>
      <Match>
        <Kind Is="constructor"/>
      </Match>
      <Sort>
        <Static/>
        <Access Order="public protected internal private" />
      </Sort>
      <Group Region="C'tors"/>
    </Entry>

    <!--Destructors. Place static one first-->
    <Entry>
      <Match>
        <Kind Is="destructor"/>
      </Match>
      <Sort>
        <Static/>
        <Access Order="public protected internal private" />
      </Sort>
      <Group Region="Destructors"/>
    </Entry>

    <!--Instance indexers-->
    <Entry>
      <Match>
        <And>
          <Kind Is="indexer"/>
          <Not>
            <Static/>
          </Not>
        </And>
      </Match>
      <Sort>
        <Access Order="public protected internal private" />
        <Abstract/>
        <Virtual/>
        <Override/>
        <Name/>
      </Sort>
      <Group Region="Instance Indexers"/>
    </Entry>

    <!--instance properties-->
    <Entry>
      <Match>
        <And>
          <Kind Is="property"/>
          <Not>
            <Static/>
          </Not>
          <Not>
            <Kind Is="indexer"/>
          </Not>
        </And>
      </Match>
      <Sort>
        <Access Order="public protected internal private" />
        <Abstract/>
        <Virtual/>
        <Override/>
        <Name/>
      </Sort>
      <Group Region="Instance Properties"/>
    </Entry>

    <!--Methods-->
    <Entry>
      <Match>
        <And>
          <Kind Is="method"/>
          <Not>
            <Static/>
          </Not>
          <Not>
            <HandlesEvent />
          </Not>
          <Not>
            <Kind Is="destructor"/>
          </Not>
        </And>
      </Match>
      <Sort>
        <Access Order="public protected internal private" />
        <Abstract/>
        <Virtual/>
        <Override/>
        <Name/>
      </Sort>
      <Group Region="Instance Methods"/>
    </Entry>

    <!--Event Handling-->
    <Entry>
      <Match>
        <HandlesEvent />
      </Match>
      <Sort>
        <Access Order="public protected internal private" />
        <Abstract/>
        <Virtual/>
        <Override/>
        <Name/>
      </Sort>
      <Group Region="Event Handling"/>
    </Entry>

    <!-- event -->
    <Entry>
      <Match>
        <Kind Is="event"/>
      </Match>
      <Sort>
        <Access Order="public protected internal private" />
        <Name/>
      </Sort>
      <Group Region="Event Declarations"/>
    </Entry>

    <!-- operator -->
    <Entry>
      <Match>
        <Kind Is="operator"/>
      </Match>
      <Sort>
        <Access Order="public protected internal private" />
        <Name/>
      </Sort>
      <Group Region="Operators"/>
    </Entry>

    <!--interface implementations-->
    <Entry>
      <Match>
        <And Weight="100">
          <Kind Is="member"/>
          <ImplementsInterface/>
        </And>
      </Match>
      <Sort>
        <ImplementsInterface Immediate="true"/>
      </Sort>
      <Group>
        <ImplementsInterface Immediate="true" Region="${ImplementsInterface} Members"/>
      </Group>
    </Entry>

    <!--Class indexers-->
    <Entry>
      <Match>
        <And>
          <Kind Is="indexer"/>
          <Static/>
        </And>
      </Match>
      <Sort>
        <Access Order="public protected internal private" />
        <Abstract/>
        <Virtual/>
        <Override/>
        <Name/>
      </Sort>
      <Group Region="Class Indexers"/>
    </Entry>

    <!--Class properties-->
    <Entry>
      <Match>
        <And>
          <Kind Is="property"/>
          <Static/>
        </And>
      </Match>
      <Sort>
        <Access Order="public protected internal private" />
        <Abstract/>
        <Virtual/>
        <Override/>
        <Name/>
      </Sort>
      <Group Region="Class Properties"/>
    </Entry>

    <!--Class Methods-->
    <Entry>
      <Match>
        <And>
          <Kind Is="method"/>
          <Static/>
        </And>
      </Match>
      <Sort>
        <Access Order="public protected internal private" />
        <Abstract/>
        <Virtual/>
        <Override/>
        <Name/>
      </Sort>
      <Group Region="Class Methods"/>
    </Entry>

    <!--all other members-->
    <Entry/>

    <!--nested types-->
    <Entry>
      <Match>
        <Kind Is="type"/>
      </Match>
      <Sort>
        <Name/>
      </Sort>
      <Group>
        <Name Region="Nested type: ${Name}"/>
      </Group>
    </Entry>
  </Pattern>

</Patterns>

Enjoy!

del.icio.us Tags: , ,

Posted in Development, Refactoring, Software | 8 Comments »