Home > Providers > DXCore Text Commands overall list

DXCore Text Commands overall list

January 28th, 2011

Here is the list of text commands provided by the DXCore Framework.

Text Command Description
AddAssemblyReference Adds a reference for the specified assembly to the active project if it doesn’t already exist.
AddNamespace Adds specified namespace references (passed as a parameter to this text command) to the active file, if these namespaces are not already referenced.
AlignNewLines Enables or disables new line alignment. If line aligning is disabled, the template expanding will be inserted as is without any additional characters.
BeginFormat Marks the beginning of the text formatting operation.
BlockAnchor Marks the end of a text selection. After text expansion is complete, the text between this marker and the cursor will be selected.
Caret Places the editor caret at the point where this text command appears in an expansion. If an expansion contains multiple cursor text commands, the editor caret will be positioned on the last one in the expansion. This text command is identical to the Cursor text command.
Class Inserts the name of the active class.
Class.Method Inserts the current class name plus the current method name separated with dot ‘.’. If there is no active method, this text command inserts the active class name.
ClearFields Clears all text fields (added with Field and FieldStart text commands) in the active document.
CompleteWord Invokes Visual Studio’s Intellisense at the editor caret position after text expansion has finished.
Cursor Places the editor caret at the point where this text command appears in an expansion. If an expansion contains multiple cursor text commands, the editor caret will be positioned on the last one in the expansion. This text command is identical to the Caret text command.
DefaultConstructor Generates default constructor for the current class.
DeleteAfterFormat Deletes the specified text (passed as a parameter) after the language service’s formatting has been performed.
DeleteRight Deletes the specified text (if it exists) to the right of the editor caret.
EndFormat Marks the end of the text formatting operation.
EscapeQuotes Replaces regular quote characters (“) with escaped quotes (\”) with a preceding slash character (e.g. for C# strings).
Field Adds a field to a text expansion.
FieldEnd Marks the end of a text field during expansion. Should be preceded by a FieldStart text command.
FieldStart Marks the start of a text field during expansion. Should be followed by a FieldEnd text command.
FinalTarget Adds a final target for text fields to a text expansion. Text fields can have two targets: A normal target created through the Target text command, and a final target created through this text command. Normal targets are cleared any time a new text expansion occurs that includes a text field. However, a final target is only cleared when the last target is reached and Enter is pressed, or when a new text expansion occurs that contains this FinalTarget text command (only one FinalTarget is allowed per document at any time).
FinalTargetEnd Marks an ending point for a final target for text fields to a text expansion. Text fields can have two targets. A normal target created through the Target text command, and a final target created through this text command. Normal targets are cleared any time a new text expansion expands that includes a text field, however a final target is only cleared when the last target is reached and Enter is pressed, or when a new text expansion expands that contains this FinalTarget text command (only one FinalTarget is allowed per document at any time).
FinalTargetStart Marks a starting point for a final target for text fields to a text expansion. Text fields can have two targets. A normal target created through the Target text command; and a final target created through this text command. Normal targets are cleared any time a new text expansion expands that includes a text field, however a final target is only cleared when the last target is reached and Enter is pressed, or when a new text expansion expands that contains this FinalTarget text command (only one FinalTarget is allowed per document at any time).
ForEach Iterates through language elements in the active or specified scope (Me, this, base, inherited, method, property, ClipType, ClipClass, File, or block) calling the specified template once for each item found. Elements that can be iterated include Field, Parameter, Property, Member, Method, Event, Class, etc. Members can be preceded by a visibility filter (e.g. “public”, “private”, etc.). Inside the template you’re calling, use «?Get(itemName)» and «?Get(itemType)» to get the name and type of each item iterated.
ForEachColumn Calls the specified template (passed as a parameter to this text command) once for each column in the TableColumns variable (which can be set using the Set string provider or with the GetTableDimensions text command). For each column iterated, the variable ColumnNum is incremented and its value can be queried using the Get string provider.
ForEachRow Calls the specified template (passed as a parameter to this text command) once for each row in the TableRows variable (which can be set using the Set string provider or with the GetTableDimensions text command). For each row iterated, the variable RowNum is incremented and its value can be queried using the Get string provider.
Format Formats the selected text.
FullTypeName Inserts the full name of the current type (class, struct, interface, module, or delegate).
GetTableDimensions Adds an interactive phase to get the dimensions of a table, and places those values in variables TableColumns and TableRows, which can be queried after this text command completes using the Get string provider. If the interactive phase is cancelled (e.g. by pressing Esc), both TableRows and TableColumns will be set to zero. You can use the ForEachRow and ForEachColumn text commands to expand a template for each row or column returned.
GotoCutPoint Takes the editor caret to the point where the last cut operation has been performed.
GotoFileBottom Takes the caret to the bottom of the active document.
GotoFileTop Takes the caret to the top of the active document.
GotoInsertionPoint Moves the caret to a new insertion point.
HardMarker Drops a hard standard marker. You can pass an optional integer parameter to specify life in seconds.
Intellassist Presents a list of Intellassist suggestions after text expansion has completed. Pass the suggestions as a comma-separated list of strings to this command. The first parameter can be an optional index into the code structure images included with CodeRush. To specify an image index, make the first parameter “$ImageIndex.”, followed by the name of the image constant (e.g., “$ImageIndex.Namespace”, or “$ImageIndex.Class”).
Link Creates a linked identifier in the code. Linked identifiers keep several references to the same identifier in sync – changes to one identifier are instantly propagated to the others. To use this text command, simply specify the identifier text as the first parameter. Subsequent calls to Link with the same variable name will expand to the initialized value of the first. If you need to create a variation of the identifier (for example, a field declaration linked to a property name), you can specify two additional parameters that are the names of string providers that convert the data to and from the needed representation.
Marker Drops a soft transient marker. You can pass an optional integer parameter to specify life in seconds.
Member Inserts the name of the active method, property, or field.
Method Inserts the name of the active method.
MultiLink Multi document linked identifier.
Namespace Inserts the name of the active namespace.
ParameterInfo Invokes Visual Studio’s parameter info tooltip at the editor caret position after text expansion has finished.
Paste Pastes the contents of the clipboard.
PasteType Inserts the type of the identifier on the clipboard. For example if “myVar” (declared as a System.Boolean) was on the clipboard, “bool” would be inserted.
ReferenceNamespaceFromType Adds the appropriate namespace reference from a supplied type (e.g. for System.Drawing.Bitmap, this text command will add System.Drawing if needed).
ReturnType Inserts the return type of the active method.
RootNamespace Insert the name of the active root namespace.
SetLeadingWhiteSpace This text command sets leading white space for the rest of the expansion.
SmartConstructor Generates constructor for the current class
SmartReturn This text command generates a smart return statement for the current method. If the current method returns a type, a best guess for the return value (based on identifiers in scope) will be suggested.
SoftAnchor Places the selection anchor at the point where this text command appears in an expansion unless a BlockAnchor text command appears elsewhere in the template. If an expansion contains multiple SoftAnchor text commands (but is without a BlockAnchor text command), the selection anchor will be positioned on the last SoftAnchor text command in the expansion. If an expansion contains a mix of SoftAnchor and BlockAnchor text commands, the selection anchor will be positioned on the last BlockAnchor text command in the expansion.
SoftCaret Places the editor caret at the point where this text command appears in an expansion unless a Caret or Cursor text command appears elsewhere in the template. If an expansion contains multiple SoftCaret text commands (but is without Caret and Cursor text commands), the editor caret will be positioned on the last SoftCaret text command in the expansion. If an expansion contains a mix of SoftCaret with Caret and/or Cursor text commands, the editor caret will be positioned on the last Caret or Cursor text command in the expansion.
StoreInsertionPoint Stores a new insertion point at the current caret position. Return to this point can be accomplished via the GotoInsertionPoint text command.
SuppressActionHint Suppresses the action hint associated with a template expansion.
Target Adds a target for a set of text fields. When the last text field inside a document is active, the target indicator appears showing the location where the caret will move when the last text field is accepted (typically through the Enter key). When the last text field in a document has been accepted, the target is activated. If a final target exists, a target indicator appears showing its location.
TextCommandBegin Inserts start text command character.
TextCommandEnd Inserts end text command character.
TextLink Creates a text link in the code. Text links keep several references to the same text in sync – changes to one reference are instantly propagated to the others. To use this text command, simply specify the text as the first parameter. Subsequent calls to Link with the same text will expand to the initialized value of the first.
TrimLeft Removes all white space to the left of the insertion point.
TypeKind Inserts the keyword for the current type.
TypeLink Creates a type-aware link in the code. Type-aware links keep several references to the same type name in sync – changes to one reference are instantly propagated to the others. To use this text command, simply specify the type name as the first parameter. Subsequent calls to Link with the same type name will expand to the initialized value of the first.
TypeName Inserts the name of the current type (class, struct or interface).
—–
Products: DXCore
Versions: 11.1 and up
VS IDEs: any
Updated: Oct/18/2011
ID: D059

Similar Posts: