Package ca.cgjennings.ui.textedit
Class JavaScriptNavigator
- java.lang.Object
-
- ca.cgjennings.apps.arkham.plugins.engine.AbstractUtilityParser
-
- ca.cgjennings.apps.arkham.plugins.engine.SyntaxChecker
-
- ca.cgjennings.ui.textedit.JavaScriptNavigator
-
- All Implemented Interfaces:
Navigator
public class JavaScriptNavigator extends SyntaxChecker implements Navigator
ANavigatorfor JavaScript source files.- Author:
- Chris Jennings
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ca.cgjennings.apps.arkham.plugins.engine.SyntaxChecker
SyntaxChecker.SyntaxError
-
-
Field Summary
-
Fields inherited from interface ca.cgjennings.ui.textedit.Navigator
ASYNC_RETRY
-
-
Constructor Summary
Constructors Constructor Description JavaScriptNavigator()Create a new script navigator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<NavigationPoint>getNavigationPoints(java.lang.String text)Parses the specified source text and returns a list of navigation points.protected voidprocessTree(org.mozilla.javascript.ast.AstRoot node)This is called after each script is parsed to allow the utility access to the resulting abstract syntax tree.-
Methods inherited from class ca.cgjennings.apps.arkham.plugins.engine.SyntaxChecker
acceptError, getErrors, parse
-
Methods inherited from class ca.cgjennings.apps.arkham.plugins.engine.AbstractUtilityParser
setErrorReporter
-
-
-
-
Method Detail
-
getNavigationPoints
public java.util.List<NavigationPoint> getNavigationPoints(java.lang.String text)
Description copied from interface:NavigatorParses the specified source text and returns a list of navigation points.- Specified by:
getNavigationPointsin interfaceNavigator- Parameters:
text- the source text to determine navigation points for- Returns:
- a (possibly empty) list of the extracted points
-
processTree
protected void processTree(org.mozilla.javascript.ast.AstRoot node)
Description copied from class:AbstractUtilityParserThis is called after each script is parsed to allow the utility access to the resulting abstract syntax tree. In the event of a serious parser error that prevents the tree from being generated, the root node will benull.- Overrides:
processTreein classSyntaxChecker- Parameters:
node- the root of the parse tree
-
-