The Source Menu        

The Source Menu

The commands in the Source menu are used by plug-in developers when editing source code. They are also used from time to time by other users in order to edit special files in a project, such as the copies file that controls the number of copies of a game component to include in an automatically generated deck. The Source menu is not used when editing normal game components.

Run File
Saves and runs the script file that you are currently editing.
Debug File
Saves and runs the script file that you are currently editing in debug mode. A breakpoint will be set at the top of your script. The Script Debugger? must be enabled for this to work. Note that if you use this command, and the debugging client is not already running and cannot be started automatically, the application will effectively be frozen. Before using this command, you may wish to ensure that the command to launch the debugging client works correctly. (This is found in the Preferences Dialog.)
Make Plug-in Bundle
If you are editing a file in a plug-in task in a project, this command will build a plug-in bundle from the contents of the task folder. It is equivalent to right-clicking the task folder and choosing the command with the same name.
Test Plug-in
If you are editing a file in a plug-in task, this will open the Test Plug-in dialog.
Remove Trailing Spaces
Tidies up the edited source file by remove extraneous whitespace from the ends of lines.
Move Up
Moves the selected lines up one line in the source file. This is handy for organizing a source file, for example, by moving related functions together. You will want to learn the keyboard shortcut, since this command is usually executed multiple times.
Move Down
Moves the selected lines down one line in the source file.
Comment Out
Comments out the selected source lines. Often useful during development when you want to experiment with different possible solutions.
Removes comment markers from the selected source lines. This undoes the effect of the Comment Out command.
This command can be used to sort the selected lines of text. This is often useful when editing data files for plug-ins that add support for new games and other content.
Play Macro
This plays back the most recently recorded command macro. A macro is a sequence of keyboard commands that you record by typing them into the source code editor, then play back to repeat them. This is often useful when you need to make adjustments to the formatting of a source file. For example, you could record a macro consisting of the keys Home, Ctrl+Shift+Right, Delete, Down to delete the first word in a line and then move down to the next line. You could then repeat this macro several times to quickly do this for a large block of lines.
Start Macro Recording
Starts recording a new macro. You can play an existing macro while recording a new macro; the existing macro will not be replaced until you stop recording. The caret in the source code editor turns red as a reminder that recording is active.
Stop Macro Recording
Stops recording the current macro. Once you stop recording. You can then use the Play Macro command to repeat the recorded key strokes.
Complete Code
When editing a source file, this will try to find suggestions for how to complete the bit of code you are currently typing. If there are suggestions, a completion pop-up window will open and you can select a completion with the Up, Down and Enter keys. For example, if the caret is inside the parentheses of a useLibrary() statement, the Complete Code command will pop up a list of available libraries.
Just like the abbreviations available when editing markup on game components, you can define a set of abbreviations for each kind of source file that you edit.

Contributors to this page: Chris Jennings and system .
Page last modified on Saturday 01 of June, 2013 14:57:09 EDT by Chris Jennings.