Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > General > General Chat> Calling all Resharper users...
 

Pages: 1
General Chat
Calling all Resharper users...
Page:1/1 

  Print all messages in this thread  
Poster Message
MattWoberts
User



Location:
Lancaster, UK
Joined on:
08-Apr-2004 10:24:31
Posted:
497 posts
# Posted on: 11-Sep-2007 12:25:10.  
As you all probably know, ReSharper is probably the best thing that ever happened to VS.NET, it makes development and especially re-factoring a joy.. Its to Visual Studio / Coding what LLBLGEN is to OR Mapping in .NET Laugh

Anyway, I'm going to create a set of templates for ReSharper that should make working with LLBL even easier/better! Does anyone have any that they might have already - we could compile a uber-template set for LLBLGen Development in ReSharper...


Matt  Top
Jez
User



Location:
UK
Joined on:
01-May-2006 00:54:18
Posted:
198 posts
# Posted on: 13-Sep-2007 13:46:53.  
I use some simple LLBLGen-specific ReSharper templates, but nothing particularly fancy.

I have templates for:
- Creating a Using block with a Data Access Adapter
- Creating an Entity Collection
- Creating a Prefetch path
- Creating a sort expression
- Creating a RelationPredicateBucket


  Top
kakaiya
User



Location:
Melbourne, AU
Joined on:
20-Mar-2004 03:06:54
Posted:
144 posts
# Posted on: 15-Sep-2007 11:59:50.  
Hi Jez,

Is it possible to share this template?

Regards,

kakss
Amit Kakaiya
http://amit.kakaiya.com
LLBLGen Pro Consultancy and Support
 
Top
MattWoberts
User



Location:
Lancaster, UK
Joined on:
08-Apr-2004 10:24:31
Posted:
497 posts
# Posted on: 17-Sep-2007 10:03:14.  
I agree!

It would be good if you could post them, and we can add to them maybe in this thread?


Matt  Top
Jez
User



Location:
UK
Joined on:
01-May-2006 00:54:18
Posted:
198 posts
# Posted on: 17-Sep-2007 18:24:58.  
Here they are:

Surroung with Data Access Adapter:
Code:
using(DataAccessAdapter adapter = new DataAccessAdapter())
{
    $SELECTION$
}


Create Data Access Adapter (shortcut: adapterblock)
Code:
using(DataAccessAdapter adapter = new DataAccessAdapter())
{
    END$
}


Create an Entity Collection (shortcut: coll)
Code:
EntityCollection<$TYPE$> collection = new EntityCollection<$TYPE$>(new $TYPE$Factory());


Create a Prefetch Path (shortcut: ppath)
Code:
PrefetchPath2 prefetcher = new PrefetchPath2(EntityType.$TYPE$);


Create a RelationPredicateBucket (shortcut: rel)
Code:
RelationPredicateBucket bucket = new RelationPredicateBucket(
    $END$
);


Create a SortExpression (shortcut: sort)
Code:
SortExpression sorter = new SortExpression(
    $END$
);


I can also post them as ReSharper template XML files if that would be of use.
  Top
kakaiya
User



Location:
Melbourne, AU
Joined on:
20-Mar-2004 03:06:54
Posted:
144 posts
# Posted on: 18-Sep-2007 12:55:08.  
Thanks Jez. I do appreciate it.

It would be good if you can advice how to information for Resharper?

Regards,

kakss


Amit Kakaiya
http://amit.kakaiya.com
LLBLGen Pro Consultancy and Support
 
Top
Jez
User



Location:
UK
Joined on:
01-May-2006 00:54:18
Posted:
198 posts
# Posted on: 18-Sep-2007 17:50:50.  
What type of information are you looking for?
  Top
kakaiya
User



Location:
Melbourne, AU
Joined on:
20-Mar-2004 03:06:54
Posted:
144 posts
# Posted on: 20-Sep-2007 01:23:55.  
Hi Jez

Looking for as ReSharper template XML files.

Thanks
kakss


Amit Kakaiya
http://amit.kakaiya.com
LLBLGen Pro Consultancy and Support
 
Top
kakaiya
User



Location:
Melbourne, AU
Joined on:
20-Mar-2004 03:06:54
Posted:
144 posts
# Posted on: 20-Sep-2007 08:23:07.  
Hi Jez

Looking for as ReSharper template XML files.

Thanks
kakss
Amit Kakaiya
http://amit.kakaiya.com
LLBLGen Pro Consultancy and Support
 
Top
Jez
User



Location:
UK
Joined on:
01-May-2006 00:54:18
Posted:
198 posts
# Posted on: 20-Sep-2007 10:31:56.  
Here are the templates in the Resharper XML file format:

Code:

<TemplatesExport>
<Folder name="File 'LiveTemplates.xml'">
    <Template uid="1b0bef5f-4846-45f7-8283-9ea1be013bf9" text="using(DataAccessAdapter adapter = new DataAccessAdapter())&#xD;&#xA;{&#xD;&#xA; $END$&#xD;&#xA;}" shortcut="adapterblock" description="Data Access Adapter Block" reformat="true" shortenQualifiedReferences="true">
     <Context>
        <CSharpContext context="Statement" />
     </Context>
     <Variables />
     <CustomProperties />
    </Template>
     <Context>
        <CSharpContext context="TypeMember" />
     </Context>
     <Variables>
        <Variable name="string" expression="" initialRange="0" />
        <Variable name="MyProperty" expression="" initialRange="0" />
     </Variables>
     <CustomProperties />
    </Template>
    <Template uid="acdf7fa3-02d1-4b7c-8d7b-bcc7335e7a89" text="EntityCollection&lt;$TYPE$&gt; collection = new EntityCollection&lt;$TYPE$&gt;(new $TYPE$Factory());" shortcut="coll" description="Create an entity collection" reformat="true" shortenQualifiedReferences="true">
     <Context>
        <CSharpContext context="Statement" />
     </Context>
     <Variables>
        <Variable name="TYPE" expression="" initialRange="0" />
     </Variables>
     <CustomProperties />
    </Template>
    <Template uid="a003da41-e52d-4197-8214-17b5eb0da59f" text="RelationPredicateBucket bucket = new RelationPredicateBucket(&#xD;&#xA;$END$&#xD;&#xA;);" shortcut="rel" description="Create a RelationPredicateBucket" reformat="true" shortenQualifiedReferences="true">
     <Context>
        <CSharpContext context="Statement" />
     </Context>
     <Variables />
     <CustomProperties />
    </Template>
    <Template uid="10265439-b54f-43a6-949d-7e958c5d4469" text="SortExpression sorter = new SortExpression(&#xD;&#xA;$END$&#xD;&#xA;);" shortcut="sort" description="Sort Expression" reformat="true" shortenQualifiedReferences="true">
     <Context>
        <CSharpContext context="Statement" />
     </Context>
     <Variables />
     <CustomProperties />
    </Template>
    <Template uid="2b8625c6-54df-4d73-a5cf-c152ea6f9931" text="PrefetchPath2 prefetcher = new PrefetchPath2(EntityType.$TYPE$);" shortcut="pp" description="Creates a PrefetchPath" reformat="true" shortenQualifiedReferences="true">
     <Context>
        <CSharpContext context="Statement" />
     </Context>
     <Variables>
        <Variable name="TYPE" expression="" initialRange="0" />
     </Variables>
     <CustomProperties />
    </Template>
</Folder>
</TemplatesExport>


  Top
MattWoberts
User



Location:
Lancaster, UK
Joined on:
08-Apr-2004 10:24:31
Posted:
497 posts
# Posted on: 20-Sep-2007 11:02:54.  
Excellent, I'll combine those with mine and post an update soon Wink
Matt  Top
Jez
User



Location:
UK
Joined on:
01-May-2006 00:54:18
Posted:
198 posts
# Posted on: 20-Sep-2007 16:53:59.  
Out of interest what templates do you use?

  Top
kakaiya
User



Location:
Melbourne, AU
Joined on:
20-Mar-2004 03:06:54
Posted:
144 posts
# Posted on: 21-Sep-2007 02:52:04.  
Hi all,

How to use above Resharper template in VS2005? What do I need to do?

Thanks
kakss
Amit Kakaiya
http://amit.kakaiya.com
LLBLGen Pro Consultancy and Support
 
Top
Jez
User



Location:
UK
Joined on:
01-May-2006 00:54:18
Posted:
198 posts
# Posted on: 21-Sep-2007 09:13:34.  
With ReSharper installed go to:

ReSharper -> Options -> Live Templates

Then click the "mount file storage" button and point it to the XML file with the templates in.


  Top
kakaiya
User



Location:
Melbourne, AU
Joined on:
20-Mar-2004 03:06:54
Posted:
144 posts
# Posted on: 21-Sep-2007 09:38:20.  
Hi Jez,

When I try to import into Resharper it says:

---------------------------
Error Opening File
---------------------------
File format is invalid. Please make sure it is a valid templates file (created with Export Templates).
---------------------------
OK
---------------------------

Could you please ZIP the xml file and attach here.

Thanks a lot.
Regards,
kakss
Amit Kakaiya
http://amit.kakaiya.com
LLBLGen Pro Consultancy and Support
 
Top
Jez
User



Location:
UK
Joined on:
01-May-2006 00:54:18
Posted:
198 posts
# Posted on: 21-Sep-2007 11:39:16.  
Whoops, I had some extra stuff in there from another template that should have been deleted.

I can't seem to see a way to attach a file, but this is the XML for the fixed template.

Code:
<TemplatesExport>
<Folder name="File 'LiveTemplates.xml'">
    <Template uid="1b0bef5f-4846-45f7-8283-9ea1be013bf9" text="using(DataAccessAdapter adapter = new DataAccessAdapter())&#xD;&#xA;{&#xD;&#xA; $END$&#xD;&#xA;}" shortcut="adapterblock" description="Data Access Adapter Block" reformat="true" shortenQualifiedReferences="true">
     <Context>
        <CSharpContext context="Statement" />
     </Context>
     <Variables />
     <CustomProperties />
    </Template>
    <Template uid="acdf7fa3-02d1-4b7c-8d7b-bcc7335e7a89" text="EntityCollection&lt;$TYPE$&gt; collection = new EntityCollection&lt;$TYPE$&gt;(new $TYPE$Factory());" shortcut="coll" description="Create an entity collection" reformat="true" shortenQualifiedReferences="true">
     <Context>
        <CSharpContext context="Statement" />
     </Context>
     <Variables>
        <Variable name="TYPE" expression="" initialRange="0" />
     </Variables>
     <CustomProperties />
    </Template>
    <Template uid="a003da41-e52d-4197-8214-17b5eb0da59f" text="RelationPredicateBucket bucket = new RelationPredicateBucket(&#xD;&#xA;$END$&#xD;&#xA;);" shortcut="rel" description="Create a RelationPredicateBucket" reformat="true" shortenQualifiedReferences="true">
     <Context>
        <CSharpContext context="Statement" />
     </Context>
     <Variables />
     <CustomProperties />
    </Template>
    <Template uid="10265439-b54f-43a6-949d-7e958c5d4469" text="SortExpression sorter = new SortExpression(&#xD;&#xA;$END$&#xD;&#xA;);" shortcut="sort" description="Sort Expression" reformat="true" shortenQualifiedReferences="true">
     <Context>
        <CSharpContext context="Statement" />
     </Context>
     <Variables />
     <CustomProperties />
    </Template>
    <Template uid="2b8625c6-54df-4d73-a5cf-c152ea6f9931" text="PrefetchPath2 prefetcher = new PrefetchPath2(EntityType.$TYPE$);" shortcut="pp" description="Creates a PrefetchPath" reformat="true" shortenQualifiedReferences="true">
     <Context>
        <CSharpContext context="Statement" />
     </Context>
     <Variables>
        <Variable name="TYPE" expression="" initialRange="0" />
     </Variables>
     <CustomProperties />
    </Template>
</Folder>
</TemplatesExport>


  Top
kakaiya
User



Location:
Melbourne, AU
Joined on:
20-Mar-2004 03:06:54
Posted:
144 posts
# Posted on: 24-Sep-2007 02:29:54.  
Thanks Jez.
Amit Kakaiya
http://amit.kakaiya.com
LLBLGen Pro Consultancy and Support
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.