|
18 | 18 | package org.eclipse.e4.ui.workbench.renderers.swt;
|
19 | 19 |
|
20 | 20 | import java.lang.reflect.Field;
|
21 |
| -import java.util.Arrays; |
22 | 21 | import java.util.Objects;
|
23 | 22 | import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
24 | 23 | import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
|
|
34 | 33 | import org.eclipse.swt.SWT;
|
35 | 34 | import org.eclipse.swt.custom.CTabFolder;
|
36 | 35 | import org.eclipse.swt.custom.CTabFolderRenderer;
|
37 |
| -import org.eclipse.swt.custom.CTabItem; |
38 | 36 | import org.eclipse.swt.graphics.Color;
|
39 | 37 | import org.eclipse.swt.graphics.GC;
|
40 | 38 | import org.eclipse.swt.graphics.Image;
|
@@ -90,7 +88,7 @@ public class CTabRendering extends CTabFolderRenderer implements ICTabRendering,
|
90 | 88 | public static final boolean SHOW_FULL_TEXT_FOR_VIEW_TABS_DEFAULT = false;
|
91 | 89 |
|
92 | 90 | private static int MIN_VIEW_CHARS = 1;
|
93 |
| - private static int MAX_VIEW_CHARS = 9999; |
| 91 | + private static int MAX_VIEW_CHARS = 999999; |
94 | 92 |
|
95 | 93 | // Constants for circle drawing
|
96 | 94 | static enum CirclePart {
|
@@ -1305,9 +1303,7 @@ private void showFullTextForViewTabsPreferenceChanged() {
|
1305 | 1303 | boolean showFullText = getShowFullTextForViewTabsPreference();
|
1306 | 1304 | if (!isPartOfEditorStack()) {
|
1307 | 1305 | if (showFullText) {
|
1308 |
| - int lengthOfLongestItemText = Arrays.stream(parent.getItems()).map(CTabItem::getText) |
1309 |
| - .map(String::length).max(Integer::compare).orElse(0); |
1310 |
| - parent.setMinimumCharacters(Math.max(MAX_VIEW_CHARS, lengthOfLongestItemText)); |
| 1306 | + parent.setMinimumCharacters(MAX_VIEW_CHARS); |
1311 | 1307 | } else {
|
1312 | 1308 | parent.setMinimumCharacters(MIN_VIEW_CHARS);
|
1313 | 1309 | }
|
|
0 commit comments