Uses of Class
org.fife.rsta.ac.js.ast.CodeBlock
Packages that use CodeBlock
Package
Description
JavaScript code completion classes.
-
Uses of CodeBlock in org.fife.rsta.ac.js
Methods in org.fife.rsta.ac.js that return CodeBlockModifier and TypeMethodDescriptionprotected CodeBlockSourceCompletionProvider.iterateAstRoot(org.mozilla.javascript.ast.AstRoot root, Set<org.fife.ui.autocomplete.Completion> set, String entered, int dot, TypeDeclarationOptions options) Iterates through AstRoot to extract all code blocks, functions, variables etc...Methods in org.fife.rsta.ac.js with parameters of type CodeBlockModifier and TypeMethodDescriptionvoidSourceCompletionProvider.debugCodeBlock(CodeBlock block, int tab) protected voidSourceCompletionProvider.recursivelyAddLocalVars(Set<org.fife.ui.autocomplete.Completion> completions, CodeBlock block, int dot, String text, boolean findMatch, boolean isPreprocessing) Iterate though the CodeBlock and extract all variables within scope -
Uses of CodeBlock in org.fife.rsta.ac.js.ast
Fields in org.fife.rsta.ac.js.ast declared as CodeBlockModifier and TypeFieldDescriptionprivate CodeBlockJavaScriptDeclaration.blockprivate CodeBlockCodeBlock.parentFields in org.fife.rsta.ac.js.ast with type parameters of type CodeBlockMethods in org.fife.rsta.ac.js.ast that return CodeBlockModifier and TypeMethodDescriptionCodeBlock.addChildCodeBlock(int start) Creates and returns a child (nested) code block.CodeBlock.getChildCodeBlock(int index) Returns a child code block.JavaScriptDeclaration.getCodeBlock()CodeBlock.getParent()Returns the parent code block.Methods in org.fife.rsta.ac.js.ast with parameters of type CodeBlockModifier and TypeMethodDescriptionprivate voidCodeBlock.outputChild(StringBuilder sb, CodeBlock block, int tab) Constructors in org.fife.rsta.ac.js.ast with parameters of type CodeBlockModifierConstructorDescriptionJavaScriptDeclaration(String name, int offset, CodeBlock block) JavaScriptFunctionDeclaration(String name, int offset, CodeBlock block, TypeDeclaration typeDec) JavaScriptFunctionTypeDeclaration(String name, int offset, SourceCompletionProvider provider, CodeBlock block) JavaScriptVariableDeclaration(String name, int offset, SourceCompletionProvider provider, CodeBlock block) -
Uses of CodeBlock in org.fife.rsta.ac.js.ast.parser
Methods in org.fife.rsta.ac.js.ast.parser that return CodeBlockModifier and TypeMethodDescriptionJavaScriptAstParser.convertAstNodeToCodeBlock(org.mozilla.javascript.ast.AstRoot root, Set<org.fife.ui.autocomplete.Completion> set, String entered) abstract CodeBlockJavaScriptParser.convertAstNodeToCodeBlock(org.mozilla.javascript.ast.AstRoot root, Set<org.fife.ui.autocomplete.Completion> set, String entered) Converts AstRoot to CodeBlockRhinoJavaScriptAstParser.convertAstNodeToCodeBlock(org.mozilla.javascript.ast.AstRoot root, Set<org.fife.ui.autocomplete.Completion> set, String entered) Methods in org.fife.rsta.ac.js.ast.parser with parameters of type CodeBlockModifier and TypeMethodDescriptionprivate voidJavaScriptAstParser.addCodeBlock(org.mozilla.javascript.Node parent, Set<org.fife.ui.autocomplete.Completion> set, String entered, CodeBlock codeBlock, int offset) for each child of parent AstNode add a new code block and add completions for each block of codeprivate voidJavaScriptAstParser.addVariableToResolver(org.mozilla.javascript.ast.AstNode name, org.mozilla.javascript.ast.AstNode target, CodeBlock block, int offset) private booleanJavaScriptAstParser.canAddVariable(CodeBlock block) private JavaScriptFunctionDeclarationJavaScriptAstParser.createJavaScriptFunction(String lookupName, int offset, CodeBlock block, TypeDeclaration returnType, org.mozilla.javascript.ast.FunctionNode fn) private voidJavaScriptAstParser.extractVariableForForEach(org.mozilla.javascript.ast.VariableInitializer initializer, CodeBlock block, int offset, org.mozilla.javascript.ast.AstNode iteratedObject) Extract variable for each in loop.private voidJavaScriptAstParser.extractVariableForForIn(org.mozilla.javascript.ast.VariableInitializer initializer, CodeBlock block, int offset, org.mozilla.javascript.ast.AstNode iteratedObject) Extract variable for in loop.private JavaScriptVariableDeclarationJavaScriptAstParser.extractVariableFromNode(org.mozilla.javascript.ast.AstNode node, CodeBlock block, int offset) Extract the variable from the Rhino node and add to the CodeBlockprivate JavaScriptVariableDeclarationJavaScriptAstParser.extractVariableFromNode(org.mozilla.javascript.ast.AstNode node, CodeBlock block, int offset, org.mozilla.javascript.ast.AstNode initializer) Extract the variable from the Rhino node and add to the CodeBlockprivate voidJavaScriptAstParser.extractVariableFromNode(org.mozilla.javascript.ast.VariableInitializer initializer, CodeBlock block, int offset) Extract the variable from the Variable initializer and set the Typeprotected voidJavaScriptAstParser.iterateNode(org.mozilla.javascript.ast.AstNode child, Set<org.fife.ui.autocomplete.Completion> set, String entered, CodeBlock block, int offset) protected voidRhinoJavaScriptAstParser.iterateNode(org.mozilla.javascript.ast.AstNode child, Set<org.fife.ui.autocomplete.Completion> set, String entered, CodeBlock block, int offset) Overridden iterateNode to intercept Token.EXPR_RESULT and check for importPackage and importClass named nodes If found, then process them and extract the imports and add them to RhinoJavaScriptTypesFactory then return otherwise call super.iterateNode()private voidJavaScriptAstParser.processCaseNode(org.mozilla.javascript.Node child, CodeBlock block, Set<org.fife.ui.autocomplete.Completion> set, String entered, int offset) private voidJavaScriptAstParser.processDoNode(org.mozilla.javascript.Node child, CodeBlock block, Set<org.fife.ui.autocomplete.Completion> set, String entered, int offset) Extract while loop from node and add new code blockprivate voidJavaScriptAstParser.processExpressionNode(org.mozilla.javascript.Node child, CodeBlock block, Set<org.fife.ui.autocomplete.Completion> set, String entered, int offset) Extract completions from expression nodeprivate voidJavaScriptAstParser.processExpressionStatement(org.mozilla.javascript.Node child, CodeBlock block, Set<org.fife.ui.autocomplete.Completion> set, String entered, int offset) private voidJavaScriptAstParser.processForNode(org.mozilla.javascript.Node child, CodeBlock block, Set<org.fife.ui.autocomplete.Completion> set, String entered, int offset) Extract code fromToken.FORand add completions, then parse body of for-loop.private voidJavaScriptAstParser.processFunctionNode(org.mozilla.javascript.Node child, CodeBlock block, Set<org.fife.ui.autocomplete.Completion> set, String entered, int offset) Add function to completions set and extract local variables to add to code block TODO: functions can have local scope, so add function to it's own codeblock when applicableprivate voidJavaScriptAstParser.processIfThenElse(org.mozilla.javascript.Node child, CodeBlock block, Set<org.fife.ui.autocomplete.Completion> set, String entered, int offset) Extract variables from if/else node(s)private booleanRhinoJavaScriptAstParser.processImportNode(org.mozilla.javascript.ast.AstNode child, Set<org.fife.ui.autocomplete.Completion> set, String entered, CodeBlock block, int offset) Look for text importPackage and importClass and add to cacheprivate voidJavaScriptAstParser.processInfix(org.mozilla.javascript.Node child, CodeBlock block, Set<org.fife.ui.autocomplete.Completion> set, String entered, int offset) Extract variable from binary operator e.g.private voidJavaScriptAstParser.processSwitchNode(org.mozilla.javascript.Node child, CodeBlock block, Set<org.fife.ui.autocomplete.Completion> set, String entered, int offset) Extract local variables from switch node*private voidJavaScriptAstParser.processTryCatchNode(org.mozilla.javascript.Node child, CodeBlock block, Set<org.fife.ui.autocomplete.Completion> set, String entered, int offset) Extract variables from try/catch node(s)private voidJavaScriptAstParser.processVariableNode(org.mozilla.javascript.Node child, CodeBlock block, Set<org.fife.ui.autocomplete.Completion> set, String entered, int offset) Extract variable from node and add to code blockprivate voidJavaScriptAstParser.processWhileNode(org.mozilla.javascript.Node child, CodeBlock block, Set<org.fife.ui.autocomplete.Completion> set, String entered, int offset) Extract while loop from node and add new code blockprivate voidJavaScriptAstParser.reassignVariable(org.mozilla.javascript.ast.AstNode assign, CodeBlock block, int locationOffSet)