Class 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
    • Method Detail

      • beforeParentInit

        protected void beforeParentInit()
        Description copied from class: AbstractController
        Executed before the parent's initialization. Always executed once at the start of the initialization of this controller.
        Overrides:
        beforeParentInit in class AbstractController
      • 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.
      • 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)