Skip to content

Commit

Permalink
Added N&N about viewer limit
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveeclipse committed Dec 19, 2023
1 parent bf7d0ed commit 3b38381
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 0 deletions.
Binary file added news/4.31/images/limit_in_junit_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added news/4.31/images/limit_in_outline_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added news/4.31/images/limit_in_package_explorer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added news/4.31/images/limit_in_problems_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added news/4.31/images/limit_in_project_explorer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added news/4.31/images/viewer_limit_preference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions news/4.31/platform.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,51 @@ <h2>Platform and Equinox</h2>
<h2>Views, Dialogs and Toolbar </h2>
</td>
</tr>

<tr id="viewer_limit_applied"> <!-- https://github.com/eclipse-platform/eclipse.platform.ui/issues/1425 -->
<td class="title">Viewer Limit in Workbench</td>
<td class="content">
<p>
Few most commonly used Eclipse views have enabled incremental view updates.
These views will limit initially shown number of children to 1000 per parent element, and allow displaying next
batch of elements if requested. This increment number can be configured in the
<code>Preferences -> General -> Initial maximum number of elements shown in views</code>.
</p>
<p><img src="images/viewer_limit_preference.png" alt="New preference"/></p>
<p>
Note, that also other (3rd party) views can read the preference and enable
this feature, but that must be explicitly done for each view.
</p>
<p>
Incremental view updates feature was added to avoid UI freezes in large viewers, where SWT/JFace
hit the limits of the underlying native widget machinery while trying to render
thousands of elements, leading to minute lang UI freezes.
</p>
<p>
Incremental view update feature is currently enabled in the following views:
</p>
<ol>
<li>Package Explorer</li>
<li>Project Explorer</li>
<li>Problems View</li>
<li>Java Outline View</li>
<li>JUnit View</li>
</ol>
<p><img src="images/limit_in_package_explorer.png" alt="Package Explorer"/></p>
<p><img src="images/limit_in_project_explorer.png" alt="Project Explorer"/></p>
<p><img src="images/limit_in_problems_view.png" alt="Problems View"/></p>
<p><img src="images/limit_in_outline_view.png" alt="Java Outline"/></p>
<p><img src="images/limit_in_junit_view.png" alt="JUnit View"/></p>
<p>
This new preference can be disabled in products by specifying
<code>org.eclipse.ui.workbench/largeViewLimit=0</code> in the
<code>plugin_customization.ini</code> file or via Oomph.
In the same way the preference can be changed for products that need a lower
or higher limit.
</p>
</td>
</tr>

<!-- ******************* End of Views, Dialogs and Toolbar ************************************* -->

<!-- ******************* Text Editors ************************************* -->
Expand Down
36 changes: 36 additions & 0 deletions news/4.31/platform_isv.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,42 @@ <h2>Platform and Equinox API</h2>
<tr>
<td id="Platform" class="section" colspan="2"><h2>Platform Changes</h2></td>
</tr>

<tr id="viewer_limit_jface"> <!-- https://github.com/eclipse-platform/eclipse.platform.ui/issues/1425 -->
<td class="title">Viewer Limit in JFace</td>
<td class="content">
<p>
<code>org.eclipse.jface.viewers.ColumnViewer.setDisplayIncrementally(int incrementSize)</code> API was added to
JFace. If <code>incrementSize</code> is set to some positive value, viewer will show
initially not more as this number of child elements per parent.
Additionally, viewer will also provide a way to user to show more elements if available/needed.
This API solves the problem with UI hangs in case viewer tries to display a large number of child elements per parent.
</p>
<p>
This feature is currently implemented in <code>org.eclipse.jface.viewers.TableViewer</code>
and <code>org.eclipse.jface.viewers.TreeViewer</code> but not enabled by default
(<code>incrementSize</code> is zero by default).
Each concrete viewer implementation is responsible to enable this feature if needed.
</p>
<p>Note, that even if it was designed to be backwards compatible API (as much as possible),
there could be some regressions while converting existing viewers code to use
the new API. Please consider to test carefully your code if enabling this functionality!
</p>
</td>
</tr>

<tr id="viewer_limit_workbench"> <!-- https://github.com/eclipse-platform/eclipse.platform.ui/issues/1425 -->
<td class="title">Viewer Limit in Workbench</td>
<td class="content">
<p>Complementary to the JFace API above, <code>org.eclipse.ui.IWorkbenchPreferenceConstants</code> and
<code>org.eclipse.ui.views.WorkbenchViewerSetup</code> API's were added.
This API provides default workbench preference access and convenient way for Viewers
that want apply default workbench value and don't want to write extra code to
keep watching for preference change.
</p>
</td>
</tr>

<!-- ******************** End of Platform ********************** -->

<!-- *********************** SWT *********************** -->
Expand Down

0 comments on commit 3b38381

Please sign in to comment.