Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 190139 Details for
Bug 338531
Wrong ordering of elements in WorkingSetModel.fAllWorkingSets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch
patch_workingsetfail.txt (text/plain), 3.83 KB, created by
Raksha Vasisht
on 2011-03-02 07:54:58 EST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Raksha Vasisht
Created:
2011-03-02 07:54:58 EST
Size:
3.83 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java,v >retrieving revision 1.329 >diff -u -r1.329 PackageExplorerPart.java >--- ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java 1 Mar 2011 12:47:34 -0000 1.329 >+++ ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java 2 Mar 2011 12:48:28 -0000 >@@ -1510,7 +1510,7 @@ > public void internalTestShowWorkingSets(IWorkingSet[] workingSets) { > if (fWorkingSetModel == null) > createWorkingSetModel(); >- fWorkingSetModel.setWorkingSets(workingSets, false, workingSets); >+ fWorkingSetModel.setActiveWorkingSets(workingSets); > fWorkingSetModel.configured(); > rootModeChanged(PackageExplorerPart.WORKING_SETS_AS_ROOTS); > } >Index: ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetModel.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetModel.java,v >retrieving revision 1.40 >diff -u -r1.40 WorkingSetModel.java >--- ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetModel.java 1 Mar 2011 12:49:35 -0000 1.40 >+++ ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetModel.java 2 Mar 2011 12:48:28 -0000 >@@ -438,12 +438,31 @@ > Arrays.sort(workingSets, new WorkingSetComparator(true)); > } > fActiveWorkingSets= new ArrayList<IWorkingSet>(Arrays.asList(workingSets)); >+ if (isOrderDifferentInWorkingSetLists()) { //see bug 338531 >+ fAllWorkingSets= getActiveAndAllWorkingSetsFromManagers(); >+ } > fElementMapper.rebuild(getActiveWorkingSets()); > fOthersWorkingSetUpdater.updateElements(); > fireEvent(new PropertyChangeEvent(this, CHANGE_WORKING_SET_MODEL_CONTENT, null, null)); > } > > /** >+ * Checks if the order is different in the active and all working set lists. >+ * >+ * @return <code>true</code> if the order is different, <code>false</code> otherwise >+ * @since 3.7 >+ */ >+ private boolean isOrderDifferentInWorkingSetLists() { >+ List<IWorkingSet> active= new ArrayList<IWorkingSet>(); >+ for (Iterator<IWorkingSet> iter= fAllWorkingSets.iterator(); iter.hasNext();) { >+ IWorkingSet set= iter.next(); >+ if (fActiveWorkingSets.contains(set)) >+ active.add(set); >+ } >+ return !fActiveWorkingSets.equals(active); >+ } >+ >+ /** > * Sets the active working sets. > * > * @param workingSets the array of working sets >@@ -564,7 +583,7 @@ > List<IWorkingSet> allElements= new ArrayList<IWorkingSet>(Arrays.asList(getAllWorkingSets())); > if (!allElements.contains(workingSet)) > allElements.add(workingSet); >- setWorkingSets(allElements.toArray(new IWorkingSet[elements.size()]), fIsSortingEnabled, elements.toArray(new IWorkingSet[elements.size()])); >+ setWorkingSets(allElements.toArray(new IWorkingSet[allElements.size()]), fIsSortingEnabled, elements.toArray(new IWorkingSet[elements.size()])); > } > } > } >@@ -585,7 +604,7 @@ > elements.remove(workingSet); > List<IWorkingSet> allElements= new ArrayList<IWorkingSet>(Arrays.asList(getAllWorkingSets())); > allElements.remove(workingSet); >- setWorkingSets(allElements.toArray(new IWorkingSet[elements.size()]), fIsSortingEnabled, elements.toArray(new IWorkingSet[elements.size()])); >+ setWorkingSets(allElements.toArray(new IWorkingSet[allElements.size()]), fIsSortingEnabled, elements.toArray(new IWorkingSet[elements.size()])); > } else if (IWorkingSetManager.CHANGE_WORKING_SET_LABEL_CHANGE.equals(property)) { > IWorkingSet workingSet= (IWorkingSet)event.getNewValue(); > if (isSortingEnabled() && Arrays.asList(getAllWorkingSets()).contains(workingSet)) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
daniel_megert
:
review-
Actions:
View
|
Diff
Attachments on
bug 338531
:
190139
|
190159
|
190435