From 33bb61f94806a8f2b415bc77c650dd3262824e00 Mon Sep 17 00:00:00 2001 From: Christian Vette Date: Mon, 12 Mar 2018 21:11:47 +0100 Subject: [PATCH] TASK: Improve Prototype completion provider --- .../idea/neos/lang/fusion/completion/PrototypeProvider.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/vette/idea/neos/lang/fusion/completion/PrototypeProvider.java b/src/main/java/de/vette/idea/neos/lang/fusion/completion/PrototypeProvider.java index 56eb3140..466f45aa 100644 --- a/src/main/java/de/vette/idea/neos/lang/fusion/completion/PrototypeProvider.java +++ b/src/main/java/de/vette/idea/neos/lang/fusion/completion/PrototypeProvider.java @@ -43,7 +43,9 @@ protected void addCompletions(@NotNull CompletionParameters parameters, Processi for (String key : keys) { Collection prototypes = StubIndex.getElements(FusionPrototypeDeclarationIndex.KEY, key, project, GlobalSearchScope.projectScope(project), FusionPrototypeSignature.class ); for (FusionPrototypeSignature signature : prototypes) { - result.addElement(LookupElementBuilder.create(signature.getType()).withIcon(FusionIcons.PROTOTYPE)); + if (signature.getType() != null) { + result.addElement(LookupElementBuilder.create(signature.getType().getText()).withIcon(FusionIcons.PROTOTYPE)); + } } } }