Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2017-01-19 15:11:30 -0500
committerDani Megert2017-01-19 15:11:30 -0500
commit889d3c82bc8592914b11549d395f58ae6fb3d8ab (patch)
treeff393590d28db8df6ef5ea09e963ffdc375ef30b /org.eclipse.ui.genericeditor
parentaf4d8cf0a424c87ca13bebe9a4918175393f4ef6 (diff)
downloadeclipse.platform.text-889d3c82bc8592914b11549d395f58ae6fb3d8ab.tar.gz
eclipse.platform.text-889d3c82bc8592914b11549d395f58ae6fb3d8ab.tar.xz
eclipse.platform.text-889d3c82bc8592914b11549d395f58ae6fb3d8ab.zip
Polish bug 251156: [content assist] Asynchronous code completion [with patch]I20170120-2000I20170119-2000
Diffstat (limited to 'org.eclipse.ui.genericeditor')
-rw-r--r--org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/ExtensionBasedTextViewerConfiguration.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/ExtensionBasedTextViewerConfiguration.java b/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/ExtensionBasedTextViewerConfiguration.java
index 61b3c0836..0b5aa832f 100644
--- a/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/ExtensionBasedTextViewerConfiguration.java
+++ b/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/ExtensionBasedTextViewerConfiguration.java
@@ -17,27 +17,32 @@ import java.util.List;
import java.util.Queue;
import java.util.Set;
+import org.eclipse.swt.widgets.Shell;
+
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.content.IContentType;
+
import org.eclipse.jface.preference.IPreferenceStore;
+
import org.eclipse.jface.text.AbstractReusableInformationControlCreator;
import org.eclipse.jface.text.DefaultInformationControl;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentPartitioningListener;
import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.ITextHover;
-import org.eclipse.jface.text.contentassist.AsyncContentAssistant;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.contentassist.IContentAssistant;
import org.eclipse.jface.text.presentation.IPresentationReconciler;
import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.swt.widgets.Shell;
+
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPropertyListener;
-import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
+
import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
+
/**
* The configuration of the {@link ExtensionBasedTextEditor}. It registers the proxy composite
* for hover, completion, syntax highlighting, and then those proxy take care of resolving to
@@ -50,7 +55,8 @@ public final class ExtensionBasedTextViewerConfiguration extends TextSourceViewe
private ITextEditor editor;
private Set<IContentType> contentTypes;
private IDocument document;
- private AsyncContentAssistant contentAssistant;
+
+ private ContentAssistant contentAssistant;
private List<IContentAssistProcessor> processors;
/**
@@ -96,7 +102,7 @@ public final class ExtensionBasedTextViewerConfiguration extends TextSourceViewe
@Override
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
ContentAssistProcessorRegistry registry= GenericEditorPlugin.getDefault().getContentAssistProcessorRegistry();
- contentAssistant = new AsyncContentAssistant();
+ contentAssistant= new ContentAssistant(true);
contentAssistant.setContextInformationPopupOrientation(ContentAssistant.CONTEXT_INFO_BELOW);
contentAssistant.setProposalPopupOrientation(ContentAssistant.PROPOSAL_REMOVE);
contentAssistant.enableColoredLabels(true);

Back to the top