C# Class Rubberduck.Parsing.VBA.RubberduckParserState

Show file Open project: retailcoder/Rubberduck Class Usage Examples

Public Methods

Method Description
AddDeclaration ( Rubberduck.Parsing.Symbols.Declaration declaration ) : void

Adds the specified Declaration to the collection (replaces existing).

AddParseTree ( VBComponent component, IParseTree parseTree ) : void
AddProject ( VBProject project ) : void
AddTokenStream ( VBComponent component, ITokenStream stream ) : void
ClearBuiltInReferences ( ) : void
ClearDeclarations ( VBComponent component ) : bool
ClearDeclarations ( VBProject project ) : void
FindSelectedDeclaration ( CodePane activeCodePane ) : Rubberduck.Parsing.Symbols.Declaration
GetModuleAnnotations ( VBComponent component ) : IEnumerable
GetModuleComments ( VBComponent component ) : IEnumerable
GetModuleState ( VBComponent component ) : ParserState
GetParseTree ( VBComponent component ) : IParseTree
GetRewriter ( VBComponent component ) : TokenStreamRewriter
HasAllParseTrees ( IReadOnlyList expected ) : bool
IsModified ( QualifiedModuleName key ) : bool
IsModified ( VBComponent component ) : bool
OnParseRequested ( object requestor, VBComponent component = null ) : void

Ensures parser state accounts for built-in declarations.

Requests reparse for specified component. Omit parameter to request a full reparse.

OnStatusMessageUpdate ( string message ) : void
RemoveBuiltInDeclarations ( System.Reference reference ) : void
RemoveDeclaration ( Rubberduck.Parsing.Symbols.Declaration declaration ) : bool

Removes the specified declaration from the collection.

RemoveProject ( VBProject project ) : void
RemoveProject ( string projectId ) : void
SetModuleAnnotations ( VBComponent component, IEnumerable annotations ) : void
SetModuleComments ( VBComponent component, IEnumerable comments ) : void
SetModuleState ( ParserState state ) : void
SetModuleState ( VBComponent component, ParserState state, Rubberduck.Parsing.Symbols.SyntaxErrorException parserError = null ) : void

Private Methods

Method Description
EvaluateParserState ( ) : ParserState
GetModuleAttributes ( VBComponent vbComponent ) : IDictionary,Attributes>
IsSelectedDeclaration ( QualifiedSelection selection, Rubberduck.Parsing.Symbols.Declaration declaration ) : bool
IsSelectedReference ( QualifiedSelection selection, IdentifierReference reference ) : bool
OnModuleStateChanged ( VBComponent component, ParserState state ) : void
OnStateChanged ( ParserState state = ParserState.Pending ) : void
SetModuleAttributes ( VBComponent component, DeclarationType>.IDictionary attributes ) : void

Method Details

AddDeclaration() public method

Adds the specified Declaration to the collection (replaces existing).
public AddDeclaration ( Rubberduck.Parsing.Symbols.Declaration declaration ) : void
declaration Rubberduck.Parsing.Symbols.Declaration
return void

AddParseTree() public method

public AddParseTree ( VBComponent component, IParseTree parseTree ) : void
component VBComponent
parseTree IParseTree
return void

AddProject() public method

public AddProject ( VBProject project ) : void
project VBProject
return void

AddTokenStream() public method

public AddTokenStream ( VBComponent component, ITokenStream stream ) : void
component VBComponent
stream ITokenStream
return void

ClearBuiltInReferences() public method

public ClearBuiltInReferences ( ) : void
return void

ClearDeclarations() public method

public ClearDeclarations ( VBComponent component ) : bool
component VBComponent
return bool

ClearDeclarations() public method

public ClearDeclarations ( VBProject project ) : void
project VBProject
return void

FindSelectedDeclaration() public method

public FindSelectedDeclaration ( CodePane activeCodePane ) : Rubberduck.Parsing.Symbols.Declaration
activeCodePane CodePane
return Rubberduck.Parsing.Symbols.Declaration

GetModuleAnnotations() public method

public GetModuleAnnotations ( VBComponent component ) : IEnumerable
component VBComponent
return IEnumerable

GetModuleComments() public method

public GetModuleComments ( VBComponent component ) : IEnumerable
component VBComponent
return IEnumerable

GetModuleState() public method

public GetModuleState ( VBComponent component ) : ParserState
component VBComponent
return System.ParserState

GetParseTree() public method

public GetParseTree ( VBComponent component ) : IParseTree
component VBComponent
return IParseTree

GetRewriter() public method

public GetRewriter ( VBComponent component ) : TokenStreamRewriter
component VBComponent
return TokenStreamRewriter

HasAllParseTrees() public method

public HasAllParseTrees ( IReadOnlyList expected ) : bool
expected IReadOnlyList
return bool

IsModified() public method

public IsModified ( QualifiedModuleName key ) : bool
key Rubberduck.VBEditor.QualifiedModuleName
return bool

IsModified() public method

public IsModified ( VBComponent component ) : bool
component VBComponent
return bool

OnParseRequested() public method

Ensures parser state accounts for built-in declarations. Requests reparse for specified component. Omit parameter to request a full reparse.
public OnParseRequested ( object requestor, VBComponent component = null ) : void
requestor object The object requesting a reparse.
component VBComponent The component to reparse.
return void

OnStatusMessageUpdate() public method

public OnStatusMessageUpdate ( string message ) : void
message string
return void

RemoveBuiltInDeclarations() public method

public RemoveBuiltInDeclarations ( System.Reference reference ) : void
reference System.Reference
return void

RemoveDeclaration() public method

Removes the specified declaration from the collection.
public RemoveDeclaration ( Rubberduck.Parsing.Symbols.Declaration declaration ) : bool
declaration Rubberduck.Parsing.Symbols.Declaration
return bool

RemoveProject() public method

public RemoveProject ( VBProject project ) : void
project VBProject
return void

RemoveProject() public method

public RemoveProject ( string projectId ) : void
projectId string
return void

SetModuleAnnotations() public method

public SetModuleAnnotations ( VBComponent component, IEnumerable annotations ) : void
component VBComponent
annotations IEnumerable
return void

SetModuleComments() public method

public SetModuleComments ( VBComponent component, IEnumerable comments ) : void
component VBComponent
comments IEnumerable
return void

SetModuleState() public method

public SetModuleState ( ParserState state ) : void
state System.ParserState
return void

SetModuleState() public method

public SetModuleState ( VBComponent component, ParserState state, Rubberduck.Parsing.Symbols.SyntaxErrorException parserError = null ) : void
component VBComponent
state System.ParserState
parserError Rubberduck.Parsing.Symbols.SyntaxErrorException
return void