Project Properties Dialog Box
This dialog lets you change parameters that affect the code scanning
and fixing features of Globalyzer. The dialog is divided into two
main panels: Scanning and Fixing. To display a panel,
select its tab.
The Scanning tab contains functions for modifying the way
source code scans are performed. This tab consists of the following
three sub-panels:
Paths
Types
Rules
The Fixing tab contains functions for modifying the code
fixing features of Globalyzer. This tab consists of the following
two sub-panels:
Text I18N
Comments
Paths Panel

The Paths panel lets you specify where Globalyzer looks for source
files to scan and where scan reports are stored.
Source path -- This field lets you specify where Globalyzer
looks for source files to scan. You can specify one or more directory
paths, one or more individual source files, or any combination of
directories and files. You can type the paths directly, or use the
Browse button if you wish to navigate your system.
Results path -- This field lets you specify where Errors
Reports, HTML Reports, and Text Reports are stored. Use the Browse
button if you wish to navigate to the directory.
Types Panel

The Types panel lets you specify which reports to generate, what
to call them, and the types of scans to perform.
Error table -- Enter a name for the Error Report generated by
the scan. The Errors Table is saved with this name in the directory specified
by the results path.
Text summary -- Enter a name for the Text Report generated
by the scan. The Text Summary report is basically the same as the
HTML Summary Report, except the HTML Report contains interactive
links to information about specific errors.
HTML summary -- Enter a name for the HTML Report generated
by the scan.
Note: The reports are stored in the directory specified
by the results path.
Rules Panel

The Rules panel is used to select which Rule Set to apply to the
scan. For more information on Rule Sets, click here.
Rule sets -- Select a Rule Set from the dropdown list. This
Rule Set will be applied to the next scan.
Text I18N Panel

The Text I18N panel lets you configure how the code fixing features
of Globalyzer work.
Resource file type -- Pick the type of resource file to
use when you externalize embedded text strings. Choose between properties
(for Java projects) and resx (for ASP .NET projects). For
more information on string externalization, click here.
Resource file frequency -- Choose between Project
and Source File. If you pick Project, a single resource file
is used for all embedded text that you externalize. If you pick
Source File, a new resource file is created for each source file
from which you externalize text. Each new resource file's name is
based on the name of the corresponding source file.
Tag library -- Select the tag library used by your JSP project.
Currently, the only option is the Struts Tag Library. This list
is only enabled if the current Rule Set includes JSP files.
Retrieval method -- Enter the fully qualified name of a
method you wish to use to retrieve strings from resource files.
For instance, in Java, a method to retrieve text from the resource
file might be: util.myBundle.getResourceText("aKey").
In this case, you would enter util.myBundle.getResourceText
in the Retrieval method field, omitting the open parenthesis and
everything that follows it.
When you externalize text, the text is automatically replaced with
a call to the retrieval method. The method must be written to take
one string parameter. This parameter is filled in with an automatically
generated string key value. Both the key and the original text are
written to the appropriate resource file.
For example, assuming you are working in Java, and your original
source code contains the line:
JButton myButton = new JButton("Cancel");
Note: When you externalize the embedded text string "Cancel",
the resulting line will look like this (assuming you use the retrieval
method described previously):
JButton myButton = new JButton(util.myBundle.getResourceText("0_MYPROJ_CANCEL"));
where 0_MYPROJ_CANCEL is an automatically generated key,
and could be different in your application.
Key start value -- Enter the starting value for numbers
that are prepended to automatically generated resource keys. When
you externalize text, a resource key is automatically generated.
Each automatically generated key begins with a number followed by
an underscore (for example, 12_). The start value is the number
Globalyzer begins with.
Note: Globalyzer always remembers and displays the current
count number in this field, even if you stop and restart Globalyzer.
This number is incremented each time you externalize text.
Share Strings -- Choose YES if you would like identical
text strings to share the same resource key when you externalize
the text. If you choose NO, then each string you externalize
will be assigned a unique key. In other words, although "Cancel"
appears numerous times in an application, it is only referenced
in the resource file once.
Resource file path -- Specify the directory for the resource file(s)
that Globalyzer creates during string externalization. Initially, the path
is set to the directory where Globalyzer is installed.
In the case where the Resource file frequency is set to
Project, specify the filename for the resource file. Otherwise,
Globalyzer will create a resource file using the name of the currently selected
rule set. For example, for the java rule set named my_ruleset,
Globalyzer will create the resource file my_ruleset.properties.
In the case where Resource file frequency is set to Source File,
Globalyzer will create multiple resource files, with names that correspond to the
source filenames. For example, for a file named SwingTest.java,
Globalyzer will create a resource file name SwingTest.properties to
hold its externalized strings.
Header file path -- Specify the directory for the header resource file(s)
that Globalyzer creates during string externalization. Initially, the path
is set to the directory where Globalyzer is installed.
This field is only available for programming languages where a header include
file is required for string externalization; for example,
C++ externalized resources require both a resource
file (.RC) for the externalized strings and an include file (.H) for the
for the corresponding resource integer identifiers.
Comments Panel

The Comments panel lets you customize the text that is associated
with one of Globalyzer's three comment types. Globalyzer provides
functions for pasting these comments into your source code under
the Fix Code menu.
To do comment -- This comment is simply a string that you
or others can later search for in your source code. It may be used
for any purpose that you wish.
Ignore next line comment -- This comment is a string that Globalyzer
looks for while scanning your code. When the scanner finds an
"Ignore next line"
comment, it ignores the next line following the comment.
Start ignore comment and End ignore comment -- These two
fields work together to ignore sequential lines of code.
Globalyzer looks for the
"Start ignore" comment while scanning your code. Once found,
Globalyzer 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.
Externalized string comment -- This 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 this 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.
|