diff options
author | Christian Dietrich | 2018-08-10 16:34:48 +0000 |
---|---|---|
committer | Andrey Loskutov | 2018-08-11 20:26:50 +0000 |
commit | 03eaf378e3ebbb6a7c9c4776319201f80acc6f05 (patch) | |
tree | b1f01545dc8d877d64557f4c7a440da86ebae2b1 /org.eclipse.ui.genericeditor | |
parent | 6c6aae6bed242e6de3183a4a53c8851573c91b74 (diff) | |
download | eclipse.platform.text-03eaf378e3ebbb6a7c9c4776319201f80acc6f05.tar.gz eclipse.platform.text-03eaf378e3ebbb6a7c9c4776319201f80acc6f05.tar.xz eclipse.platform.text-03eaf378e3ebbb6a7c9c4776319201f80acc6f05.zip |
Bug 537719 - Proper treatment of null as a return value from proposal andI20180814-0910I20180814-0900I20180813-2000I20180812-2000
context information providers
Change-Id: Icade86ba7a772b2d3ee5ff09ed23c35e5677af74
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
Diffstat (limited to 'org.eclipse.ui.genericeditor')
-rw-r--r-- | org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/CompositeContentAssistProcessor.java | 5 |
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 06ca42db162..b270e15da3b 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 @@ -58,7 +58,10 @@ public class CompositeContentAssistProcessor implements IContentAssistProcessor public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) { List<IContextInformation> res = new ArrayList<>(); for (IContentAssistProcessor processor : this.fContentAssistProcessors) { - res.addAll(Arrays.asList(processor.computeContextInformation(viewer, offset))); + IContextInformation[] contextInformation = processor.computeContextInformation(viewer, offset); + if (contextInformation != null) { + res.addAll(Arrays.asList(contextInformation)); + } } return res.toArray(new IContextInformation[res.size()]); } |