Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2010-07-29 12:19:06 +0000
committerDani Megert2010-07-29 12:19:06 +0000
commit0efd62a8f148cfa537b4783760bbcfc22e6364fb (patch)
tree3382c738a3951e1f92adb6f2fd5b6fbb0279d872 /org.eclipse.search/new search/org
parent9d3544ab3f9bb2c542d07c6785431d6da22afd42 (diff)
downloadeclipse.platform.text-0efd62a8f148cfa537b4783760bbcfc22e6364fb.tar.gz
eclipse.platform.text-0efd62a8f148cfa537b4783760bbcfc22e6364fb.tar.xz
eclipse.platform.text-0efd62a8f148cfa537b4783760bbcfc22e6364fb.zip
Show latest search when opening the Seach view.
Diffstat (limited to 'org.eclipse.search/new search/org')
-rw-r--r--org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java
index 4568226b5b2..deaf1e7d4e3 100644
--- a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java
+++ b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -499,6 +499,8 @@ public class SearchView extends PageBookView implements ISearchResultViewPart, I
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, ISearchHelpContextIds.New_SEARCH_VIEW);
restorePageFromMemento();
+
+ showLatestSearch();
}
private void initializePageSwitcher() {
@@ -706,6 +708,12 @@ public class SearchView extends PageBookView implements ISearchResultViewPart, I
srPage.restoreState(memento);
}
+ private void showLatestSearch() {
+ ISearchQuery[] queries= InternalSearchUI.getInstance().getSearchManager().getQueries();
+ if (queries.length > 0)
+ showSearchResult(queries[0].getSearchResult());
+ }
+
/*
* TODO workaround for focus problem. Clarify focus behavior.
* @see org.eclipse.ui.IWorkbenchPart#setFocus()

Back to the top