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 65986 Details for
Bug 153573
support filtering top level task list elements, e.g. via working sets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
handle removing deleted elements from the working set
clipboard16763.txt (text/plain), 2.06 KB, created by
Eugene Kuleshov
on 2007-05-04 20:56:07 EDT
(
hide
)
Description:
handle removing deleted elements from the working set
Filename:
MIME Type:
Creator:
Eugene Kuleshov
Created:
2007-05-04 20:56:07 EDT
Size:
2.06 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylar.tasks.ui >Index: src/org/eclipse/mylar/internal/tasks/ui/workingset/TaskWorkingSetUpdater.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.mylar/org.eclipse.mylar.tasks.ui/src/org/eclipse/mylar/internal/tasks/ui/workingset/TaskWorkingSetUpdater.java,v >retrieving revision 1.1 >diff -u -r1.1 TaskWorkingSetUpdater.java >--- src/org/eclipse/mylar/internal/tasks/ui/workingset/TaskWorkingSetUpdater.java 5 May 2007 00:03:10 -0000 1.1 >+++ src/org/eclipse/mylar/internal/tasks/ui/workingset/TaskWorkingSetUpdater.java 5 May 2007 00:54:13 -0000 >@@ -9,8 +9,10 @@ > package org.eclipse.mylar.internal.tasks.ui.workingset; > > import java.util.ArrayList; >+import java.util.Arrays; > import java.util.List; > >+import org.eclipse.core.runtime.IAdaptable; > import org.eclipse.mylar.tasks.core.AbstractTaskContainer; > import org.eclipse.mylar.tasks.core.ITask; > import org.eclipse.mylar.tasks.core.ITaskListChangeListener; >@@ -62,11 +64,27 @@ > } > > public void containerDeleted(AbstractTaskContainer container) { >- // XXX remove container from working set >+ synchronized (workingSets) { >+ for (IWorkingSet workingSet : workingSets) { >+ // TODO could filter by working set id >+ ArrayList<IAdaptable> remove = new ArrayList<IAdaptable>(); >+ for (IAdaptable adaptable : workingSet.getElements()) { >+ if (adaptable instanceof AbstractTaskContainer >+ && ((AbstractTaskContainer) adaptable).getHandleIdentifier().equals( >+ container.getHandleIdentifier())) { >+ remove.add(adaptable); >+ } >+ } >+ if(!remove.isEmpty()) { >+ ArrayList<IAdaptable> elements = new ArrayList<IAdaptable>(Arrays.asList(workingSet.getElements())); >+ elements.removeAll(remove); >+ workingSet.setElements(elements.toArray(new IAdaptable[elements.size()])); >+ } >+ } >+ } > } > > public void containerInfoChanged(AbstractTaskContainer container) { >- // XXX need to do anything? > } > > public void localInfoChanged(ITask task) {
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
Actions:
View
|
Diff
Attachments on
bug 153573
:
65721
|
65722
| 65986 |
65991
|
65992