pub struct Project { /* private fields */ }
Implementations§
source§impl Project
impl Project
pub fn new(vhdl_standard: VHDLStandard) -> Project
pub fn enable_unused_declaration_detection(&mut self)
sourcepub fn from_config(config: Config, messages: &mut dyn MessageHandler) -> Project
pub fn from_config(config: Config, messages: &mut dyn MessageHandler) -> Project
Create instance from given configuration. Files referred by configuration are parsed into corresponding libraries.
sourcepub fn update_config(
&mut self,
config: Config,
messages: &mut dyn MessageHandler
)
pub fn update_config( &mut self, config: Config, messages: &mut dyn MessageHandler )
Replace active project configuration. The design state is reset, new files are added and parsed. Existing source files will be kept and parsed from in-memory source (required for incremental document updates).
pub fn library_mapping_of(&self, source: &Source) -> Vec<Symbol>
pub fn get_source(&self, file_name: &Path) -> Option<Source>
pub fn update_source(&mut self, source: &Source)
pub fn analyse(&mut self) -> Vec<Diagnostic>
sourcepub fn find_definition(
&self,
source: &Source,
cursor: Position
) -> Option<EntRef<'_>>
pub fn find_definition( &self, source: &Source, cursor: Position ) -> Option<EntRef<'_>>
Search for reference at position
Character offset on a line in a document (zero-based). Assuming that the line is
represented as a string, the character
value represents the gap between the
character
and character + 1
.
If the character value is greater than the line length it defaults back to the line length.
pub fn find_declaration( &self, source: &Source, cursor: Position ) -> Option<EntRef<'_>>
pub fn item_at_cursor( &self, source: &Source, cursor: Position ) -> Option<(SrcPos, EntRef<'_>)>
pub fn search(&self, searcher: &mut impl Searcher)
pub fn public_symbols<'a>(&'a self) -> Box<dyn Iterator<Item = EntRef<'a>> + 'a>
pub fn document_symbols<'a>( &'a self, library_name: &Symbol, source: &Source ) -> Vec<(EntHierarchy<'a>, &Vec<Token>)>
pub fn find_implementation( &self, source: &Source, cursor: Position ) -> Vec<EntRef<'_>>
sourcepub fn format_declaration(&self, ent: &AnyEnt<'_>) -> Option<String>
pub fn format_declaration(&self, ent: &AnyEnt<'_>) -> Option<String>
Search for the declaration at decl_pos and format it
pub fn format_entity(&self, id: EntityId) -> Option<String>
sourcepub fn find_all_references(&self, ent: &AnyEnt<'_>) -> Vec<SrcPos>
pub fn find_all_references(&self, ent: &AnyEnt<'_>) -> Vec<SrcPos>
Search for all references to the declaration at decl_pos
sourcepub fn find_all_unresolved(&self) -> (usize, Vec<SrcPos>)
pub fn find_all_unresolved(&self) -> (usize, Vec<SrcPos>)
Get source positions that are not resolved to a declaration This is used for development to test where the language server is blind
pub fn files(&self) -> impl Iterator<Item = &SourceFile>
pub fn list_completion_options( &self, source: &Source, cursor: Position ) -> Vec<CompletionItem<'_>>
Auto Trait Implementations§
impl !Freeze for Project
impl !RefUnwindSafe for Project
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl !UnwindSafe for Project
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more