mirror of
https://github.com/adelphes/android-dev-ext.git
synced 2025-12-23 01:48:18 +00:00
use exact type signatures for locating types for completion items
This commit is contained in:
@@ -347,7 +347,7 @@ function packageDeclaration(tokens) {
|
||||
*/
|
||||
function importDeclaration(tokens, typemap) {
|
||||
tokens.mark();
|
||||
tokens.current.loc = 'fqn:';
|
||||
tokens.current.loc = 'fqdi:';
|
||||
tokens.expectValue('import');
|
||||
const static_token = tokens.getIfValue('static');
|
||||
let asterisk_token = null, dot;
|
||||
@@ -359,12 +359,12 @@ function importDeclaration(tokens, typemap) {
|
||||
addproblem(tokens, ParseProblem.Error(tokens.current, `Package identifier expected`));
|
||||
}
|
||||
if (name) {
|
||||
name.loc = `fqn:${pkg_name_parts.join('.')}`;
|
||||
name.loc = `fqdi:${pkg_name_parts.join('.')}`;
|
||||
pkg_token_parts.push(name);
|
||||
pkg_name_parts.push(name.value);
|
||||
}
|
||||
if (dot = tokens.getIfValue('.')) {
|
||||
dot.loc = `fqn:${pkg_name_parts.join('.')}`;
|
||||
dot.loc = `fqdi:${pkg_name_parts.join('.')}`;
|
||||
if (!(asterisk_token = tokens.getIfValue('*'))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class MemberExpression extends Expression {
|
||||
}
|
||||
|
||||
if (instance instanceof PackageNameType) {
|
||||
this.dot.loc = `fqs:${instance.package_name}`;
|
||||
this.dot.loc = `fqdi:${instance.package_name}`;
|
||||
if (!this.member) {
|
||||
return instance;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ class MemberExpression extends Expression {
|
||||
return AnyType.Instance;
|
||||
}
|
||||
|
||||
this.dot.loc = `${loc}:${instance.fullyDottedTypeName}`
|
||||
this.dot.loc = `${loc}:${instance.typeSignature}`
|
||||
if (!this.member) {
|
||||
ri.problems.push(ParseProblem.Error(this.dot, `Identifier expected`));
|
||||
return instance;
|
||||
|
||||
Reference in New Issue
Block a user