summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorRemy Suen2011-07-28 12:18:36 (EDT)
committer Paul Webster2011-08-25 10:21:58 (EDT)
commit74f3c6efc40a39b1f148206e97a20fbd8e77680c (patch)
treeed81a9e80e3fafeff226d7bf48e2c4cb73851d83
parentb91f2796072d70f36a3654d0463e2ddeaa9cd6a3 (diff)
downloadeclipse.platform.ui-74f3c6efc40a39b1f148206e97a20fbd8e77680c.zip
eclipse.platform.ui-74f3c6efc40a39b1f148206e97a20fbd8e77680c.tar.gz
eclipse.platform.ui-74f3c6efc40a39b1f148206e97a20fbd8e77680c.tar.bz2
Bug 353342 [Compatibility] IWorkingSetManager's
testRecentWorkingSetsLength is failing Since the working set manager now supports the setting of the number of recent working sets to remember, the constant that was originally defined is no longer required. The manager should instead size itself based on the defined number of recent working sets to remember.
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractWorkingSetManager.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractWorkingSetManager.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractWorkingSetManager.java
index 92584ee..fd3d8f2 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractWorkingSetManager.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractWorkingSetManager.java
@@ -100,10 +100,6 @@ public abstract class AbstractWorkingSetManager extends EventManager implements
}
});
- /**
- * Size of the list of most recently used working sets.
- */
- private static final int MRU_SIZE = 5;
private List recentWorkingSets = new ArrayList();
private BundleContext bundleContext;
@@ -323,9 +319,7 @@ public abstract class AbstractWorkingSetManager extends EventManager implements
}
recentWorkingSets.remove(workingSet);
recentWorkingSets.add(0, workingSet);
- if (recentWorkingSets.size() > MRU_SIZE) {
- recentWorkingSets.remove(MRU_SIZE);
- }
+ sizeRecentWorkingSets();
}
//---- equals and hash code -----------------------------------------------