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 void
clearErrorNodes()
Clears the name occurences.void
clearNameOccurences()
Clears the name occurences.void
clearStyleLayers()
void
clearXPathHighlight()
Clears the highlighting of XPath results.void
focusNodeInTreeView(net.sourceforge.pmd.lang.ast.Node node)
java.lang.String
getAuxclasspathFiles()
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.LanguageVersion
getLanguageVersion()
java.lang.String
getText()
void
highlightErrorNodes(java.util.Collection<? extends net.sourceforge.pmd.lang.ast.Node> nodes)
Highlights nodes that are in error (secondary highlight).void
highlightNameOccurrences(java.util.Collection<? extends net.sourceforge.pmd.lang.symboltable.NameOccurrence> occs)
Highlights name occurrences (secondary highlight).void
highlightXPathResults(java.util.Collection<? extends net.sourceforge.pmd.lang.ast.Node> nodes)
Highlights xpath results (xpath highlight).void
initialize(java.net.URL location, java.util.ResourceBundle resources)
org.reactfx.value.Var<net.sourceforge.pmd.lang.LanguageVersion>
languageVersionProperty()
void
moveCaret(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.void
setAuxclasspathFiles(java.lang.String files)
void
setFocusNode(net.sourceforge.pmd.lang.ast.Node node)
Highlights the given node (or nothing if null).void
setLanguageVersion(net.sourceforge.pmd.lang.LanguageVersion version)
void
setText(java.lang.String expression)
void
showAuxclasspathSetupPopup(DesignerRoot root)
org.reactfx.value.Val<java.lang.String>
textProperty()
TextAwareNodeWrapper
wrapNode(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:
initialize
in 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)
-
-