Class InspectorLine
java.lang.Object
de.hsh.graja.util.comment.Content
de.hsh.graja.util.comment.AbstractElementContent
de.hsh.graja.util.comment.Verbatim
de.hsh.graja.util.comment.inspector.InspectorLine
- All Implemented Interfaces:
Serializable
A line of an inspector represents a line of the submitted source code
and helds all graja result comments that belongs to this line.
The renderable line returns getLine() as a
Verbatim
.
Result information about this line returns getLineInfo() as List<InspectorLineInfo>
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hsh.graja.util.comment.Verbatim
Verbatim.WhitespaceExpansion
-
Field Summary
Fields inherited from class de.hsh.graja.util.comment.Verbatim
CARRIAGE_RETURN, LINE_FEED, TABULATOR_EXPANSION, TABULATOR_START, TABULATOR_STOP, TABWIDTH
Fields inherited from class de.hsh.graja.util.comment.Content
EXCLUSIVE, renderUuid
-
Constructor Summary
ConstructorsConstructorDescriptionInspectorLine
(Integer lineNumber, String sourceCode, IncludeSpec includeSpec) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHtmlAttr
(String key, String val) void
addLineInfo
(InspectorLineInfo info) void
void
int
getLine()
int
getStyle()
boolean
static String
Prefixes looks like this: 9| 10| 11|void
void
renderHtmlImpl
(StringBuilder sb, IncludeInfo includeInfo, RenderContext ctx, boolean useJavascript) render content to HTML.void
renderPlainImpl
(StringBuilder sb, IncludeInfo includeInfo, RenderContext ctx) render content to plain text.Methods inherited from class de.hsh.graja.util.comment.Verbatim
createSymbolLegendForText, equals, expandTabsWithSymbols, expandTabsWithSymbols, format, getData, getDataWithExpandedWhitespaces, getTabWidth, getWhitespaceExpansion, hashCode, isInlineContent, setData, setTabWidth, toString
Methods inherited from class de.hsh.graja.util.comment.AbstractElementContent
getNestedContents
Methods inherited from class de.hsh.graja.util.comment.Content
click, dehighlight, disableCallerStacktraceRecording, enableCallerStacktraceRecording, excludeGlobally, getIncludeSpec, getRenderUuid, getStackdump, hide, highlight, include, isCallerStacktraceRecordingEnabled, isHidden, isShowing, onClick, onClick, onHide, onHide, onLoad, onLoad, onShow, onShow, registerCallable, renderHtml, renderHtml, renderIdAttribute, renderJavascriptOncePerClass, renderOnClickAttribute, renderPlain, renderPlain, setGlobalIncludeInfo, setHref, setIncludeSpec, show, toString
-
Constructor Details
-
InspectorLine
-
-
Method Details
-
prependLineInfo
-
addLineInfo
-
cssHighlightLine
public void cssHighlightLine() -
addStyle
-
addHtmlAttr
-
getStyle
-
getContents
- Returns:
- a list of all contents.
-
prefix
Prefixes looks like this: 9| 10| 11|- Parameters:
lineNumber
- as Integer- Returns:
- The line prefix as a String
-
getLine
-
getLineInfo
-
hasLineInfo
public boolean hasLineInfo() -
getLineNumber
public int getLineNumber() -
getCharLength
public int getCharLength() -
renderHtmlImpl
public void renderHtmlImpl(StringBuilder sb, IncludeInfo includeInfo, RenderContext ctx, boolean useJavascript) Description copied from class:Content
render content to HTML. This method is meant to be overriden by subclasses.- Overrides:
renderHtmlImpl
in classVerbatim
- Parameters:
sb
- HTML code resultincludeInfo
- controls, which content to be rendered.ctx
- render contextuseJavascript
- if true, the generated HTML code will contain Javascript- See Also:
-
Content#renderHtmlImpl(StringBuilder, IncludeInfo, RenderContext)
-
renderPlainImpl
Description copied from class:Content
render content to plain text. This method is meant to be overriden by subclasses.- Overrides:
renderPlainImpl
in classVerbatim
- Parameters:
sb
- plain text resultincludeInfo
- controls, which content to be rendered.ctx
- render context (unused).- See Also:
-