mirror of
https://github.com/adelphes/android-dev-ext.git
synced 2025-12-26 11:28:04 +00:00
hide some method modifiers which aren't useful to show
This commit is contained in:
@@ -58,7 +58,6 @@ function getTypedNameCompletion(typemap, type_signature, opts, typelist) {
|
|||||||
*/
|
*/
|
||||||
function shouldInclude(modifiers, t) {
|
function shouldInclude(modifiers, t) {
|
||||||
if (opts.statics !== modifiers.includes('static')) return;
|
if (opts.statics !== modifiers.includes('static')) return;
|
||||||
if (modifiers.includes('abstract')) return;
|
|
||||||
if (modifiers.includes('public')) return true;
|
if (modifiers.includes('public')) return true;
|
||||||
if (modifiers.includes('protected')) return true;
|
if (modifiers.includes('protected')) return true;
|
||||||
if (modifiers.includes('private') && t === type) return true;
|
if (modifiers.includes('private') && t === type) return true;
|
||||||
@@ -387,7 +386,7 @@ function resolveCompletionItem(item) {
|
|||||||
documentation = field.docs;
|
documentation = field.docs;
|
||||||
header = `${field.type.simpleTypeName} **${field.name}**`;
|
header = `${field.type.simpleTypeName} **${field.name}**`;
|
||||||
} else if (method) {
|
} else if (method) {
|
||||||
detail = `${method.modifiers.join(' ')} ${t.simpleTypeName}.${method.name}`;
|
detail = `${method.modifiers.filter(m => !/abstract|transient|native/.test(m)).join(' ')} ${t.simpleTypeName}.${method.name}`;
|
||||||
documentation = method.docs;
|
documentation = method.docs;
|
||||||
header = method.shortlabel.replace(/^\w+/, x => `**${x}**`).replace(/^(.+?)\s*:\s*(.+)/, (_,a,b) => `${b} ${a}`);
|
header = method.shortlabel.replace(/^\w+/, x => `**${x}**`).replace(/^(.+?)\s*:\s*(.+)/, (_,a,b) => `${b} ${a}`);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user