Class XPathRuleEditorController
- java.lang.Object
-
- net.sourceforge.pmd.util.fxdesigner.app.AbstractController
-
- net.sourceforge.pmd.util.fxdesigner.XPathRuleEditorController
-
- All Implemented Interfaces:
javafx.fxml.Initializable
,ApplicationComponent
,NodeSelectionSource
,CloseableService
,SettingsOwner
,TitleOwner
public final class XPathRuleEditorController extends AbstractController implements NodeSelectionSource, TitleOwner, CloseableService
Editor for an XPath rule. This object maintains anObservableRuleBuilder
which stores information about the currently edited rule. The properties of that builder are rewired to the export wizard's fields when it's open. The wizard is just one view on the builder's data, which is supposed to offer the most customization options. Other views can be implemented in a similar way, for example, PropertyView implements a view over the properties of the builder.- Since:
- 6.0.0
- Author:
- Clément Fournier
- See Also:
ExportXPathWizardController
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.sourceforge.pmd.util.fxdesigner.app.NodeSelectionSource
NodeSelectionSource.NodeSelectionEvent
-
-
Field Summary
Fields Modifier and Type Field Description TestCollectionController
testCollectionController
-
Fields inherited from interface net.sourceforge.pmd.util.fxdesigner.app.NodeSelectionSource
CARET_POSITION, SELECTION_RECOVERY
-
-
Constructor Summary
Constructors Constructor Description XPathRuleEditorController(DesignerRoot root)
XPathRuleEditorController(DesignerRoot root, ObservableXPathRuleBuilder ruleBuilder)
Creates a controller with an existing rule builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterParentInit()
Executed after the parent's initialization (so afterAbstractController.afterChildrenInit()
).protected void
beforeParentInit()
Executed before the parent's initialization.void
close()
org.reactfx.value.Val<List<net.sourceforge.pmd.lang.ast.Node>>
currentResultsProperty()
List<AbstractController>
getChildren()
ObservableXPathRuleBuilder
getRuleBuilder()
org.reactfx.value.Val<LiveTestCase>
selectedTestCaseProperty()
void
setFocusNode(net.sourceforge.pmd.lang.ast.Node node, DataHolder options)
Updates the UI to react to a change in focus node.void
showExportXPathToRuleWizard()
org.reactfx.value.Val<String>
titleProperty()
Title of the region.org.reactfx.value.Var<String>
xpathExpressionProperty()
org.reactfx.value.Var<javafx.collections.ObservableList<net.sourceforge.pmd.lang.ast.Node>>
xpathResultsProperty()
org.reactfx.value.Var<net.sourceforge.pmd.lang.rule.xpath.XPathVersion>
xpathVersionProperty()
-
Methods inherited from class net.sourceforge.pmd.util.fxdesigner.app.AbstractController
afterChildrenInit, getChildrenSettingsNodes, getDesignerRoot, initialize, shutdown
-
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.app.ApplicationComponent
getDebugName, getDesignerRoot, getLogCategory, getLogger, getMainStage, getService, globalLanguageProperty, isDeveloperMode, languageBindingsProperty, logInternalDebugInfo, logInternalDebugInfo, logInternalException, logUserException, raiseParsableSourceFlag, raiseParsableXPathFlag
-
Methods inherited from interface net.sourceforge.pmd.util.fxdesigner.app.NodeSelectionSource
initNodeSelectionHandling
-
-
-
-
Field Detail
-
testCollectionController
public TestCollectionController testCollectionController
-
-
Constructor Detail
-
XPathRuleEditorController
public XPathRuleEditorController(DesignerRoot root)
-
XPathRuleEditorController
public XPathRuleEditorController(DesignerRoot root, ObservableXPathRuleBuilder ruleBuilder)
Creates a controller with an existing rule builder.
-
-
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 classAbstractController
-
setFocusNode
public void setFocusNode(net.sourceforge.pmd.lang.ast.Node node, DataHolder options)
Description copied from interface:NodeSelectionSource
Updates the UI to react to a change in focus node. This is called whenever some selection source in the tree records a change.- Specified by:
setFocusNode
in interfaceNodeSelectionSource
-
selectedTestCaseProperty
public org.reactfx.value.Val<LiveTestCase> selectedTestCaseProperty()
-
afterParentInit
public void afterParentInit()
Description copied from class:AbstractController
Executed after the parent's initialization (so afterAbstractController.afterChildrenInit()
). This also means, after persistent settings restoration. If this node has no parent, then this is never executed.- Overrides:
afterParentInit
in classAbstractController
-
close
public void close()
- Specified by:
close
in interfaceCloseableService
-
showExportXPathToRuleWizard
public void showExportXPathToRuleWizard()
-
xpathExpressionProperty
public org.reactfx.value.Var<String> xpathExpressionProperty()
-
xpathVersionProperty
public org.reactfx.value.Var<net.sourceforge.pmd.lang.rule.xpath.XPathVersion> xpathVersionProperty()
-
getRuleBuilder
public ObservableXPathRuleBuilder getRuleBuilder()
-
titleProperty
public org.reactfx.value.Val<String> titleProperty()
Description copied from interface:TitleOwner
Title of the region.- Specified by:
titleProperty
in interfaceTitleOwner
-
currentResultsProperty
public org.reactfx.value.Val<List<net.sourceforge.pmd.lang.ast.Node>> currentResultsProperty()
-
xpathResultsProperty
public org.reactfx.value.Var<javafx.collections.ObservableList<net.sourceforge.pmd.lang.ast.Node>> xpathResultsProperty()
-
getChildren
public List<AbstractController> getChildren()
- Overrides:
getChildren
in classAbstractController
-
-