Class MainDesignerController
- java.lang.Object
-
- net.sourceforge.pmd.util.fxdesigner.app.AbstractController<AbstractController<?>>
-
- net.sourceforge.pmd.util.fxdesigner.MainDesignerController
-
- All Implemented Interfaces:
javafx.fxml.Initializable
,ApplicationComponent
,SettingsOwner
public class MainDesignerController extends AbstractController<AbstractController<?>>
Main controller of the app. Mediator for subdivisions of the UI.- Since:
- 6.0.0
- Author:
- Clément Fournier
- See Also:
NodeInfoPanelController
,SourceEditorController
,EventLogController
,XPathPanelController
-
-
Field Summary
Fields Modifier and Type Field Description javafx.scene.control.MenuItem
openEventLogMenuItem
-
Fields inherited from class net.sourceforge.pmd.util.fxdesigner.app.AbstractController
parent
-
-
Constructor Summary
Constructors Constructor Description MainDesignerController(DesignerRoot owner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterChildrenInit()
Runs once after every child has finished their initialization.protected void
beforeParentInit()
Executed before the parent's initialization.int
getBottomTabIndex()
java.util.List<AbstractController<MainDesignerController>>
getChildren()
java.lang.String
getDebugName()
A debug name for this component, used in developer mode to e.g.net.sourceforge.pmd.lang.LanguageVersion
getLanguageVersion()
java.lang.String
getRecentFiles()
void
invalidateAst()
Called when the AST is updated to update all parts of the UI.boolean
isMaximized()
org.reactfx.value.Val<net.sourceforge.pmd.lang.LanguageVersion>
languageVersionProperty()
void
refreshAST()
Attempts to refresh the AST with the up-to-date source, also updating XPath results.void
refreshXPathResults()
Refreshes the XPath results if the compilation unit is valid.java.util.List<net.sourceforge.pmd.lang.ast.Node>
runXPathQuery(java.lang.String query)
Runs an XPath (2.0) query on the current AST.void
setBottomTabIndex(int i)
void
setLanguageVersion(net.sourceforge.pmd.lang.LanguageVersion version)
void
setMaximized(boolean b)
void
setRecentFiles(java.lang.String files)
void
shutdown()
TextAwareNodeWrapper
wrapNode(net.sourceforge.pmd.lang.ast.Node node)
Returns a wrapper around the given node that gives access to its textual representation in the editor area.-
Methods inherited from class net.sourceforge.pmd.util.fxdesigner.app.AbstractController
afterParentInit, getChildrenSettingsNodes, getDesignerRoot, initialize
-
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
getLogger, getMainStage, isDeveloperMode, logInternalDebugInfo, logInternalException, logMessageTrace, logUserException, raiseParsableSourceFlag, raiseParsableXPathFlag
-
-
-
-
Constructor Detail
-
MainDesignerController
public MainDesignerController(DesignerRoot owner)
-
-
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<AbstractController<?>>
-
afterChildrenInit
protected void afterChildrenInit()
Description copied from class:AbstractController
Runs once after every child has finished their initialization. This will be run in all cases. It's only useful if the children do something useful in theirAbstractController.afterParentInit()
.- Overrides:
afterChildrenInit
in classAbstractController<AbstractController<?>>
-
shutdown
public void shutdown()
-
refreshAST
public void refreshAST()
Attempts to refresh the AST with the up-to-date source, also updating XPath results.
-
refreshXPathResults
public void refreshXPathResults()
Refreshes the XPath results if the compilation unit is valid. Otherwise does nothing.
-
wrapNode
public TextAwareNodeWrapper wrapNode(net.sourceforge.pmd.lang.ast.Node node)
Returns a wrapper around the given node that gives access to its textual representation in the editor area.
-
runXPathQuery
public java.util.List<net.sourceforge.pmd.lang.ast.Node> runXPathQuery(java.lang.String query) throws XPathEvaluationException
Runs an XPath (2.0) query on the current AST. Performs no side effects.- Parameters:
query
- the query- Returns:
- the matched nodes
- Throws:
XPathEvaluationException
- if the query fails
-
invalidateAst
public void invalidateAst()
Called when the AST is updated to update all parts of the UI.
-
getLanguageVersion
public net.sourceforge.pmd.lang.LanguageVersion getLanguageVersion()
-
setLanguageVersion
public void setLanguageVersion(net.sourceforge.pmd.lang.LanguageVersion version)
-
languageVersionProperty
public org.reactfx.value.Val<net.sourceforge.pmd.lang.LanguageVersion> languageVersionProperty()
-
getRecentFiles
public java.lang.String getRecentFiles()
-
setRecentFiles
public void setRecentFiles(java.lang.String files)
-
isMaximized
public boolean isMaximized()
-
setMaximized
public void setMaximized(boolean b)
-
getBottomTabIndex
public int getBottomTabIndex()
-
setBottomTabIndex
public void setBottomTabIndex(int i)
-
getChildren
public java.util.List<AbstractController<MainDesignerController>> getChildren()
- Overrides:
getChildren
in classAbstractController<AbstractController<?>>
-
getDebugName
public java.lang.String getDebugName()
Description copied from interface:ApplicationComponent
A debug name for this component, used in developer mode to e.g. trace events handling paths.
-
-