File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
EmmyLua-Common/src/main/java/com/tang/intellij/lua/editor/completion Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -130,8 +130,8 @@ class LuaDocCompletionContributor : CompletionContributor() {
130130 val classType = classDef.type
131131 val ctx = SearchContext .get(classDef.project)
132132 classType.processMembers(ctx) { _, member ->
133- if (member is LuaClassField )
134- completionResultSet.addElement(LookupElementBuilder .create(member.name!! ).withIcon(LuaIcons .CLASS_FIELD ))
133+ if (member is LuaClassField && member.name != null )
134+ completionResultSet.addElement(LookupElementBuilder .create(member.name).withIcon(LuaIcons .CLASS_FIELD ))
135135 Unit
136136 }
137137 }
@@ -147,7 +147,11 @@ class LuaDocCompletionContributor : CompletionContributor() {
147147 val classType = seeRefTag.classNameRef?.resolveType() as ? ITyClass
148148 val ctx = SearchContext .get(seeRefTag.project)
149149 classType?.processMembers(ctx) { _, member ->
150- completionResultSet.addElement(LookupElementBuilder .create(member.name!! ).withIcon(LuaIcons .CLASS_FIELD ))
150+ if (member.name != null ) {
151+ completionResultSet.addElement(
152+ LookupElementBuilder .create(member.name!! ).withIcon(LuaIcons .CLASS_FIELD )
153+ )
154+ }
151155 Unit
152156 }
153157 }
You can’t perform that action at this time.
0 commit comments