PowerShell Studio 2012: What’s New? (Part 4)

Last time we looked at the new Control Sets. Now we will take a look at the new Script Editor features:

Improved Syntax Coloring

PowerShell Studio 2012 now colors cmdlet and functions parameters:

Parameter Coloring

Convert Cmdlet & Aliases

Using the Context Menu or the Keyboard Shortcut you can convert your Cmdlets and Aliases. You can also convert from parameter aliases as well.

Convert to Alias

 

Improved PrimalSense

PowerShell Studio’s PrimalSense has also been greatly improved to increase your scripting productivity.

Improved Parameter PrimalSense Support:

Parameter PrimalSense

 

Improvements include PrimalSense completion for Enumerators and Special Types:

Enumerator Code Completion:

Enumerator Code Completion

 

PrimalSense for Special Types:

PowerShell Studio will now display PrimalSense for special types such as Cursors and Colors:

PrimalSense for Colors

 

The improved PrimalSense will also display form control references:

Select Form Controls

Added Code Completion for Cmdlet and Function Parameters as well:

Parameter Enum

Parameter PrimalSense for Project Files:

When you define a parameter block in a Project File, they will now be reflected in the PrimalSense.

Parameter Block in ProjectFile

Project File Parameters

Code Completion for Methods:

A new feature that will help speed up your scripting is the new method completion.

Object Methods

Automatically insert the method parameters by pressing ‘Tab’:

Insert Method Parameters

You can Tab through each parameter and the PrimalSense will appear for the special types. Though you do not need to Tab complete the method parameters to benefit from the improved PrimalSense for special type arguments.

PrimalSense for Method Parameters

Improved Cmdlet PrimalSense:

PowerShell Studio improves PrimalSense support for various cmdlets such as the Get-WmiObject cmdlet:

GetWMIObject

As see can you,  PrimalSense for WMI namespaces and Classes are provided.

 

Script Navigation:

The Script Editor now has a new navigation menu which allows you to quickly navigate within your scripts.

Navigation Ribbon

Next Menu

The Navigate menu in the Ribbon offers:

Easy access to Bookmarks
Add/Remove Bookmarks as well as navigate to and between them.

Function Navigate
Go to the next and previous function/event declaration.

Change Navigation
Navigate to modifications made within your script file. Modification are denoted by a yellow and green indicators.

Modification Indicators

Occurrence Navigation
Navigate between occurrences of either variables, text or even cmdlets within your scripts.

Go to Last Edit Position
Press Ctrl + E and go to the last modification you made in the script.

Function Selection:

Triple click on the line number column of the editor and it will automatically select the whole function.

Triple Click Function Definition Selection

 

CmdletBinding Support:

Need to use CmdletBinding with your functions? Our PrimalSense now detects if a function uses CmdletBinding and displays the additional parameters the binding grants you.

CmdletBinding

 

Next: Part 5 – The new Function Explorer and other additions.