pub struct JavaAdapter;Implementations§
Source§impl JavaAdapter
impl JavaAdapter
Trait Implementations§
Source§impl Clone for JavaAdapter
impl Clone for JavaAdapter
Source§fn clone(&self) -> JavaAdapter
fn clone(&self) -> JavaAdapter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for JavaAdapter
Source§impl Debug for JavaAdapter
impl Debug for JavaAdapter
Source§impl Default for JavaAdapter
impl Default for JavaAdapter
Source§fn default() -> JavaAdapter
fn default() -> JavaAdapter
Returns the “default value” for a type. Read more
Source§impl LanguageAdapter for JavaAdapter
impl LanguageAdapter for JavaAdapter
Source§fn language_id(&self) -> LanguageId
fn language_id(&self) -> LanguageId
Short machine identifier (e.g.
"rust", "python"). Must match the
key used by tree-sitter-language-pack where possible.Source§fn display_name(&self) -> &'static str
fn display_name(&self) -> &'static str
Human-readable display name.
Source§fn file_extensions(&self) -> &'static [&'static str]
fn file_extensions(&self) -> &'static [&'static str]
File extensions this adapter claims (lowercase, no leading dot).
Source§fn tree_sitter_language(&self) -> Result<Language, AdapterError>
fn tree_sitter_language(&self) -> Result<Language, AdapterError>
The Tree-sitter
Language used for parsing. Most adapters fetch
this from tree_sitter_language_pack::get_language.Source§fn parse_recovery_edits(
&self,
snapshot: &FileSnapshot,
_vfs: &Vfs,
tree: &SyntaxTree,
) -> Vec<ParseRecoveryEdit>
fn parse_recovery_edits( &self, snapshot: &FileSnapshot, _vfs: &Vfs, tree: &SyntaxTree, ) -> Vec<ParseRecoveryEdit>
Return same-width parser-buffer normalizations for a second,
grammar-recovery parse. Read more
Source§fn capabilities(&self) -> LanguageCapabilities
fn capabilities(&self) -> LanguageCapabilities
What the adapter claims to support; unsupported constructs are
surfaced as diagnostics by the pipeline.
Source§fn extract_declarations(
&self,
file: FileId,
ctx: &AdapterContext<'_>,
) -> DeclIndex
fn extract_declarations( &self, file: FileId, ctx: &AdapterContext<'_>, ) -> DeclIndex
Extract declarations and references from a single file.
Source§fn extract_imports(&self, file: FileId, ctx: &AdapterContext<'_>) -> ImportIndex
fn extract_imports(&self, file: FileId, ctx: &AdapterContext<'_>) -> ImportIndex
Extract imports / uses / includes from a single file.
Source§fn source_syntax_proves_language(
&self,
_snapshot: &FileSnapshot,
_tree: &Tree,
) -> LanguageOwnershipEvidence
fn source_syntax_proves_language( &self, _snapshot: &FileSnapshot, _tree: &Tree, ) -> LanguageOwnershipEvidence
Prove that an ambiguous-extension file belongs to this adapter from
grammar-owned syntax in its concrete tree. Read more
Source§fn grammar_name_for_path(&self, _path: &Path) -> &'static str
fn grammar_name_for_path(&self, _path: &Path) -> &'static str
Select the exact Tree-sitter grammar pack for one source path.
Most languages have one grammar and inherit their language id. An
adapter that owns multiple grammar variants (TypeScript/TSX) selects
here from file syntax metadata rather than asking the parser or shared
analyzer to recognize an extension.
Source§fn tree_sitter_language_for_path(
&self,
path: &Path,
) -> Result<Language, AdapterError>
fn tree_sitter_language_for_path( &self, path: &Path, ) -> Result<Language, AdapterError>
Load the exact grammar selected for one source path. The default keeps
existing single-grammar adapters on their normal constructor and loads
a named variant only when
grammar_name_for_path differs.Source§fn fragment_parse_context(&self) -> FragmentParseContext
fn fragment_parse_context(&self) -> FragmentParseContext
Wrapper required to parse a standalone mid-file source fragment.
Returned bytes are adapter grammar metadata and never appear in output.
Source§fn discover_workspace_roots(
&self,
_files: &[FileId],
_ctx: &AdapterContext<'_>,
) -> Vec<WorkspaceRoot>
fn discover_workspace_roots( &self, _files: &[FileId], _ctx: &AdapterContext<'_>, ) -> Vec<WorkspaceRoot>
Discover workspace roots (packages, modules) from the set of files.
Default implementation treats the workspace as a single root.
Source§fn unsupported_constructs(
&self,
_file: FileId,
_ctx: &AdapterContext<'_>,
) -> Vec<UnsupportedConstruct>
fn unsupported_constructs( &self, _file: FileId, _ctx: &AdapterContext<'_>, ) -> Vec<UnsupportedConstruct>
Report constructs the adapter saw but does not fully support.
Auto Trait Implementations§
impl Freeze for JavaAdapter
impl RefUnwindSafe for JavaAdapter
impl Send for JavaAdapter
impl Sync for JavaAdapter
impl Unpin for JavaAdapter
impl UnsafeUnpin for JavaAdapter
impl UnwindSafe for JavaAdapter
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
Mutably borrows from an owned value. Read more