Skip to content

Commit

Permalink
Enable viewer limits by default
Browse files Browse the repository at this point in the history
Set default workbench preference for the view limit to 1000, which is
what we believe the most practical value on most platforms to avoid UI
freezes in large viewers.

Note: this limit can also be disabled in products by specifying
`org.eclipse.ui.workbench/largeViewLimit=0` in the
plugin_customization.ini file.

Fixes eclipse-platform#1425
  • Loading branch information
iloveeclipse authored and amartya4256 committed Feb 8, 2024
1 parent 012385c commit 55900f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ public void initializeDefaultPreferences() {

node.putInt(IWorkbenchPreferenceConstants.DISPOSE_CLOSED_BROWSER_HOVER_TIMEOUT, -1);

// Disable viewer limit configuration until more testing and stabilization.
node.putInt(IWorkbenchPreferenceConstants.LARGE_VIEW_LIMIT, 0);
// Don't show more than 1000 child elements per parent by default
node.putInt(IWorkbenchPreferenceConstants.LARGE_VIEW_LIMIT, 1000);

node.put(IWorkbenchPreferenceConstants.RESOURCE_RENAME_MODE,
IWorkbenchPreferenceConstants.RESOURCE_RENAME_MODE_INLINE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ protected void doSetUp() throws Exception {
super.doSetUp();
cleanUp();
preferenceStore = WorkbenchPlugin.getDefault().getPreferenceStore();
// TODO: preference is set to zero, enable once preference is restored
// int viewLimit = preferenceStore.getInt(IWorkbenchPreferenceConstants.LARGE_VIEW_LIMIT);
// assertEquals("Default viewer limit must be " + DEFAULT_VIEW_LIMIT, DEFAULT_VIEW_LIMIT, viewLimit);
int viewLimit = preferenceStore.getInt(IWorkbenchPreferenceConstants.LARGE_VIEW_LIMIT);
assertEquals("Default viewer limit must be " + DEFAULT_VIEW_LIMIT, DEFAULT_VIEW_LIMIT, viewLimit);
window = getActiveWindow();
activePage = window.getActivePage();
defaultPerspective = activePage.getPerspective();
Expand Down

0 comments on commit 55900f3

Please sign in to comment.