jj-language-server 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +191 -0
- package/README.md +170 -0
- package/lib/cli.d.ts +2 -0
- package/lib/cli.d.ts.map +1 -0
- package/lib/cli.mjs +3 -0
- package/lib/cli.mjs.map +1 -0
- package/lib/diagnostics.d.ts +7 -0
- package/lib/diagnostics.d.ts.map +1 -0
- package/lib/features/call-hierarchy.d.ts +11 -0
- package/lib/features/call-hierarchy.d.ts.map +1 -0
- package/lib/features/code-actions.d.ts +10 -0
- package/lib/features/code-actions.d.ts.map +1 -0
- package/lib/features/code-lens.d.ts +8 -0
- package/lib/features/code-lens.d.ts.map +1 -0
- package/lib/features/completion.d.ts +8 -0
- package/lib/features/completion.d.ts.map +1 -0
- package/lib/features/document-links.d.ts +6 -0
- package/lib/features/document-links.d.ts.map +1 -0
- package/lib/features/document-symbols.d.ts +7 -0
- package/lib/features/document-symbols.d.ts.map +1 -0
- package/lib/features/folding-ranges.d.ts +9 -0
- package/lib/features/folding-ranges.d.ts.map +1 -0
- package/lib/features/formatting.d.ts +13 -0
- package/lib/features/formatting.d.ts.map +1 -0
- package/lib/features/hover.d.ts +8 -0
- package/lib/features/hover.d.ts.map +1 -0
- package/lib/features/inlay-hints.d.ts +8 -0
- package/lib/features/inlay-hints.d.ts.map +1 -0
- package/lib/features/linked-editing.d.ts +10 -0
- package/lib/features/linked-editing.d.ts.map +1 -0
- package/lib/features/navigation.d.ts +35 -0
- package/lib/features/navigation.d.ts.map +1 -0
- package/lib/features/on-type-formatting.d.ts +7 -0
- package/lib/features/on-type-formatting.d.ts.map +1 -0
- package/lib/features/organize-imports.d.ts +6 -0
- package/lib/features/organize-imports.d.ts.map +1 -0
- package/lib/features/refactoring.d.ts +31 -0
- package/lib/features/refactoring.d.ts.map +1 -0
- package/lib/features/selection-range.d.ts +9 -0
- package/lib/features/selection-range.d.ts.map +1 -0
- package/lib/features/semantic-diagnostics.d.ts +14 -0
- package/lib/features/semantic-diagnostics.d.ts.map +1 -0
- package/lib/features/semantic-tokens.d.ts +12 -0
- package/lib/features/semantic-tokens.d.ts.map +1 -0
- package/lib/features/signature-help.d.ts +7 -0
- package/lib/features/signature-help.d.ts.map +1 -0
- package/lib/features/source-generation.d.ts +7 -0
- package/lib/features/source-generation.d.ts.map +1 -0
- package/lib/features/token-utils.d.ts +6 -0
- package/lib/features/token-utils.d.ts.map +1 -0
- package/lib/features/type-hierarchy.d.ts +7 -0
- package/lib/features/type-hierarchy.d.ts.map +1 -0
- package/lib/java/annotation-processor.d.ts +57 -0
- package/lib/java/annotation-processor.d.ts.map +1 -0
- package/lib/java/class-file-reader.d.ts +57 -0
- package/lib/java/class-file-reader.d.ts.map +1 -0
- package/lib/java/cst-utils.d.ts +33 -0
- package/lib/java/cst-utils.d.ts.map +1 -0
- package/lib/java/expression-type-resolver.d.ts +24 -0
- package/lib/java/expression-type-resolver.d.ts.map +1 -0
- package/lib/java/import-resolver.d.ts +40 -0
- package/lib/java/import-resolver.d.ts.map +1 -0
- package/lib/java/javadoc.d.ts +41 -0
- package/lib/java/javadoc.d.ts.map +1 -0
- package/lib/java/parser.d.ts +13 -0
- package/lib/java/parser.d.ts.map +1 -0
- package/lib/java/scope-resolver.d.ts +20 -0
- package/lib/java/scope-resolver.d.ts.map +1 -0
- package/lib/java/symbol-table.d.ts +43 -0
- package/lib/java/symbol-table.d.ts.map +1 -0
- package/lib/java/type-resolver.d.ts +73 -0
- package/lib/java/type-resolver.d.ts.map +1 -0
- package/lib/lsp-client.d.ts +14 -0
- package/lib/lsp-client.d.ts.map +1 -0
- package/lib/lsp-connection.d.ts +6 -0
- package/lib/lsp-connection.d.ts.map +1 -0
- package/lib/lsp-server.d.ts +87 -0
- package/lib/lsp-server.d.ts.map +1 -0
- package/lib/project/classpath-resolver.d.ts +80 -0
- package/lib/project/classpath-resolver.d.ts.map +1 -0
- package/lib/project/document-cache.d.ts +58 -0
- package/lib/project/document-cache.d.ts.map +1 -0
- package/lib/project/gradle.d.ts +32 -0
- package/lib/project/gradle.d.ts.map +1 -0
- package/lib/project/jar-index.d.ts +71 -0
- package/lib/project/jar-index.d.ts.map +1 -0
- package/lib/project/jdk-model.d.ts +39 -0
- package/lib/project/jdk-model.d.ts.map +1 -0
- package/lib/project/maven.d.ts +37 -0
- package/lib/project/maven.d.ts.map +1 -0
- package/lib/project/multi-root.d.ts +52 -0
- package/lib/project/multi-root.d.ts.map +1 -0
- package/lib/project/source-jar.d.ts +62 -0
- package/lib/project/source-jar.d.ts.map +1 -0
- package/lib/project/workspace-index.d.ts +67 -0
- package/lib/project/workspace-index.d.ts.map +1 -0
- package/lib/utils/logger.d.ts +18 -0
- package/lib/utils/logger.d.ts.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { CstNode } from 'chevrotain';
|
|
2
|
+
export interface ImportInfo {
|
|
3
|
+
/** The simple name (e.g., "List") or "*" for wildcards */
|
|
4
|
+
simpleName: string;
|
|
5
|
+
/** The fully qualified name (e.g., "java.util.List") or package prefix for wildcards */
|
|
6
|
+
qualifiedName: string;
|
|
7
|
+
/** Whether this is a wildcard import (java.util.*) */
|
|
8
|
+
isWildcard: boolean;
|
|
9
|
+
/** Whether this is a static import */
|
|
10
|
+
isStatic: boolean;
|
|
11
|
+
/** The import's line number (0-based) */
|
|
12
|
+
line: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ImportMap {
|
|
15
|
+
/** The package name of this file (e.g., "com.example") */
|
|
16
|
+
packageName: string;
|
|
17
|
+
/** Map from simple name to ImportInfo */
|
|
18
|
+
imports: Map<string, ImportInfo>;
|
|
19
|
+
/** Wildcard import packages (e.g., ["java.util", "java.io"]) */
|
|
20
|
+
wildcardPackages: string[];
|
|
21
|
+
/** Static imports (e.g., "PI" -> "java.lang.Math.PI") */
|
|
22
|
+
staticImports: Map<string, ImportInfo>;
|
|
23
|
+
/** Static wildcard packages (e.g., ["java.lang.Math"]) */
|
|
24
|
+
staticWildcardClasses: string[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Java.lang types that are auto-imported.
|
|
28
|
+
*/
|
|
29
|
+
export declare const JAVA_LANG_TYPES: ReadonlySet<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Parse import declarations from a CST and build an ImportMap.
|
|
32
|
+
*/
|
|
33
|
+
export declare function buildImportMap(cst: CstNode): ImportMap;
|
|
34
|
+
/**
|
|
35
|
+
* Resolve a simple type name to its qualified name using the import map.
|
|
36
|
+
* Checks in order: 1) explicit imports, 2) same-package types, 3) java.lang.* types, 4) wildcard imports
|
|
37
|
+
* Returns undefined if the name cannot be resolved.
|
|
38
|
+
*/
|
|
39
|
+
export declare function resolveTypeName(name: string, importMap: ImportMap): string | undefined;
|
|
40
|
+
//# sourceMappingURL=import-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-resolver.d.ts","sourceRoot":"","sources":["../../src/java/import-resolver.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAU,MAAM,YAAY,CAAC;AAGlD,MAAM,WAAW,UAAU;IACvB,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,wFAAwF;IACxF,aAAa,EAAE,MAAM,CAAC;IACtB,sDAAsD;IACtD,UAAU,EAAE,OAAO,CAAC;IACpB,sCAAsC;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACtB,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACjC,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,yDAAyD;IACzD,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACvC,0DAA0D;IAC1D,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACnC;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAgC9C,CAAC;AAMH;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,CA+EtD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAoBtF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { CstNode } from 'chevrotain';
|
|
2
|
+
import type { JavaSymbol } from './symbol-table.js';
|
|
3
|
+
export interface JavadocComment {
|
|
4
|
+
description: string;
|
|
5
|
+
params: {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}[];
|
|
9
|
+
returns?: string;
|
|
10
|
+
throws: {
|
|
11
|
+
type: string;
|
|
12
|
+
description: string;
|
|
13
|
+
}[];
|
|
14
|
+
since?: string;
|
|
15
|
+
deprecated?: string;
|
|
16
|
+
see: string[];
|
|
17
|
+
author?: string;
|
|
18
|
+
raw: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Parse a Javadoc comment string (`/** ... */`) into structured data.
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseJavadoc(commentText: string): JavadocComment;
|
|
24
|
+
/**
|
|
25
|
+
* Walk the CST to find the Javadoc comment attached to the node at the symbol's position.
|
|
26
|
+
*/
|
|
27
|
+
export declare function extractJavadocForSymbol(cst: CstNode, symbol: JavaSymbol, sourceText?: string): JavadocComment | null;
|
|
28
|
+
/**
|
|
29
|
+
* Format a JavadocComment into Markdown for hover display.
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatJavadocMarkdown(doc: JavadocComment): string;
|
|
32
|
+
/**
|
|
33
|
+
* Walk the entire CST and collect all Javadoc comments, keyed by the 1-based
|
|
34
|
+
* start line of the node they're attached to (not the comment's own line).
|
|
35
|
+
*
|
|
36
|
+
* java-parser does not reliably attach leadingComments to tokens, so we also
|
|
37
|
+
* accept the raw source text and use a regex-based fallback when the CST walk
|
|
38
|
+
* finds nothing.
|
|
39
|
+
*/
|
|
40
|
+
export declare function findJavadocComments(cst: CstNode, sourceText?: string): Map<number, JavadocComment>;
|
|
41
|
+
//# sourceMappingURL=javadoc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"javadoc.d.ts","sourceRoot":"","sources":["../../src/java/javadoc.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAsB,MAAM,YAAY,CAAC;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,CAuFhE;AA+BD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAIpH;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,CAuCjE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAYlG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CstNode, IToken } from 'chevrotain';
|
|
2
|
+
export interface ParseError {
|
|
3
|
+
message: string;
|
|
4
|
+
token: IToken;
|
|
5
|
+
previousToken?: IToken;
|
|
6
|
+
ruleStack: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface ParseResult {
|
|
9
|
+
cst: CstNode | undefined;
|
|
10
|
+
errors: ParseError[];
|
|
11
|
+
}
|
|
12
|
+
export declare function parseJava(text: string): ParseResult;
|
|
13
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/java/parser.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAyB,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzE,MAAM,WAAW,UAAU;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IACxB,GAAG,EAAE,OAAO,GAAG,SAAS,CAAC;IACzB,MAAM,EAAE,UAAU,EAAE,CAAC;CACxB;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAyBnD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { JavaSymbol, SymbolTable } from './symbol-table.js';
|
|
2
|
+
/**
|
|
3
|
+
* Find the symbol at a given position (0-based line and column).
|
|
4
|
+
*/
|
|
5
|
+
export declare function findSymbolAtPosition(table: SymbolTable, line: number, column: number): JavaSymbol | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Find all symbols visible at a given position.
|
|
8
|
+
* Includes: enclosing class members, local variables declared before position,
|
|
9
|
+
* parameters of enclosing method/constructor.
|
|
10
|
+
*/
|
|
11
|
+
export declare function findVisibleSymbols(table: SymbolTable, line: number, column: number): JavaSymbol[];
|
|
12
|
+
/**
|
|
13
|
+
* Find a symbol by name among visible symbols at a position.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveSymbolByName(table: SymbolTable, name: string, line: number, column: number): JavaSymbol | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Find all references to a symbol name within the symbol table.
|
|
18
|
+
*/
|
|
19
|
+
export declare function findSymbolsByName(table: SymbolTable, name: string): JavaSymbol[];
|
|
20
|
+
//# sourceMappingURL=scope-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-resolver.d.ts","sourceRoot":"","sources":["../../src/java/scope-resolver.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEjE;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAa7G;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE,CAgDjG;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAG1H;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,CAEhF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { CstNode } from 'chevrotain';
|
|
2
|
+
export type SymbolKind = 'class' | 'interface' | 'enum' | 'record' | 'method' | 'constructor' | 'field' | 'variable' | 'parameter' | 'enumConstant' | 'annotation';
|
|
3
|
+
export interface JavaSymbol {
|
|
4
|
+
name: string;
|
|
5
|
+
kind: SymbolKind;
|
|
6
|
+
type?: string;
|
|
7
|
+
modifiers: string[];
|
|
8
|
+
/** 0-based line */
|
|
9
|
+
line: number;
|
|
10
|
+
/** 0-based column */
|
|
11
|
+
column: number;
|
|
12
|
+
endLine: number;
|
|
13
|
+
endColumn: number;
|
|
14
|
+
/** Parameters for methods/constructors: [{type, name}] */
|
|
15
|
+
parameters?: {
|
|
16
|
+
type: string;
|
|
17
|
+
name: string;
|
|
18
|
+
}[];
|
|
19
|
+
/** Return type for methods */
|
|
20
|
+
returnType?: string;
|
|
21
|
+
/** Parent symbol name (e.g., class name for a method) */
|
|
22
|
+
parent?: string;
|
|
23
|
+
/** Children symbols (members of a class/interface) */
|
|
24
|
+
children: JavaSymbol[];
|
|
25
|
+
/** Superclass name (for classes) */
|
|
26
|
+
superclass?: string;
|
|
27
|
+
/** Implemented/extended interface names */
|
|
28
|
+
interfaces?: string[];
|
|
29
|
+
/** Generic type parameters, e.g., ["T", "K", "V"] */
|
|
30
|
+
typeParameters?: string[];
|
|
31
|
+
/** Bounds for type parameters, e.g., {"T": "extends Comparable<T>"} */
|
|
32
|
+
typeParameterBounds?: Record<string, string>;
|
|
33
|
+
}
|
|
34
|
+
export interface SymbolTable {
|
|
35
|
+
symbols: JavaSymbol[];
|
|
36
|
+
/** Flat list for quick lookup */
|
|
37
|
+
allSymbols: JavaSymbol[];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Build a symbol table from a java-parser CST.
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildSymbolTable(cst: CstNode): SymbolTable;
|
|
43
|
+
//# sourceMappingURL=symbol-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,WAAW,CAiB1D"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { JavaSymbol, SymbolTable } from './symbol-table.js';
|
|
2
|
+
import type { WorkspaceIndex } from '../project/workspace-index.js';
|
|
3
|
+
export interface ResolvedType {
|
|
4
|
+
/** The simple name (e.g., "List") */
|
|
5
|
+
simpleName: string;
|
|
6
|
+
/** The fully qualified name if known (e.g., "java.util.List") */
|
|
7
|
+
qualifiedName?: string;
|
|
8
|
+
/** Type arguments for generics (e.g., ["String"] for List<String>) */
|
|
9
|
+
typeArguments?: string[];
|
|
10
|
+
/** Whether this is a primitive type */
|
|
11
|
+
isPrimitive: boolean;
|
|
12
|
+
/** Whether this is an array type */
|
|
13
|
+
isArray: boolean;
|
|
14
|
+
/** Array dimensions (e.g., 2 for int[][]) */
|
|
15
|
+
arrayDimensions: number;
|
|
16
|
+
}
|
|
17
|
+
export interface TypeContext {
|
|
18
|
+
/** Symbol table for the current file */
|
|
19
|
+
symbolTable: SymbolTable;
|
|
20
|
+
/** Workspace index for cross-file resolution */
|
|
21
|
+
workspaceIndex?: WorkspaceIndex;
|
|
22
|
+
/** Import map for the current file */
|
|
23
|
+
importMap?: ImportMap;
|
|
24
|
+
}
|
|
25
|
+
export interface ImportMap {
|
|
26
|
+
packageName: string;
|
|
27
|
+
imports: Map<string, {
|
|
28
|
+
qualifiedName: string;
|
|
29
|
+
}>;
|
|
30
|
+
wildcardPackages: string[];
|
|
31
|
+
}
|
|
32
|
+
export interface MethodInfo {
|
|
33
|
+
name: string;
|
|
34
|
+
returnType: string;
|
|
35
|
+
parameters: {
|
|
36
|
+
name: string;
|
|
37
|
+
type: string;
|
|
38
|
+
}[];
|
|
39
|
+
isStatic: boolean;
|
|
40
|
+
declaringType: string;
|
|
41
|
+
}
|
|
42
|
+
export interface FieldInfo {
|
|
43
|
+
name: string;
|
|
44
|
+
type: string;
|
|
45
|
+
isStatic: boolean;
|
|
46
|
+
declaringType: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Resolve a type name string to a ResolvedType.
|
|
50
|
+
* Handles primitives, arrays, generics, and qualified names.
|
|
51
|
+
*/
|
|
52
|
+
export declare function resolveTypeString(typeStr: string, context: TypeContext): ResolvedType;
|
|
53
|
+
/**
|
|
54
|
+
* Resolve the type of a symbol (variable, field, parameter, method return).
|
|
55
|
+
*/
|
|
56
|
+
export declare function resolveSymbolType(symbol: JavaSymbol, context: TypeContext): ResolvedType | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Find members (methods and fields) available on a given type.
|
|
59
|
+
* Searches: workspace types → JDK model → superclass chain.
|
|
60
|
+
*/
|
|
61
|
+
export declare function findTypeMembers(typeName: string, context: TypeContext): {
|
|
62
|
+
methods: MethodInfo[];
|
|
63
|
+
fields: FieldInfo[];
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Resolve the type of a method call expression.
|
|
67
|
+
*/
|
|
68
|
+
export declare function resolveMethodReturnType(typeName: string, methodName: string, context: TypeContext): ResolvedType | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Resolve the type of a field access.
|
|
71
|
+
*/
|
|
72
|
+
export declare function resolveFieldType(typeName: string, fieldName: string, context: TypeContext): ResolvedType | undefined;
|
|
73
|
+
//# sourceMappingURL=type-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-resolver.d.ts","sourceRoot":"","sources":["../../src/java/type-resolver.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAKpE,MAAM,WAAW,YAAY;IACzB,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,CAAC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M,EAChB,OAAO,EAAE,WAAW,GACrB;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,MAAM,EAAE,SAAS,EAAE,CAAA;CAAE,CAQhD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACnC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,WAAW,GACrB,YAAY,GAAG,SAAS,CAK1B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC5B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,WAAW,GACrB,YAAY,GAAG,SAAS,CAK1B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import lsp from 'vscode-languageserver';
|
|
2
|
+
export interface LspClient {
|
|
3
|
+
publishDiagnostics(params: lsp.PublishDiagnosticsParams): void;
|
|
4
|
+
showMessage(params: lsp.ShowMessageParams): void;
|
|
5
|
+
logMessage(params: lsp.LogMessageParams): void;
|
|
6
|
+
}
|
|
7
|
+
export declare class LspClientImpl implements LspClient {
|
|
8
|
+
private connection;
|
|
9
|
+
constructor(connection: lsp.Connection);
|
|
10
|
+
publishDiagnostics(params: lsp.PublishDiagnosticsParams): void;
|
|
11
|
+
showMessage(params: lsp.ShowMessageParams): void;
|
|
12
|
+
logMessage(params: lsp.LogMessageParams): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=lsp-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lsp-client.d.ts","sourceRoot":"","sources":["../src/lsp-client.ts"],"names":[],"mappings":"AAQA,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAExC,MAAM,WAAW,SAAS;IACtB,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAwB,GAAG,IAAI,CAAC;IAC/D,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,iBAAiB,GAAG,IAAI,CAAC;IACjD,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC;CAClD;AAED,qBAAa,aAAc,YAAW,SAAS;IAC/B,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,GAAG,CAAC,UAAU;IAE9C,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAwB,GAAG,IAAI;IAI9D,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,iBAAiB,GAAG,IAAI;IAIhD,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI;CAGjD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import lsp from 'vscode-languageserver/node.js';
|
|
2
|
+
export interface LspConnectionOptions {
|
|
3
|
+
showMessageLevel: lsp.MessageType;
|
|
4
|
+
}
|
|
5
|
+
export declare function createLspConnection(options: LspConnectionOptions): lsp.Connection;
|
|
6
|
+
//# sourceMappingURL=lsp-connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lsp-connection.d.ts","sourceRoot":"","sources":["../src/lsp-connection.ts"],"names":[],"mappings":"AAQA,OAAO,GAAG,MAAM,+BAA+B,CAAC;AAKhD,MAAM,WAAW,oBAAoB;IACjC,gBAAgB,EAAE,GAAG,CAAC,WAAW,CAAC;CACrC;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,oBAAoB,GAAG,GAAG,CAAC,UAAU,CAmEjF"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import lsp from 'vscode-languageserver';
|
|
2
|
+
import type { LspClient } from './lsp-client.js';
|
|
3
|
+
import type { Logger } from './utils/logger.js';
|
|
4
|
+
export interface JjLanguageServerSettings {
|
|
5
|
+
java: {
|
|
6
|
+
home?: string;
|
|
7
|
+
version?: string;
|
|
8
|
+
};
|
|
9
|
+
formatting: {
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
tabSize: number;
|
|
12
|
+
insertSpaces: boolean;
|
|
13
|
+
};
|
|
14
|
+
diagnostics: {
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
semanticEnabled: boolean;
|
|
17
|
+
};
|
|
18
|
+
completion: {
|
|
19
|
+
autoImport: boolean;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface LspServerOptions {
|
|
23
|
+
logger: Logger;
|
|
24
|
+
lspClient: LspClient;
|
|
25
|
+
}
|
|
26
|
+
export declare class LspServer {
|
|
27
|
+
private logger;
|
|
28
|
+
private lspClient;
|
|
29
|
+
private documents;
|
|
30
|
+
private parseResults;
|
|
31
|
+
private symbolTables;
|
|
32
|
+
private workspaceIndex;
|
|
33
|
+
private documentCache;
|
|
34
|
+
private multiRoot;
|
|
35
|
+
private jarIndex;
|
|
36
|
+
private sourceJarCache;
|
|
37
|
+
private classpathResolved;
|
|
38
|
+
private settings;
|
|
39
|
+
constructor(options: LspServerOptions);
|
|
40
|
+
private rootUri;
|
|
41
|
+
initialize(params: lsp.InitializeParams): lsp.InitializeResult;
|
|
42
|
+
initialized(_params: lsp.InitializedParams): Promise<void>;
|
|
43
|
+
shutdown(): void;
|
|
44
|
+
didOpenTextDocument(params: lsp.DidOpenTextDocumentParams): void;
|
|
45
|
+
didChangeTextDocument(params: lsp.DidChangeTextDocumentParams): void;
|
|
46
|
+
didCloseTextDocument(params: lsp.DidCloseTextDocumentParams): void;
|
|
47
|
+
didSaveTextDocument(_params: lsp.DidSaveTextDocumentParams): void;
|
|
48
|
+
didChangeWatchedFiles(params: lsp.DidChangeWatchedFilesParams): void;
|
|
49
|
+
didChangeConfiguration(params: lsp.DidChangeConfigurationParams): void;
|
|
50
|
+
documentSymbol(params: lsp.DocumentSymbolParams): lsp.DocumentSymbol[] | null;
|
|
51
|
+
documentFormatting(params: lsp.DocumentFormattingParams): Promise<lsp.TextEdit[] | null>;
|
|
52
|
+
documentRangeFormatting(params: lsp.DocumentRangeFormattingParams): Promise<lsp.TextEdit[] | null>;
|
|
53
|
+
onTypeFormatting(params: lsp.DocumentOnTypeFormattingParams): lsp.TextEdit[] | null;
|
|
54
|
+
foldingRanges(params: lsp.FoldingRangeParams): lsp.FoldingRange[] | null;
|
|
55
|
+
hover(params: lsp.HoverParams): Promise<lsp.Hover | null>;
|
|
56
|
+
completion(params: lsp.CompletionParams): lsp.CompletionItem[] | null;
|
|
57
|
+
completionResolve(item: lsp.CompletionItem): lsp.CompletionItem;
|
|
58
|
+
signatureHelp(params: lsp.SignatureHelpParams): lsp.SignatureHelp | null;
|
|
59
|
+
definition(params: lsp.DefinitionParams): Promise<lsp.Definition | null>;
|
|
60
|
+
implementation(params: lsp.ImplementationParams): lsp.Location[] | null;
|
|
61
|
+
typeDefinition(params: lsp.TypeDefinitionParams): lsp.Location | null;
|
|
62
|
+
references(params: lsp.ReferenceParams): lsp.Location[] | null;
|
|
63
|
+
documentHighlight(params: lsp.DocumentHighlightParams): lsp.DocumentHighlight[] | null;
|
|
64
|
+
rename(params: lsp.RenameParams): lsp.WorkspaceEdit | null;
|
|
65
|
+
prepareRename(params: lsp.PrepareRenameParams): lsp.Range | null;
|
|
66
|
+
selectionRanges(params: lsp.SelectionRangeParams): lsp.SelectionRange[] | null;
|
|
67
|
+
executeCommand(_params: lsp.ExecuteCommandParams): unknown;
|
|
68
|
+
workspaceSymbol(params: lsp.WorkspaceSymbolParams): lsp.WorkspaceSymbol[] | null;
|
|
69
|
+
semanticTokensFull(params: lsp.SemanticTokensParams): lsp.SemanticTokens;
|
|
70
|
+
semanticTokensRange(params: lsp.SemanticTokensRangeParams): lsp.SemanticTokens;
|
|
71
|
+
codeAction(params: lsp.CodeActionParams): lsp.CodeAction[];
|
|
72
|
+
inlayHint(params: lsp.InlayHintParams): lsp.InlayHint[];
|
|
73
|
+
prepareCallHierarchy(params: lsp.CallHierarchyPrepareParams): lsp.CallHierarchyItem[] | null;
|
|
74
|
+
callHierarchyIncomingCalls(params: lsp.CallHierarchyIncomingCallsParams): lsp.CallHierarchyIncomingCall[];
|
|
75
|
+
callHierarchyOutgoingCalls(params: lsp.CallHierarchyOutgoingCallsParams): lsp.CallHierarchyOutgoingCall[];
|
|
76
|
+
prepareTypeHierarchy(params: lsp.TypeHierarchyPrepareParams): lsp.TypeHierarchyItem[] | null;
|
|
77
|
+
typeHierarchySupertypes(params: lsp.TypeHierarchySupertypesParams): lsp.TypeHierarchyItem[];
|
|
78
|
+
typeHierarchySubtypes(params: lsp.TypeHierarchySubtypesParams): lsp.TypeHierarchyItem[];
|
|
79
|
+
codeLens(params: lsp.CodeLensParams): lsp.CodeLens[];
|
|
80
|
+
linkedEditingRange(params: lsp.LinkedEditingRangeParams): lsp.LinkedEditingRanges | null;
|
|
81
|
+
documentLinks(params: lsp.DocumentLinkParams): lsp.DocumentLink[];
|
|
82
|
+
didChangeWorkspaceFolders(event: lsp.WorkspaceFoldersChangeEvent): void;
|
|
83
|
+
private reindexFile;
|
|
84
|
+
private parseAndPublishDiagnostics;
|
|
85
|
+
private resolveClasspath;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=lsp-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lsp-server.d.ts","sourceRoot":"","sources":["../src/lsp-server.ts"],"names":[],"mappings":"AAQA,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAmChD,MAAM,WAAW,wBAAwB;IACrC,IAAI,EAAE;QACF,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,UAAU,EAAE;QACR,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,WAAW,EAAE;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,eAAe,EAAE,OAAO,CAAC;KAC5B,CAAC;IACF,UAAU,EAAE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AG,CAAC,6BAA6B,GAAG,GAAG,CAAC,iBAAiB,EAAE;IAO3F,qBAAqB,CAAC,MAAM,EAAE,GAAG,CAAC,2BAA2B,GAAG,GAAG,CAAC,iBAAiB,EAAE;IAOvF,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,cAAc,GAAG,GAAG,CAAC,QAAQ,EAAE;IASpD,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAwB,GAAG,GAAG,CAAC,mBAAmB,GAAG,IAAI;IASxF,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,kBAAkB,GAAG,GAAG,CAAC,YAAY,EAAE;IAMjE,yBAAyB,CAAC,KAAK,EAAE,GAAG,CAAC,2BAA2B,GAAG,IAAI;YAWzD,WAAW;IAkBzB,OAAO,CAAC,0BAA0B;YA2EpB,gBAAgB;CA6DjC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { MavenDependency } from './maven.js';
|
|
2
|
+
import type { GradleDependency } from './gradle.js';
|
|
3
|
+
import type { Logger } from '../utils/logger.js';
|
|
4
|
+
export interface ResolvedDependency {
|
|
5
|
+
groupId: string;
|
|
6
|
+
artifactId: string;
|
|
7
|
+
version: string;
|
|
8
|
+
jarPath: string;
|
|
9
|
+
sourceJarPath?: string;
|
|
10
|
+
scope: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ResolvedClasspath {
|
|
13
|
+
dependencies: ResolvedDependency[];
|
|
14
|
+
jdkPath?: string;
|
|
15
|
+
jdkVersion?: string;
|
|
16
|
+
unresolvedCount: number;
|
|
17
|
+
}
|
|
18
|
+
export interface JdkInfo {
|
|
19
|
+
path: string;
|
|
20
|
+
version?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Compute the expected Maven local repository path for a dependency.
|
|
24
|
+
*/
|
|
25
|
+
export declare function computeMavenJarPath(groupId: string, artifactId: string, version: string, m2Root?: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Compute the expected Maven source JAR path for a dependency.
|
|
28
|
+
*/
|
|
29
|
+
export declare function computeMavenSourceJarPath(groupId: string, artifactId: string, version: string, m2Root?: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Resolve Maven dependencies to actual JAR file paths on disk.
|
|
32
|
+
*/
|
|
33
|
+
export declare function resolveMavenClasspath(dependencies: MavenDependency[], m2Root?: string): Promise<{
|
|
34
|
+
resolved: ResolvedDependency[];
|
|
35
|
+
unresolvedCount: number;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Compute the Gradle modules cache base directory for a dependency.
|
|
39
|
+
*/
|
|
40
|
+
export declare function computeGradleCacheDir(group: string, name: string, version: string, gradleHome?: string): string;
|
|
41
|
+
/**
|
|
42
|
+
* Resolve Gradle dependencies to actual JAR file paths on disk.
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolveGradleClasspath(dependencies: GradleDependency[], gradleHome?: string): Promise<{
|
|
45
|
+
resolved: ResolvedDependency[];
|
|
46
|
+
unresolvedCount: number;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Resolve the JDK installation path and version.
|
|
50
|
+
*/
|
|
51
|
+
export declare function resolveJdkPath(javaHome?: string): Promise<JdkInfo | undefined>;
|
|
52
|
+
/**
|
|
53
|
+
* Resolve the full project classpath from Maven/Gradle dependencies and JDK.
|
|
54
|
+
*
|
|
55
|
+
* Strategy:
|
|
56
|
+
* 1. Try running `mvn dependency:build-classpath` or `gradle dependencies`
|
|
57
|
+
* to get the real, fully-resolved transitive classpath (including downloads).
|
|
58
|
+
* 2. Fall back to scanning local caches (~/.m2, ~/.gradle) if the build tool
|
|
59
|
+
* is not available or the command fails.
|
|
60
|
+
*/
|
|
61
|
+
export declare function resolveProjectClasspath(options: {
|
|
62
|
+
mavenDeps?: MavenDependency[];
|
|
63
|
+
gradleDeps?: GradleDependency[];
|
|
64
|
+
javaHome?: string;
|
|
65
|
+
m2Root?: string;
|
|
66
|
+
gradleHome?: string;
|
|
67
|
+
projectRoot?: string;
|
|
68
|
+
logger?: Logger;
|
|
69
|
+
}): Promise<ResolvedClasspath>;
|
|
70
|
+
/**
|
|
71
|
+
* Run `mvn dependency:build-classpath` to get the fully-resolved classpath
|
|
72
|
+
* including all transitive dependencies. Maven will download missing artifacts
|
|
73
|
+
* automatically.
|
|
74
|
+
*/
|
|
75
|
+
export declare function runMavenBuildClasspath(projectRoot: string, logger?: Logger): Promise<ResolvedDependency[] | null>;
|
|
76
|
+
/**
|
|
77
|
+
* Run Gradle to get the compile classpath. Tries the Gradle wrapper first.
|
|
78
|
+
*/
|
|
79
|
+
export declare function runGradleDependencyClasspath(projectRoot: string, logger?: Logger): Promise<ResolvedDependency[] | null>;
|
|
80
|
+
//# sourceMappingURL=classpath-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classpath-resolver.d.ts","sourceRoot":"","sources":["../../src/project/classpath-resolver.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAIjD,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAC9B,YAAY,EAAE,kBAAkB,EAAE,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,OAAO;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAA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AC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAuD7B;AAID;;;;GAIG;AACH,wBAAsB,sBAAsB,CACxC,WAAW,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,kBAAkB,EAAE,GAAG,IAAI,CAAC,CA+BtC;AA4GD;;GAEG;AACH,wBAAsB,4BAA4B,CAC9C,WAAW,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,kBAAkB,EAAE,GAAG,IAAI,CAAC,CA+GtC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ParseResult } from '../java/parser.js';
|
|
2
|
+
import type { SymbolTable } from '../java/symbol-table.js';
|
|
3
|
+
export interface CachedDocument {
|
|
4
|
+
uri: string;
|
|
5
|
+
version: number;
|
|
6
|
+
content: string;
|
|
7
|
+
parseResult: ParseResult;
|
|
8
|
+
symbolTable: SymbolTable;
|
|
9
|
+
lastParsed: number;
|
|
10
|
+
isDirty: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Smart document cache that tracks document versions and avoids unnecessary reparsing.
|
|
14
|
+
*/
|
|
15
|
+
export declare class DocumentCache {
|
|
16
|
+
private cache;
|
|
17
|
+
private parseDebounceTimers;
|
|
18
|
+
/**
|
|
19
|
+
* Get cached document. If version is provided, only returns when version matches.
|
|
20
|
+
*/
|
|
21
|
+
get(uri: string, version?: number): CachedDocument | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Update document content. Returns true if content actually changed.
|
|
24
|
+
*/
|
|
25
|
+
update(uri: string, version: number, content: string, parseResult: ParseResult, symbolTable: SymbolTable): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Mark document as dirty (needs reparse).
|
|
28
|
+
*/
|
|
29
|
+
markDirty(uri: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* Remove document from cache.
|
|
32
|
+
*/
|
|
33
|
+
remove(uri: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* Get all cached URIs.
|
|
36
|
+
*/
|
|
37
|
+
getUris(): string[];
|
|
38
|
+
/**
|
|
39
|
+
* Get cache size.
|
|
40
|
+
*/
|
|
41
|
+
get size(): number;
|
|
42
|
+
/**
|
|
43
|
+
* Clear entire cache.
|
|
44
|
+
*/
|
|
45
|
+
clear(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Schedule a debounced reparse. Cancels any previously scheduled reparse for the same URI.
|
|
48
|
+
*/
|
|
49
|
+
scheduleReparse(uri: string, content: string, delayMs: number, parseFn: (content: string) => {
|
|
50
|
+
parseResult: ParseResult;
|
|
51
|
+
symbolTable: SymbolTable;
|
|
52
|
+
}): void;
|
|
53
|
+
/**
|
|
54
|
+
* Cancel any pending reparse for a URI.
|
|
55
|
+
*/
|
|
56
|
+
cancelReparse(uri: string): void;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=document-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-cache.d.ts","sourceRoot":"","sources":["../../src/project/document-cache.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,aAAa;IACtB,OAAO,CAAC,KAAK,CAA0C;IACvD,OAAO,CAAC,mBAAmB,CAA0C;IAErE;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAO9D;;OAEG;IACH,MAAM,CACF,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,GACzB,OAAO;IAkBV;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAO5B;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKzB;;OAEG;IACH,OAAO,IAAI,MAAM,EAAE;IAInB;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;OAEG;IACH,KAAK,IAAI,IAAI;IAOb;;OAEG;IACH,eAAe,CACX,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK;QAAE,WAAW,EAAE,WAAW,CAAC;QAAC,WAAW,EAAE,WAAW,CAAA;KAAE,GACrF,IAAI;IAcP;;OAEG;IACH,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAOnC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Logger } from '../utils/logger.js';
|
|
2
|
+
export interface GradleProject {
|
|
3
|
+
buildFile: string;
|
|
4
|
+
isKotlinDsl: boolean;
|
|
5
|
+
javaVersion?: string;
|
|
6
|
+
sourceCompatibility?: string;
|
|
7
|
+
targetCompatibility?: string;
|
|
8
|
+
dependencies: GradleDependency[];
|
|
9
|
+
plugins: string[];
|
|
10
|
+
sourceDirectories: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface GradleDependency {
|
|
13
|
+
configuration: string;
|
|
14
|
+
group: string;
|
|
15
|
+
name: string;
|
|
16
|
+
version?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Parse a build.gradle or build.gradle.kts file.
|
|
20
|
+
* Uses regex-based extraction since Groovy/Kotlin DSL aren't easy to parse formally.
|
|
21
|
+
*/
|
|
22
|
+
export declare function parseGradleBuild(buildPath: string, logger: Logger): Promise<GradleProject | null>;
|
|
23
|
+
export declare function parseGradleContent(content: string, buildPath: string, logger: Logger): GradleProject | null;
|
|
24
|
+
/**
|
|
25
|
+
* Find Gradle build files in a directory tree.
|
|
26
|
+
*/
|
|
27
|
+
export declare function findGradleBuildFiles(rootDir: string): Promise<string[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Detect if a directory is a Gradle project.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isGradleProject(dir: string): Promise<boolean>;
|
|
32
|
+
//# sourceMappingURL=gradle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradle.d.ts","sourceRoot":"","sources":["../../src/project/gradle.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,WAAW,aAAa;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAQvG;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAgC3G;AAoFD;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAyB7E;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAUnE"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { ClassFileInfo } from '../java/class-file-reader.js';
|
|
2
|
+
import type { ResolvedDependency } from './classpath-resolver.js';
|
|
3
|
+
import type { Logger } from '../utils/logger.js';
|
|
4
|
+
export interface IndexedType {
|
|
5
|
+
className: string;
|
|
6
|
+
simpleName: string;
|
|
7
|
+
packageName: string;
|
|
8
|
+
jarPath: string;
|
|
9
|
+
sourceJarPath?: string;
|
|
10
|
+
dependency: {
|
|
11
|
+
groupId: string;
|
|
12
|
+
artifactId: string;
|
|
13
|
+
version: string;
|
|
14
|
+
};
|
|
15
|
+
classInfo: ClassFileInfo;
|
|
16
|
+
}
|
|
17
|
+
export interface ZipEntry {
|
|
18
|
+
fileName: string;
|
|
19
|
+
compressedSize: number;
|
|
20
|
+
uncompressedSize: number;
|
|
21
|
+
compressionMethod: number;
|
|
22
|
+
localHeaderOffset: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Parse the central directory of a ZIP buffer and return all entries.
|
|
26
|
+
*/
|
|
27
|
+
export declare function parseZipEntries(buf: Buffer): ZipEntry[];
|
|
28
|
+
/**
|
|
29
|
+
* Extract a single entry's uncompressed data from the ZIP buffer.
|
|
30
|
+
*/
|
|
31
|
+
export declare function extractEntry(buf: Buffer, entry: ZipEntry): Buffer | null;
|
|
32
|
+
export declare class JarIndex {
|
|
33
|
+
private typesByName;
|
|
34
|
+
private typesBySimpleName;
|
|
35
|
+
private logger;
|
|
36
|
+
constructor(logger: Logger);
|
|
37
|
+
/**
|
|
38
|
+
* Index all JARs from resolved dependencies.
|
|
39
|
+
*/
|
|
40
|
+
indexDependencies(dependencies: ResolvedDependency[]): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Index a single JAR file. Returns the number of types indexed.
|
|
43
|
+
*/
|
|
44
|
+
indexJar(jarPath: string, dep: ResolvedDependency): Promise<number>;
|
|
45
|
+
/**
|
|
46
|
+
* Find a type by fully qualified name.
|
|
47
|
+
*/
|
|
48
|
+
findType(qualifiedName: string): IndexedType | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Find types by simple name (may return multiple from different packages).
|
|
51
|
+
*/
|
|
52
|
+
findTypesBySimpleName(simpleName: string): IndexedType[];
|
|
53
|
+
/**
|
|
54
|
+
* Search types by prefix (for completion). Matches against both simple names
|
|
55
|
+
* and fully qualified names. Returns up to `limit` results (default 50).
|
|
56
|
+
*/
|
|
57
|
+
searchTypes(query: string, limit?: number): IndexedType[];
|
|
58
|
+
/**
|
|
59
|
+
* Get all types in a package.
|
|
60
|
+
*/
|
|
61
|
+
getTypesInPackage(packageName: string): IndexedType[];
|
|
62
|
+
/**
|
|
63
|
+
* Get total number of indexed types.
|
|
64
|
+
*/
|
|
65
|
+
get size(): number;
|
|
66
|
+
/**
|
|
67
|
+
* Clear the index.
|
|
68
|
+
*/
|
|
69
|
+
clear(): void;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=jar-index.d.ts.map
|