Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2017-11-30 17:51:13 -0500
committerAndrey Loskutov2017-11-30 17:51:13 -0500
commit13f734bdd7951d8b59cfd73ae8cbc2793f76bf0f (patch)
tree23452f01d7063bf8e0233ff2f86511741ed760f0 /org.eclipse.ui.genericeditor
parentc321f97bf2ad7e675516ee4b44595dd96bddcd96 (diff)
downloadeclipse.platform.text-13f734bdd7951d8b59cfd73ae8cbc2793f76bf0f.tar.gz
eclipse.platform.text-13f734bdd7951d8b59cfd73ae8cbc2793f76bf0f.tar.xz
eclipse.platform.text-13f734bdd7951d8b59cfd73ae8cbc2793f76bf0f.zip
Bug 527978 - NPE in ContentAssistant.computeCompletionProposalsI20171130-2100I20171130-2000
Change-Id: Icabb6d9e3b43a782c1159b52a953d97aacaf6c63 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.ui.genericeditor')
-rw-r--r--org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/CompositeContentAssistProcessor.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/CompositeContentAssistProcessor.java b/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/CompositeContentAssistProcessor.java
index f3c9a9775..06ca42db1 100644
--- a/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/CompositeContentAssistProcessor.java
+++ b/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/CompositeContentAssistProcessor.java
@@ -46,7 +46,10 @@ public class CompositeContentAssistProcessor implements IContentAssistProcessor
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
List<ICompletionProposal> res = new ArrayList<>();
for (IContentAssistProcessor processor : this.fContentAssistProcessors) {
- res.addAll(Arrays.asList(processor.computeCompletionProposals(viewer, offset)));
+ ICompletionProposal[] proposals = processor.computeCompletionProposals(viewer, offset);
+ if (proposals != null) {
+ res.addAll(Arrays.asList(proposals));
+ }
}
return res.toArray(new ICompletionProposal[res.size()]);
}

Back to the top