diff --git a/org.eclipse.lsp4e/src/org/eclipse/lsp4e/outline/LSSymbolsContentProvider.java b/org.eclipse.lsp4e/src/org/eclipse/lsp4e/outline/LSSymbolsContentProvider.java index 51dd6b8c0..823cf32fa 100644 --- a/org.eclipse.lsp4e/src/org/eclipse/lsp4e/outline/LSSymbolsContentProvider.java +++ b/org.eclipse.lsp4e/src/org/eclipse/lsp4e/outline/LSSymbolsContentProvider.java @@ -63,6 +63,7 @@ import org.eclipse.ui.navigator.ICommonContentProvider; import org.eclipse.ui.progress.PendingUpdateAdapter; import org.eclipse.ui.texteditor.ITextEditor; +import org.eclipse.ui.views.WorkbenchViewerSetup; public class LSSymbolsContentProvider implements ICommonContentProvider, ITreeContentProvider { @@ -256,6 +257,10 @@ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { } this.viewer = (TreeViewer) viewer; + + // this enables limiting the number of outline entries to mitigate UI freezes + WorkbenchViewerSetup.setupViewer(this.viewer); + isQuickOutline = Boolean.TRUE.equals(viewer.getData(VIEWER_PROPERTY_IS_QUICK_OUTLINE)); outlineViewerInput = (OutlineViewerInput) newInput;