Class Inspector
java.lang.Object
de.hsh.graja.util.comment.Content
de.hsh.graja.util.comment.AbstractSequenceContent
de.hsh.graja.util.comment.inspector.Inspector
- All Implemented Interfaces:
Serializable
An Inspector represents the submitted source code, file by file.
Also, it stores the comments of all Graja results within the line the comments belong to (code-oriented).
- See Also:
-
Field Summary
Fields inherited from class de.hsh.graja.util.comment.Content
EXCLUSIVE, renderUuid
-
Constructor Summary
ConstructorsConstructorDescriptionInspector
(List<File> sourceFiles, IncludeSpec includeSpec) This constructor loads all given sourceFiles asInspectorFile
-
Method Summary
Modifier and TypeMethodDescriptiongetFiles()
void
renderHtmlImpl
(StringBuilder sb, IncludeInfo includeInfo, RenderContext ctx, boolean useJavascript) render content to HTML.void
renderPlainImpl
(StringBuilder appender, IncludeInfo includeInfo, RenderContext ctx) render content to plain text.void
Detects the first file having at least one line info and shows this file while hiding all other files.Methods inherited from class de.hsh.graja.util.comment.AbstractSequenceContent
isInlineContent
Methods inherited from class de.hsh.graja.util.comment.Content
click, dehighlight, disableCallerStacktraceRecording, enableCallerStacktraceRecording, equals, excludeGlobally, getIncludeSpec, getRenderUuid, getStackdump, hashCode, 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, toString
-
Constructor Details
-
Inspector
This constructor loads all given sourceFiles asInspectorFile
- Parameters:
sourceFiles
- The source code filesincludeSpec
- includeSpecs
-
-
Method Details
-
showFirstFileHavingLineInfo
public void showFirstFileHavingLineInfo()Detects the first file having at least one line info and shows this file while hiding all other files. -
getFiles
- Returns:
- a list of the files
-
getFile
- Parameters:
filename
- The file name of the InspectorFile to get- Returns:
- The InspectorFile of the given file name
-
getFileNames
- Returns:
- a list of the filenames
-
getContents
- Returns:
- a list of all contents.
-
getNestedContents
- Specified by:
getNestedContents
in classContent
- Returns:
- the set of contents nested in this content. Nested contents can be list items in a List, elements in a Sequence, elements in a Grid, elements in a Paragraph, and so on. If this is a leaf content, the returned set is empty.
-
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.- Specified by:
renderHtmlImpl
in classContent
- 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:
-
de.hsh.graja.util.comment.Content#renderHtml(StringBuilder, IncludeInfo, RenderContext)
-
renderPlainImpl
Description copied from class:Content
render content to plain text. This method is meant to be overriden by subclasses.- Specified by:
renderPlainImpl
in classContent
- Parameters:
appender
- plain text resultincludeInfo
- controls, which content to be rendered.ctx
- render context (unused).- See Also:
-