Class ToolkitViewImpl

    • Constructor Detail

    • Method Detail

      • run

        public void run()
        Description copied from interface: ToolkitView
        Launch the application.
        Specified by:
        run in interface ToolkitView
      • pickFileToParse

        public File pickFileToParse()
        Description copied from interface: ToolkitView
        Prompt the user for a file to parse and return it.
        Specified by:
        pickFileToParse in interface ToolkitView
        Returns:
        The file to parse, or null if no file was picked
      • displayHighlightedSourceCode

        public void displayHighlightedSourceCode​(String htmlHighlightedSourceCode)
        Description copied from interface: ToolkitView
        Display the given HTML highlighted source code in the source code editor. Scrollbars state is undefined after a call to this method.
        Specified by:
        displayHighlightedSourceCode in interface ToolkitView
        Parameters:
        htmlHighlightedSourceCode - The HTML highlighted source code
      • displayAst

        public void displayAst​(@Nullable
                               AstNode astNode)
        Description copied from interface: ToolkitView
        Display the abstract syntax tree view starting from a given node.
        Specified by:
        displayAst in interface ToolkitView
        Parameters:
        astNode - The root AST node or null if no abstract syntax tree must be shown
      • displayXml

        public void displayXml​(String xml)
        Description copied from interface: ToolkitView
        Display the given string in the XML view.
        Specified by:
        displayXml in interface ToolkitView
        Parameters:
        xml - The string to display
      • scrollSourceCodeTo

        public void scrollSourceCodeTo​(Point point)
        Description copied from interface: ToolkitView
        Scroll the source code editor in order to make the given point visible.
        Specified by:
        scrollSourceCodeTo in interface ToolkitView
        Parameters:
        point - to make visible
      • getSourceCode

        public String getSourceCode()
        Description copied from interface: ToolkitView
        Get the source code currently entered in the source code editor.
        Specified by:
        getSourceCode in interface ToolkitView
        Returns:
        The source code
      • getXPath

        public String getXPath()
        Description copied from interface: ToolkitView
        Get the text currently entered in the XPath field.
        Specified by:
        getXPath in interface ToolkitView
        Returns:
        The XPath field text
      • selectAstNode

        public void selectAstNode​(AstNode astNode)
        Description copied from interface: ToolkitView
        Select the given AST node in the abstract syntax tree view.
        Specified by:
        selectAstNode in interface ToolkitView
        Parameters:
        astNode - The AST node to select, null will lead to a no operation
      • highlightSourceCode

        public void highlightSourceCode​(AstNode astNode)
        Description copied from interface: ToolkitView
        Highlight the given AST node in the source code editor.
        Specified by:
        highlightSourceCode in interface ToolkitView
        Parameters:
        astNode - The AST node to highlight
      • clearAstSelections

        public void clearAstSelections()
        Description copied from interface: ToolkitView
        Clear all the selections in the abstract syntax tree view.
        Specified by:
        clearAstSelections in interface ToolkitView
      • scrollAstTo

        public void scrollAstTo​(@Nullable
                                AstNode astNode)
        Description copied from interface: ToolkitView
        Scroll the abstract syntax tree view in order to make the given AST node visible.
        Specified by:
        scrollAstTo in interface ToolkitView
        Parameters:
        astNode - The AST node to make visible, null will lead to a no operation
      • clearSourceCodeHighlights

        public void clearSourceCodeHighlights()
        Description copied from interface: ToolkitView
        Clear all the highlights in the source code editor.
        Specified by:
        clearSourceCodeHighlights in interface ToolkitView
      • scrollSourceCodeTo

        public void scrollSourceCodeTo​(@Nullable
                                       AstNode astNode)
        Description copied from interface: ToolkitView
        Scroll the source code editor in order to make the given AST node visible.
        Specified by:
        scrollSourceCodeTo in interface ToolkitView
        Parameters:
        astNode - The AST node to make visible, null will lead to a no operation
      • getSelectedAstNodes

        public List<AstNode> getSelectedAstNodes()
        Description copied from interface: ToolkitView
        Get the list of nodes currently selected in the abstract syntax tree view.
        Specified by:
        getSelectedAstNodes in interface ToolkitView
        Returns:
        The list of selected AST nodes
      • appendToConsole

        public void appendToConsole​(String message)
        Description copied from interface: ToolkitView
        Append the given message to the console view.
        Specified by:
        appendToConsole in interface ToolkitView
        Parameters:
        message - The message to append
      • getConfigurationPropertyValue

        public String getConfigurationPropertyValue​(String name)
        Description copied from interface: ToolkitView
        Get the value currently entered in the configuration property field identified by the given name.
        Specified by:
        getConfigurationPropertyValue in interface ToolkitView
        Parameters:
        name - The name of the configuration property
        Returns:
        The current value of the field
      • setConfigurationPropertyValue

        public void setConfigurationPropertyValue​(String name,
                                                  String value)
        Description copied from interface: ToolkitView
        Set the current value of the configuration property field identified by the given name.
        Specified by:
        setConfigurationPropertyValue in interface ToolkitView
        Parameters:
        name - The name of the configuration property
        value - The value to be set
      • setConfigurationPropertyErrorMessage

        public void setConfigurationPropertyErrorMessage​(String name,
                                                         String errorMessage)
        Description copied from interface: ToolkitView
        Set the error message of the configuration property identified by the given name.
        Specified by:
        setConfigurationPropertyErrorMessage in interface ToolkitView
        Parameters:
        name - The name of the configuration property
        errorMessage - The error message