Class SourceEditorController
- java.lang.Object
-
- net.sourceforge.pmd.util.fxdesigner.util.AbstractController
-
- net.sourceforge.pmd.util.fxdesigner.SourceEditorController
-
- All Implemented Interfaces:
javafx.fxml.Initializable,SettingsOwner
public class SourceEditorController extends AbstractController
One editor, i.e. source editor and ast tree view.- Since:
- 6.0.0
- Author:
- Clément Fournier
-
-
Constructor Summary
Constructors Constructor Description SourceEditorController(DesignerRoot owner, MainDesignerController mainController)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterParentInit()Executed after the parent's initialization (so afterAbstractController.afterChildrenInit()).protected voidbeforeParentInit()Executed before the parent's initialization.voidclearErrorNodes()Clears the name occurences.voidclearNameOccurences()Clears the name occurences.voidclearStyleLayers()voidclearXPathHighlight()Clears the highlighting of XPath results.java.lang.StringgetAuxclasspathFiles()java.util.Optional<net.sourceforge.pmd.lang.ast.Node>getCompilationUnit()Returns the most up-to-date compilation unit, or empty if it can't be parsed.net.sourceforge.pmd.lang.LanguageVersiongetLanguageVersion()java.lang.StringgetText()voidhighlightErrorNodes(java.util.Collection<? extends net.sourceforge.pmd.lang.ast.Node> nodes)Highlights nodes that are in error (secondary highlight).voidhighlightNameOccurrences(java.util.Collection<? extends net.sourceforge.pmd.lang.symboltable.NameOccurrence> occs)Highlights name occurrences (secondary highlight).voidhighlightXPathResults(java.util.Collection<? extends net.sourceforge.pmd.lang.ast.Node> nodes)Highlights xpath results (xpath highlight).org.reactfx.value.Var<net.sourceforge.pmd.lang.LanguageVersion>languageVersionProperty()voidmoveCaret(int line, int column)Moves the caret to a position and makes the view follow it.java.util.Optional<net.sourceforge.pmd.lang.ast.Node>refreshAST()Refreshes the AST and returns the new compilation unit if the parse didn't fail.voidsetAuxclasspathFiles(java.lang.String files)voidsetFocusNode(net.sourceforge.pmd.lang.ast.Node node)Highlights the given node (or nothing if null).voidsetLanguageVersion(net.sourceforge.pmd.lang.LanguageVersion version)voidsetText(java.lang.String expression)voidshowAuxclasspathSetupPopup(DesignerRoot root)org.reactfx.value.Val<java.lang.String>textProperty()TextAwareNodeWrapperwrapNode(net.sourceforge.pmd.lang.ast.Node node)-
Methods inherited from class net.sourceforge.pmd.util.fxdesigner.util.AbstractController
afterChildrenInit, getChildren, getChildrenSettingsNodes, initialize
-
-
-
-
Constructor Detail
-
SourceEditorController
public SourceEditorController(DesignerRoot owner, MainDesignerController mainController)
-
-
Method Detail
-
beforeParentInit
protected void beforeParentInit()
Description copied from class:AbstractControllerExecuted before the parent's initialization. Always executed once at the start of the initialization of this controller.- Overrides:
beforeParentInitin classAbstractController
-
afterParentInit
protected void afterParentInit()
Description copied from class:AbstractControllerExecuted after the parent's initialization (so afterAbstractController.afterChildrenInit()). This also means, after persistent settings restoration. If this node has no parent, then this is never executed.- Overrides:
afterParentInitin classAbstractController
-
refreshAST
public java.util.Optional<net.sourceforge.pmd.lang.ast.Node> refreshAST()
Refreshes the AST and returns the new compilation unit if the parse didn't fail.
-
showAuxclasspathSetupPopup
public void showAuxclasspathSetupPopup(DesignerRoot root)
-
clearErrorNodes
public void clearErrorNodes()
Clears the name occurences.
-
clearNameOccurences
public void clearNameOccurences()
Clears the name occurences.
-
clearXPathHighlight
public void clearXPathHighlight()
Clears the highlighting of XPath results.
-
setFocusNode
public void setFocusNode(net.sourceforge.pmd.lang.ast.Node node)
Highlights the given node (or nothing if null). Removes highlighting on the previously highlighted node.
-
highlightXPathResults
public void highlightXPathResults(java.util.Collection<? extends net.sourceforge.pmd.lang.ast.Node> nodes)
Highlights xpath results (xpath highlight).
-
highlightNameOccurrences
public void highlightNameOccurrences(java.util.Collection<? extends net.sourceforge.pmd.lang.symboltable.NameOccurrence> occs)
Highlights name occurrences (secondary highlight).
-
highlightErrorNodes
public void highlightErrorNodes(java.util.Collection<? extends net.sourceforge.pmd.lang.ast.Node> nodes)
Highlights nodes that are in error (secondary highlight).
-
clearStyleLayers
public void clearStyleLayers()
-
moveCaret
public void moveCaret(int line, int column)Moves the caret to a position and makes the view follow it.
-
wrapNode
public TextAwareNodeWrapper wrapNode(net.sourceforge.pmd.lang.ast.Node node)
-
getLanguageVersion
public net.sourceforge.pmd.lang.LanguageVersion getLanguageVersion()
-
setLanguageVersion
public void setLanguageVersion(net.sourceforge.pmd.lang.LanguageVersion version)
-
languageVersionProperty
public org.reactfx.value.Var<net.sourceforge.pmd.lang.LanguageVersion> languageVersionProperty()
-
getCompilationUnit
public java.util.Optional<net.sourceforge.pmd.lang.ast.Node> getCompilationUnit()
Returns the most up-to-date compilation unit, or empty if it can't be parsed.
-
getText
public java.lang.String getText()
-
setText
public void setText(java.lang.String expression)
-
textProperty
public org.reactfx.value.Val<java.lang.String> textProperty()
-
getAuxclasspathFiles
public java.lang.String getAuxclasspathFiles()
-
setAuxclasspathFiles
public void setAuxclasspathFiles(java.lang.String files)
-
-