Interface ICCImportFile
- All Superinterfaces:
Comparable<ICCFile>,ICCBase,ICCCoverageData,ICCCoverageDataBasic,ICCFile,ICCImportFlowPointParent,ICCImportStatementData,ICCPercentItem,ICCSource,ICCStatementData,ICCStatementDataBasic,ICCTreeItem
An importer will use this to add content about an imported file
- Since:
- 3.1
-
Field Summary
Fields inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCCoverageDataBasic
EMPTYTESTCASESFields inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCSource
SOURCE_OBJECT -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHitLines(int testID, Integer[] lines) Add an array of hit lines.voidAdd an array of executable lines NOTE: in v9 the behavior of adding lines in a batch has changed If the array of lines passed includes duplicates they will be converted to statements e.g.booleanaddPart(ICCImportPart part) Add an associated part to this file A part can be a program in the case of compiled languages This represents the artifact(s) created as a result of compiling this filevoidremoveLine(int lineNumber) When required by an importer individual lines can be removed; Nothing is done if the line number does not existvoidsetBaseFileName(String baseFileName) Unqualified file name Normally this will be the qualified name without any path informationvoidsetBaseName(String commonName) Set a "normalized" or "common" name for this file that can be used to compare.voidsetEncoding(String encoding) Set the codepage/encoding of this file's content SeeCharsetfor possible valuesvoidSet a reference to a cached or local copy of the file content NOTE: if the source/listing is in a zip then this method is not expected to return a file The API suggests thatICCFile.getStream()be used to retrieve content.voidSimilar tosetFile(File)but allows for the "external" flag.voidsetLanguage(int language) Set language for this file seeICCConstantsvoidsetQualifiedName(String qualifiedName) Set a name that may include path informationvoidsetSignature(byte[] signature) Set a unique signature for the file contents Based on MD5 it is used to compare file contents without opening the filevoidsetSourceDirectory(String sourcePath) Optional method to set the path where source/listing content is stored When the source/listing is in a zip this is the relative path to the sourcevoidsetSourceZipPath(String sourceZipPath) Set to the full path to the zip that contains the source/listingMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCBase
addEncodedMessage, addMessage, addMessage, getDecodedMessages, getDecodedMessages, getID, getMessages, getName, getProperties, getProperty, getProperty, isMessage, isProperty, setName, setProperty, updatePropertyMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCCoverageData
getHitLines, getLines, getTestcases, isHit, removeTestcaseMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCCoverageDataBasic
getNumExecutableLines, getNumFlowPoints, getNumHitFlowPoints, getNumHitLines, getTestcases, isHitMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCFile
getBaseFileName, getBaseName, getEncoding, getFile, getFile, getFlowPoint, getFlowPoint, getFlowPointByQualifiedName, getFlowPoints, getFlowPoints, getLanguage, getParts, getRootFlowPoints, getSignature, getSourceDirectory, getSourceZipPath, getStream, getStream, isNameMatch, isSourceAvailableMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.importers.ICCImportFlowPointParent
createFlowPoint, createFlowPoint, createFlowPointMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCImportStatementData
createStatement, setStatementHitMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCPercentItem
getPercentCoverageMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCSource
getFileName, getLine, getProperty, getResult, isExternal, setProperty, setSourceAvailable, updateFileMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCStatementData
getHitStatements, getLastStatement, getStatement, getStatement, getStatements, getStatements, getTestcases, isHitMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCStatementDataBasic
getNumExecutableStatements, getNumHitStatements, hasStatementsMethods inherited from interface com.ibm.debug.pdt.codecoverage.core.results.ICCTreeItem
addChild, addChildren, getChild, getChildren, getNumChildren, getParent, getQualifiedName, getUniqueID, getUUID, isRoot, refresh, setParent, setUUID, supportsUUID
-
Method Details
-
setFile
Set a reference to a cached or local copy of the file content NOTE: if the source/listing is in a zip then this method is not expected to return a file The API suggests thatICCFile.getStream()be used to retrieve content. This means that the contents do not need to be extracted but can be obtained directly from the zip- Parameters:
file- sets content to a local file
-
setFile
Similar tosetFile(File)but allows for the "external" flag. If external is true then the file is considered external to the results seeICCSource.isExternal()Files that are external to the results may be treated differently. e.g. Files that are stored with the results should be considered read only- Parameters:
file- sets content to a local fileexternal- indicates that file is external to results- Since:
- 5.0
-
setSourceZipPath
Set to the full path to the zip that contains the source/listing- Parameters:
sourceZipPath- - full path to the zip that contains the source/listing- Since:
- 4.0
-
setSourceDirectory
Optional method to set the path where source/listing content is stored When the source/listing is in a zip this is the relative path to the source- Parameters:
sourcePath- path to where source/listing can be found
-
setLanguage
void setLanguage(int language) Set language for this file seeICCConstants- Parameters:
language- programming language
-
addLines
Add an array of executable lines NOTE: in v9 the behavior of adding lines in a batch has changed If the array of lines passed includes duplicates they will be converted to statements e.g. 12,13,14,14,15 will be imported as 12,13,14.0,14.1,15 If the line already exists before adding the passed ones then they will be ignored as duplicates- Parameters:
lines- executable lines- Throws:
CCImportException- where there is a problem adding the lines
-
addHitLines
Add an array of hit lines. Hit lines can be added in batches. Duplicates are ignored- Parameters:
testID- testcase id that should be associated with the hit lineslines- hit lines (subset of executable lines)
-
setQualifiedName
Set a name that may include path information- Parameters:
qualifiedName- qualified name of file with path information
-
setBaseFileName
Unqualified file name Normally this will be the qualified name without any path information- Parameters:
baseFileName- unqualified file name- Since:
- 4.0
-
setBaseName
Set a "normalized" or "common" name for this file that can be used to compare. The name has information that can change during build from the name allowing for comparisons- Parameters:
commonName- common name if different from base name- Since:
- 4.0
-
addPart
Add an associated part to this file A part can be a program in the case of compiled languages This represents the artifact(s) created as a result of compiling this file- Parameters:
part- if the part already exists then nothing is changed- Returns:
- true if part added, false if it already existed
- Since:
- 9.0
-
setSignature
void setSignature(byte[] signature) Set a unique signature for the file contents Based on MD5 it is used to compare file contents without opening the file- Parameters:
signature- a binary signature based on the contents of the file- Since:
- 6.0
-
setEncoding
Set the codepage/encoding of this file's content SeeCharsetfor possible values- Parameters:
encoding- file encoding- Since:
- 7.0
-
removeLine
void removeLine(int lineNumber) When required by an importer individual lines can be removed; Nothing is done if the line number does not exist- Parameters:
lineNumber- to remove- Since:
- 10.1
-