mirror of
https://github.com/adelphes/android-dev-ext.git
synced 2025-12-23 01:48:18 +00:00
add unqualified type members when inside a method
This commit is contained in:
@@ -381,6 +381,7 @@ async function getCompletionItems(params, liveParsers, androidLibrary) {
|
|||||||
|
|
||||||
let locals = [],
|
let locals = [],
|
||||||
modifiers = dct.modifiers,
|
modifiers = dct.modifiers,
|
||||||
|
type_members = [],
|
||||||
sourceTypes = [];
|
sourceTypes = [];
|
||||||
|
|
||||||
if (parsed.unit) {
|
if (parsed.unit) {
|
||||||
@@ -421,6 +422,12 @@ async function getCompletionItems(params, liveParsers, androidLibrary) {
|
|||||||
locals.push(...dct.instances);
|
locals.push(...dct.instances);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type_members = getTypedNameCompletion(
|
||||||
|
parsed.typemap,
|
||||||
|
options.method.owner.typeSignature,
|
||||||
|
{ statics: !!options.method.modifierTokens.find(m => m.value === 'static') }
|
||||||
|
);
|
||||||
|
|
||||||
// if we're inside a method, don't show the modifiers
|
// if we're inside a method, don't show the modifiers
|
||||||
modifiers = [];
|
modifiers = [];
|
||||||
}
|
}
|
||||||
@@ -451,6 +458,7 @@ async function getCompletionItems(params, liveParsers, androidLibrary) {
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
...locals,
|
...locals,
|
||||||
|
...type_members,
|
||||||
...dct.primitiveTypes,
|
...dct.primitiveTypes,
|
||||||
...dct.literals,
|
...dct.literals,
|
||||||
...modifiers,
|
...modifiers,
|
||||||
|
|||||||
Reference in New Issue
Block a user