Class SourceEditorController
- java.lang.Object
-
- net.sourceforge.pmd.util.fxdesigner.SourceEditorController
-
- All Implemented Interfaces:
javafx.fxml.Initializable,SettingsOwner
public class SourceEditorController extends java.lang.Object implements javafx.fxml.Initializable, SettingsOwner
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 voidclearErrorNodes()Clears the name occurences.voidclearNameOccurences()Clears the name occurences.voidclearStyleLayers()voidclearXPathHighlight()Clears the highlighting of XPath results.voidfocusNodeInTreeView(net.sourceforge.pmd.lang.ast.Node node)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).voidinitialize(java.net.URL location, java.util.ResourceBundle resources)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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.util.fxdesigner.util.beans.SettingsOwner
getChildrenSettingsNodes
-
-
-
-
Constructor Detail
-
SourceEditorController
public SourceEditorController(DesignerRoot owner, MainDesignerController mainController)
-
-
Method Detail
-
initialize
public void initialize(java.net.URL location, java.util.ResourceBundle resources)- Specified by:
initializein interfacejavafx.fxml.Initializable
-
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()
-
focusNodeInTreeView
public void focusNodeInTreeView(net.sourceforge.pmd.lang.ast.Node node)
-
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)
-
-