Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-06-03 21:12:44 -0400
committerspingel2010-06-03 21:12:44 -0400
commit915cf74eb4c26aa3f441d7a5f68ad3b9a5a38ddf (patch)
treecdb1769d46aa2b6be70e44261237bbcdf101ff88 /org.eclipse.mylyn.tasks.search
parent4572884d3afcf9a09d6574de8096fa29b6a0f690 (diff)
downloadorg.eclipse.mylyn.tasks-915cf74eb4c26aa3f441d7a5f68ad3b9a5a38ddf.tar.gz
org.eclipse.mylyn.tasks-915cf74eb4c26aa3f441d7a5f68ad3b9a5a38ddf.tar.xz
org.eclipse.mylyn.tasks-915cf74eb4c26aa3f441d7a5f68ad3b9a5a38ddf.zip
NEW - bug 315513: [performance] reduce memory footprint
https://bugs.eclipse.org/bugs/show_bug.cgi?id=315513
Diffstat (limited to 'org.eclipse.mylyn.tasks.search')
-rw-r--r--org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultContentProvider.java3
-rw-r--r--org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultTreeContentProvider.java9
2 files changed, 10 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultContentProvider.java b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultContentProvider.java
index 98cb03481..977b8c046 100644
--- a/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultContentProvider.java
+++ b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultContentProvider.java
@@ -18,6 +18,7 @@ import org.eclipse.jface.viewers.Viewer;
* @author Rob Elves (moved into task.ui)
* @see org.eclipse.jface.viewers.IContentProvider
*/
+// TODO e3.5 merge into SearchResultTreeContentProvider
public abstract class SearchResultContentProvider implements ITreeContentProvider {
/** An empty array of objects */
@@ -33,6 +34,8 @@ public abstract class SearchResultContentProvider implements ITreeContentProvide
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
if (newInput instanceof RepositorySearchResult) {
initialize((RepositorySearchResult) newInput);
+ } else {
+ searchResult = null;
}
}
diff --git a/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultTreeContentProvider.java b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultTreeContentProvider.java
index 0afc59d6f..343a4b5aa 100644
--- a/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultTreeContentProvider.java
+++ b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultTreeContentProvider.java
@@ -54,6 +54,9 @@ public class SearchResultTreeContentProvider extends SearchResultContentProvider
searchResult = (RepositorySearchResult) newInput;
clear();
elementsChanged(searchResult.getElements());
+ } else {
+ searchResult = null;
+ clear();
}
}
@@ -111,13 +114,15 @@ public class SearchResultTreeContentProvider extends SearchResultContentProvider
if (task.isCompleted()) {
completeIncomplete = completeState.get(Messages.SearchResultTreeContentProvider_Complete);
if (completeIncomplete == null) {
- completeIncomplete = new TaskGroup("group-complete", Messages.SearchResultTreeContentProvider_Complete, GroupBy.COMPLETION.name()); //$NON-NLS-1$
+ completeIncomplete = new TaskGroup(
+ "group-complete", Messages.SearchResultTreeContentProvider_Complete, GroupBy.COMPLETION.name()); //$NON-NLS-1$
completeState.put(Messages.SearchResultTreeContentProvider_Complete, completeIncomplete);
}
} else {
completeIncomplete = completeState.get(Messages.SearchResultTreeContentProvider_Incomplete);
if (completeIncomplete == null) {
- completeIncomplete = new TaskGroup("group-incomplete", Messages.SearchResultTreeContentProvider_Incomplete, GroupBy.COMPLETION.name()); //$NON-NLS-1$
+ completeIncomplete = new TaskGroup(
+ "group-incomplete", Messages.SearchResultTreeContentProvider_Incomplete, GroupBy.COMPLETION.name()); //$NON-NLS-1$
completeState.put(Messages.SearchResultTreeContentProvider_Incomplete, completeIncomplete);
}
}

Back to the top