|
|
Fix Code MenuThe Fix Code menu contains functions for externalizing strings and inserting comments into source code. Click the function name below for more information. Externalize and Edit String... Externalize Selected Strings...
Externalize StringThis function is enabled if the following conditions are met.
When you select this function, the selected text is externalized. This means that the selected text is extracted from the source file and placed in a resource file. In the source file, the text is then replaced by a method or function call that is designed to retrieve the text. For example: myResources.getString("aKey"), where aKey is a key value used to identify the string to retrieve from the resource file. For more information on externalization, click here. Externalize and Edit String...Brings up the Externalize and Edit String dialog box that allows you to edit the text to be externalized prior to writing it to the resource file. Click here for information on this dialog box. Externalize Selected Strings...This function lets you externalize multiple strings at once. It is only enabled under these circumstances:
Note: If a string is several lines long, Globalyzer will display an error and will not include the string in the batch externalization process. To externalize these long strings, use Single String Externalization, but be sure to check that the entire string is selected in the source file before clicking the Plunger button. To Do CommentThis comment is simply a string that you or others can later search for in your source code. The comment will be inserted into the selected source file at the current position of the cursor. If text is highlighted in the source file, such as an unsafe method that you want to tag with a To Do Comment, a blank line will be inserted above the line containing the highlighted text and the comment will be placed on the new line and indented to match the surrounding code. Ignore Next Line CommentThis comment is a string that Globalyzer looks for while scanning your code. When the scanner finds an Ignore Next Line Comment, it ignores the line following the comment. The comment will be inserted into the selected source file at the current position of the cursor. If text is highlighted in the source file, such as an embedded string that you want to tag with an Ignore Next Line Comment, a blank line will be inserted above the line containing the highlighted text and the comment will be placed on the new line and indented to match the surrounding code. Start Ignore CommentThis comment is a string that Globalyzer looks for while scanning your code. When the scanner finds a Start Ignore Comment, it then scans for the End Ignore Comment. If both strings are found in the source code file, Globalyzer ignores all the lines of code between the two ignore comment strings. The Start Ignore Comment will be inserted into the selected source file at the current position of the cursor. If text is highlighted in the source file, such as the first of a block of embedded strings that you want to tag with a Start Ignore Comment, a blank line will be inserted above the line containing the highlighted text and the comment will be placed on the new line and indented to match the surrounding code. End Ignore CommentThis comment is a string that Globalyzer looks for while scanning your code. When the scanner finds a Start Ignore Comment, it then scans for the End Ignore Comment. If both strings are found in the source code file, Globalyzer ignores all the lines of code between the two ignore comment strings. The End Ignore Comment will be inserted into the selected source file at the current position of the cursor. If text is highlighted in the source file, such as text in the line following the block of embedded strings that you want to tag with an End Ignore Comment, a blank line will be inserted above the line containing the highlighted text and the comment will be placed on the new line and indented to match the surrounding code. Externalized String CommentThis comment is a text string that can be inserted into your source code after you externalize text. When you externalize text, the text string you externalize is appended to the end of the Externalized String Comment, and the entire comment is placed on the system clipboard. You can then paste it into your source code near the externalized string if you wish. The Externalized String Comment will be inserted into the selected source file at the current position of the cursor. If text is highlighted in the source file, as it would be if you had just externalized a string, a blank line will be inserted above the line containing the highlighted text and the comment will be placed on the new line and indented to match the surrounding code.
|