public class KloSource extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected static int |
SOURCE_GENERATOR_OFFSET
Offset of the source code generator.
|
Constructor and Description |
---|
KloSource(hudson.model.AbstractBuild<?,?> owner,
KloWorkspaceFile kloWorkspaceFile) |
Modifier and Type | Method and Description |
---|---|
KloWorkspaceFile |
getKloWorkspaceFile() |
String |
getSourceCode()
Returns the line that should be highlighted.
|
String |
highlightSource(InputStream file)
Highlights the specified source and returns the result as an HTML string.
|
void |
splitSourceFile(String sourceFile)
Splits the source code into three blocks: the line to highlight and the
source code before and after this line.
|
protected static final int SOURCE_GENERATOR_OFFSET
public KloSource(hudson.model.AbstractBuild<?,?> owner, KloWorkspaceFile kloWorkspaceFile)
public final void splitSourceFile(String sourceFile)
sourceFile
- the source code of the whole file as rendered HTML stringpublic final String highlightSource(InputStream file) throws IOException
file
- the source file to highlightIOException
public String getSourceCode()
public KloWorkspaceFile getKloWorkspaceFile()
Copyright © 2004-2014. All Rights Reserved.