Class XPathPanelController
- java.lang.Object
-
- net.sourceforge.pmd.util.fxdesigner.XPathPanelController
-
- All Implemented Interfaces:
javafx.fxml.Initializable,SettingsOwner
public class XPathPanelController extends java.lang.Object implements javafx.fxml.Initializable, SettingsOwner
XPath panel controller.- Since:
- 6.0.0
- Author:
- Clément Fournier
- See Also:
ExportXPathWizardController
-
-
Constructor Summary
Constructors Constructor Description XPathPanelController(DesignerRoot owner, MainDesignerController mainController)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidevaluateXPath(net.sourceforge.pmd.lang.ast.Node compilationUnit, net.sourceforge.pmd.lang.LanguageVersion version)Evaluate the contents of the XPath expression area on the given compilation unit.java.util.List<SettingsOwner>getChildrenSettingsNodes()Gets the children of this node in order.java.lang.StringgetXpathExpression()java.lang.StringgetXpathVersion()voidinitialiseVersionChoiceBox(javafx.scene.control.ChoiceBox<java.lang.String> choiceBox)voidinitialize(java.net.URL location, java.util.ResourceBundle resources)voidinvalidateResults(boolean error)java.util.List<net.sourceforge.pmd.lang.ast.Node>runXPathQuery(net.sourceforge.pmd.lang.ast.Node compilationUnit, net.sourceforge.pmd.lang.LanguageVersion version, java.lang.String query)voidsetXpathExpression(java.lang.String expression)voidsetXpathVersion(java.lang.String xpathVersion)voidshowExportXPathToRuleWizard()org.reactfx.value.Val<java.lang.String>xpathExpressionProperty()org.reactfx.value.Var<java.lang.String>xpathVersionProperty()
-
-
-
Constructor Detail
-
XPathPanelController
public XPathPanelController(DesignerRoot owner, MainDesignerController mainController)
-
-
Method Detail
-
initialize
public void initialize(java.net.URL location, java.util.ResourceBundle resources)- Specified by:
initializein interfacejavafx.fxml.Initializable
-
initialiseVersionChoiceBox
public void initialiseVersionChoiceBox(javafx.scene.control.ChoiceBox<java.lang.String> choiceBox)
-
evaluateXPath
public void evaluateXPath(net.sourceforge.pmd.lang.ast.Node compilationUnit, net.sourceforge.pmd.lang.LanguageVersion version)Evaluate the contents of the XPath expression area on the given compilation unit. This updates the xpath result panel, and can log XPath exceptions to the event log panel.- Parameters:
compilationUnit- The AST rootversion- The language version
-
runXPathQuery
public java.util.List<net.sourceforge.pmd.lang.ast.Node> runXPathQuery(net.sourceforge.pmd.lang.ast.Node compilationUnit, net.sourceforge.pmd.lang.LanguageVersion version, java.lang.String query) throws XPathEvaluationException- Throws:
XPathEvaluationException
-
invalidateResults
public void invalidateResults(boolean error)
-
showExportXPathToRuleWizard
public void showExportXPathToRuleWizard() throws java.io.IOException- Throws:
java.io.IOException
-
getXpathExpression
public java.lang.String getXpathExpression()
-
setXpathExpression
public void setXpathExpression(java.lang.String expression)
-
xpathExpressionProperty
public org.reactfx.value.Val<java.lang.String> xpathExpressionProperty()
-
getXpathVersion
public java.lang.String getXpathVersion()
-
setXpathVersion
public void setXpathVersion(java.lang.String xpathVersion)
-
xpathVersionProperty
public org.reactfx.value.Var<java.lang.String> xpathVersionProperty()
-
getChildrenSettingsNodes
public java.util.List<SettingsOwner> getChildrenSettingsNodes()
Description copied from interface:SettingsOwnerGets the children of this node in order.- Specified by:
getChildrenSettingsNodesin interfaceSettingsOwner
-
-