X
- the class of the elements in the left input sequence.Y
- the class of the elements in the right input sequence.public class SourceCodeColumn<X,Y> extends AbstractHTMLColumn<X,Y>
Modifier and Type | Class and Description |
---|---|
static class |
SourceCodeColumn.CodePosition
A simple class that is meant to store an interval in source code, starting at a certain line
and column and ending at a certain line and column.
|
static interface |
SourceCodeColumn.PositionExtractor<X>
An interface for functions that extract a CodePosition from an object.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_SRC_LENGTH_LIMIT |
Constructor and Description |
---|
SourceCodeColumn(SourceCodeColumn.PositionExtractor<X> leftPositionExtractor,
SourceCodeColumn.PositionExtractor<Y> rightPositionExtractor,
File workingDir,
String keyword,
int srcLengthLimit) |
SourceCodeColumn(SourceCodeColumn.PositionExtractor<X> leftPositionExtractor,
SourceCodeColumn.PositionExtractor<Y> rightPositionExtractor,
String keyword) |
Modifier and Type | Method and Description |
---|---|
String |
getCSS()
This default implementation returns an empty string.
|
static String |
getSourceCode(File workingDir,
SourceCodeColumn.CodePosition pos,
int tabSize)
Returns the source code located at the given CodePosition.
|
getHTML, getJS, getKeyword, getNumColumns
public static final int DEFAULT_SRC_LENGTH_LIMIT
public SourceCodeColumn(@NonNull SourceCodeColumn.PositionExtractor<X> leftPositionExtractor, @NonNull SourceCodeColumn.PositionExtractor<Y> rightPositionExtractor, @NonNull String keyword)
public SourceCodeColumn(@NonNull SourceCodeColumn.PositionExtractor<X> leftPositionExtractor, @NonNull SourceCodeColumn.PositionExtractor<Y> rightPositionExtractor, @NonNull File workingDir, @NonNull String keyword, int srcLengthLimit)
public static String getSourceCode(@NonNull File workingDir, @NonNull SourceCodeColumn.CodePosition pos, int tabSize) throws IOException
workingDir
- the working directory.pos
- a CodePosition.tabSize
- the tabSize used in the given CodePosition.IOException
- is thrown if the working directory or the code file could not be
found or if there were IOExceptions during access of the code file.public String getCSS()
AbstractHTMLColumn
getCSS
in interface HTMLColumn<X,Y>
getCSS
in class AbstractHTMLColumn<X,Y>
Copyright (C) 2016 Benjamin Paaßen, AG Theoretical Computer Science, Centre of Excellence Cognitive Interaction Technology (CITEC), University of Bielefeld, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/tcs . This documentation is licensed under the conditions of CC-BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/