live-templates

how can i make a "Surround" type Delphi Template?

i'm migrating my app to delphi 2009. my app must still use a lot of AnsiString. during migration, i find myself always converting: abc := def; into: abc := string(def); or abc := TDeviceAnsiString(def); i know i should be able to do this with templates but i find templates--although powerful--are not so easy to get working. h...

Resharper Live Template Macro that changes variable name upon exit

I would like to create a Resharper Live Template that changes all spaces to underscores ind my "fact" Live template variable $testname$: <Fact()> _ Public Sub $testnames$() ' Arrange $END$ ' Act ' Assert End Sub I have this: [Macro("applyRegex", ShortDescription = "Run on {#0:variable}", LongDescription = "")] ...

Make resharper show the options of an enum in a live template?

I'm traying to create the following resharper live template: Using New Tracer($EXPR$) $END$ End Using Currently $EXPR$ is currently "Suggest variable of " What I'm trying to do is that this whould show me for example a dropdown with the options of MyEnum and then after selecting goes to $END$ Is this possible? ...

Live Template for Delphi that generate a Property with getter / setter and create the private field?

Searching here and on the internet have not let me to a example of a Live Template for Delphi that generate a Property with getter / setter and also generate the private field and execute the complication. (SHIFT + CTRL + C) Is this possible? ...

Delphi live template to surround selection with parentheses

I'm trying to make a Delphi live template (in D2010) to surround a selection with (). My current attempt looks like: <code language="Delphi" delimiter="|"><![CDATA[(|selected|)]]> and it almost works but puts in extra whitespace. If I have a code line like: if blah = 5 then and I selected just the blah = 5 part and invoked my tem...

How to make live template in Visual studio 2010?

How to make live template in Visual studio 2010, I don't know is it really live template or macro, but what I wan't to do is when I'm write code and when I type let's say -> in, and press space, that program automatically insert code that look like this -> #include <>. In c++ builder for that purpose we use xml file who is automatically ...

What is the Eclipse equivalent of IntelliJ "Live templates"?

I mean stuff like typing "iter" and getting a "for" loop with a choice of what variable to iterate on , typing "soutv" to generate a "System.out.println" with the "variable=" already in ... Thanks ! ...