RAD Studio 2010 - Refactoring & Help Insight for Generics

Posted by on in Blogs
Another enhanced feature in the RAD Studio 2010 and Delphi 2010 IDE is better support for Delphi generics. Both refactoring and Help Insight were updated to support generic types.

Refactoring


In Delphi 2010, it's now possible to perform rename refactoring on generic type and method symbols:

[caption id="attachment_12" align="aligncenter" width="300" caption="Rename Generic"]Rename Generic[/caption]

Change Parameters refactoring lets you add or remove procedure or function parameters from a generic procedure type:

[caption id="attachment_13" align="aligncenter" width="300" caption="Change Parameters Refactoring"]Change Parameters Refactoring[/caption]

Extract Method refactoring will work in code that contains generics, too.

Help Insight

Help Insight now gives a bit more information for generic types, too. When you hover over a variable that is declared as an instance of a generic type, you'll see the actual type details:

[caption id="attachment_14" align="aligncenter" width="300" caption="Help Insight for Generics"]Help Insight for Generics[/caption]

These are just a couple small changes that make it even easier to work with generic types in Delphi.


Comments

  • Guest
    Jan Sunday, 9 August 2009

    I don't find the Change parameters refactoring very useful. It is a lot easier just to add the parameter manually. However i think a "class update" shortcut (just like class completion shortcut) function would be nicer to have, if you have updated the parameter list in one place - and want to update it the other. That would be a lot easier than the Change Parameters function.

    Jan

  • Guest
    Joe White Wednesday, 12 August 2009

    The "Help Insight for Generics" screenshot is just bizarre. Why is it saying that TList is a nested type that's declared inside TMainForm? There's no "type TList = ..." inside TMainForm, so the Help Insight is clearly wrong.

  • Guest
    Darren Kosinski (Embarcadero) Thursday, 13 August 2009

    @Joe White: Help Insight is showing where this particular instantiation of TList comes from so it will be easier to determine what kind of data to expect, for example, from an element of FList.

  • Guest
    Delphi 2010 Preview! | 4DotNet Developers Blog Monday, 17 August 2009

    [...] Refactoring & Help Insight for Generics [...]

  • Guest
    Личная записная Tuesday, 25 August 2009

    [...]

  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: