Changes to the P?Type? Template in CodeRush 11.1

Our previous posts on the New Contexts, the New StringProviders and the New Goto TextCommand in CodeRush 11.1 are obviously useful in their own right, but as hinted at they also come together to contribute to an upgrade to the standard p?Type? template.

The p?Type? template now emits any backing fields together in a single region. This renders the code easier to read, making it simpler to understand and maintain.

Consider the code expansion generated with the previous version of the p?Type? template…

pType10_2

As you can see, each field generated for backing store is placed next to the property that accesses it. This can be useful for grouping by function, but it can lead to code which is harder to read. Fields that are distributed in this way can be harder to locate are easily skipped over when scanning through code. We’ve long been asked for a way to group all te generated fields together in one place.

The new implementation of the p?Type? does exactly that, navigating to the first field in the type, injecting the field in this location and then returning to finish emitting the property at the location originally picked by the user.

pType11_1

I think you’ll agree it’s also a lot easier on the eyes.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.