|
|||||||||||
PREV NEXT | FRAMES NO FRAMES |
Object[][] values = {
{"OS Version" , AboutDialog.getOSVersion()},
{"JDK Version", AboutDialog.getJavaVersion()}};
String copyright = "" +
"Copyright (c) 2002-2003, All rights reserved
" +
"Ralph Jocham
" +
"JCSC is released under the GPL
" +
"";
AboutDialog about = new AboutDialog((JFrame) null,
"About JCSC",
"Splash",
values,
copyright);
about.setModal(true);
about.setVisible(true);
ExampleCodeMouseListener
Listener to Enter/Exit events on the widgets.AbstractResultsFormatter
- Shows the results on the console in a compiler
typcial wayArgProcessor
is a generic argument processor for single character options
to be passed in into a command line program. addActionListener
add an ActionListener
addActionListener
assertFalse
- check if the boolean expression returns a true value
assertFalse
- check if the boolean expression returns a true value
assertTrue
- check if the boolean expression returns a true value
assertTrue
- check if the boolean expression returns a true value
boolean2String
converts a boolean value into
a String represnting the value - 'true', 'false'
convertString2Boolean
converts a String value into
a boolean representing the value - 'true', 'false'.
ConsoleResultsFormatter
- Shows the results on the console in a compiler
typcial wayDecimalNumberDocument
only accepts deciaml characters (0-9).defineOptions
- with this method the allowed arguments are defined.
EITHER
- either boolean true or false
escapeNewLine
replaces \n with \\n in a string
execute
method here.
executeFile
runs JCSC on one File
executeFiles
runs JCSC on an array of Files
FALSE
FileFinder
is helper clas which assists in getting all files
from a folder. fireActionPerformed
- called when an action has happened,
either on the TextField or on the Button.
getArgumentOption
- returns the value or the option
getArguments
- returns the real arguments; the command arguments
getAuthorTags
returns all the author tags
getAuthors
- get list of all @authors as
a comma separated string
getAuthors
getCCNCount
getClassName
getClassName
getColumn
getColumn
getDeprecatedTags
returns all the deprecated tags
getExpressionText
getExpressionText
getComponentText
- getValue the text from the component
getFiles
transforms FileSet into an File array
getLine
getLine
getLineCount
- get the count of lines
getMessage
getMethodName
getMethodName
getMethodsCount
- call this method after a successful
parse to obtain the number of methods
getNCSS
- get the count of NCSS
non commenting source statements
getNCSSCount
getName
returns the name of the tab
getObject
- returns the selected object, returns null if
dialog was canceled out
getObjects
- returns the array of selected objects, returns null if dialog was was
canceled out.
getOrder
returns the tags in the order they appeared
getOrderConvention
return the recomended order of the tags
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
getPackageName
getParaCount
getParamTags
returns all the param tags
getParameterName
getParameterType
getRegexp
getReturnTags
returns all the return tags
getRule
getSeeTags
returns all the see tags
getSerialTags
returns all the see tags
getSinceTags
returns all the since tags
getSource
getState
returns the current state
getTestString
getObject
getThrowsTags
returns all the see tags
getUnitTestClassCount
- call this method after a successful
parse to obtain the number of Unit test classes
getUnitTestsCount
- call this method after a successful
parse to obtain the number of Unit tests
getVersionTags
returns all the version tags
getViolations
- call this method after a successful
parse to obtain a List of violations.
getViolationsCount
- call this method after a successful
parse to obtain the number of violations
handleComplexLoopExpression
checks break condition is based
on an operation rather then on a constant
handleConditionalExpression
checks if cond expression are
allowd or not
handleConstructorDeclarationJavaDoc
handles the javadoc for
constructor declarations.
handleFieldDeclarationJavaDoc
handles the javadoc for
field declarations.
handleJavaDocTagOrder
handles if the javadoc tag order correct
handleMethodDeclarationJavaDoc
handles the javadoc for
method declarations.
handleSpaceAfterStatementKeyword
checks if the space count is not '0'.
handleStringLiteral
checks if String literal is allowed
handleTypeDeclarationJavaDoc
handles the javadoc for
class declarations.
handleTypeHeaderExpression
handles if the type (class/i-face) do start
with the correct header
hasAuthorTags
hasDeprecatedTags
hasFlagOption
- returns if the flag option is set
hasOption
- check if a certain option exists; the option can either be
a flag or an option with a value
hasParamTags
hasReturnTags
hasSeeTags
hasSerialTags
hasSinceTags
hasThrowsTags
hasVersionTags
incrementLineCount
increments the line count
incrementSpace
is called by the tokenizer when a space is read
insertString
argValid
- check if the boolean expression returns a true value
argValid
- check if the boolean expression returns a true value
isEither
indicates whether the state is either
isFalse
indicates whether the state is false
isJavaDoc
returns wheter the string is a javadoc.
notNull
- check if an object has no null reference
notNull
- check if an object has no null reference
isOrderCorrect
returns whether the order of the tags
complies with the order convention.
isRegexpMatch
return whether the regexp matches the value.
isTrue
indicates whether the state is true
JCSCTask
JavaDocParser
is an immutable class to getValue javadoc
data in tag granularity.JavaDocParser
instance.
JcscTab
has to be realized by all tabs on the JCSC RulesPanel
which is displayed on the RulesDialog.MethodMetric
- a metric for a methodMethodMetric
instance.
mAuthors
the authors of that class; if several authors
then names are separated by ','
mClass
the name of the class
mLineCount
the number of Lines
mMethodMetrics
the collection of all metrics
mNCSSCount
the number of methods (non commenting source statements)
mNCSSCount
the number of NCSS (non commenting source statements)
mOutputStream
is the stream to write the formated output
mPackage
the package the class belongs to
mUnitTestClassCount
the number of Unit test classes
mUnitTestsCount
the number of Unit tests
mViolations
the collection of all violations
mViolationsCount
the number of vioalations
main
for command line testing purpose
main
brings up the RulesDialog
mouseClicked
mouseEntered
mouseExited
mousePressed
mouseReleased
OveriewStatistics
is used to keep track about
all information of all classes which are parsed.openRulesFile
brings up a file chooser to choose a .jcsc
file
PackageStatistics
is used to keep track about
all information of a package.PackageStatistics
instance.
parse
- do the parsing!!!
processWindowEvent
- overwrited JFrame method
processWindowEvent
- overwrited JFrame method
putArguments
- put an array of options and arguments into the
ArgurmentProcessor.
putArguments
- put a string containing all options and arguments separated by a
white space into the ArgumentProcessor
RegexpDialog
is a dialog assisting in regexp creationRegexpDialog
instance.
RegexpDialog
instance.
RegexpDialog
instance.
RegTextArea
is a wrapped up JTextAreaRegTextArea
RegTextField
is a wrapped up JTextFieldRegTextField
RegexpDialogTextComponent
is a component which can be
used for text input.ResultsFormatter
- Formatter of the parsing results.Return
Collection of Return classes; used by the grammar to
return complex return valuesFormalParameterReturn
FormalParameterReturn
instance.
MethodDeclaratorReturn
MethodDeclaratorReturn
instance.
RuleConstants
contains all the constants which are
used for rule property file.RulesDialog
is the dialog in which the rules for JCSC can be
specified.RulesDialog
instance.
RulesDialog
instance.
RulesHandler
is a helper class which is resoponsibel for saving the
rules properties.RulesPanel
is a Swing UI JPanel to visually set the JCSC propertiesRulesPanel
instance.
removeActionListener
- remove an ActionListener
removeActionListener
removeCR
removes all the CR within a string
resetLineCount
resets the line counter to 0
resetNewLine
resets the new line flag to false
resetSpaceCount
resets the current space count to '0'
SelectDialog
instance.
SelectDialog
instance.
SelectDialog
instance.
SelectDialog
instance.
SelectDialog
instance.
SelectDialog
instance.
SelectDialog
instance.
SelectDialog
instance.
setAuthors
- set the values of the @author tags found
setAuthors
setCCNCount
setClass
- the name of the class
setClassName
setClassName
setColumn
setColumn
setDestdir
- the folder into which the output is written to.
setExpressionText
setExpressionText
setComponentText
- set the text int the component
setFailValue
set the fail value which will cause a failure if
the avg violations per ncss is higher.
setFile
- the name of the single file to check.
setFileName
- set the absolute path of the file
to be parsed
setIgnoreTestSeveriyt
- can be used to filter violations
up to (including) a specific value on Unit-Test classes.
setLastJavaDoc
set the last JavaDoc of the current class
setLine
setLine
setLineCount
- the number of Lines
setLineCount
setMessage
setMethodMetrics
- set all the method metrics
setMethodMetrics
setMethodName
setMethodsCount
- the number of methods count
setMethodsCount
setNCSSCount
setNCSSCount
- the number of NCSS
non commenting source statements
setNCSSCount
setNewLine
resets the new line flag to true
setOutputStream
- set the outputstream to write to
setOutputStream
setPackage
- the name of the package the class belongs to
setPackage
setPackageName
setRegexp
setResultsFormatter
- set the resulsthander to handle
the violations.
setResultsformatter
- the results formatter to use.
setRule
setRules
- the rules file to use.
setRules
passes in the cache of the processed
XML.
setSelectionMode
- set the selection mode of the dialog.
setSource
setStartDate
set the date/time from which files are being
considered.
setTestString
setObject
setUnitTestClassCount
- the count of unit test classes
setUnitTestClassCount
setUnitTestsCount
- the count of unit tests
setUnitTestsCount
setViolations
- set all the violations which occured
setViolations
setViolationsCount
- the count of violations
setViolationsCount
setWorstCount
- how many files should be part of the hall of
'shame'.
TRUE
TextFieldButton is a JTextField widget with a browse button
Example for typical usage:
// listener for action event from mTextFieldButton an instance of TextFieldButton
public void actionPerformed(ActionEvent e)
{
if (e.getActionCommand().equals(TextFieldButton.AC_BUTTON))
{
final SomeDialog sd = new SomeDialog(); // some selection happens here
sd.setActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
// update what is displayed in the textfield of the TextFieldButton
mTextFieldButton.setObject(((SomeDialog) e.getSource()).getSelection());
sd.dispose();
}
});
}
sd.pack();
sd.setVisible(true);
}
TextFieldButton
instance.
TextFieldButton
instance.
TextFieldButton
instance.
TriStateBoolean
is a boolean which can have
three states - true, false, either.TriStateBoolean
creates a new TriStateBoolean instance
toString
unescapeNewLine
replaces \\n with \n
Violation
- a violation and its informationXMLResultsFormatter
- Outputs the results in XML
|
|||||||||||
PREV NEXT | FRAMES NO FRAMES |