Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2012-04-05 09:01:03 +0000
committerDani Megert2012-04-05 09:01:03 +0000
commit266c1b8718ae1ad4a13c26f5cf0f0913250b1855 (patch)
treeddc45189a2d7db8853096c5cd42ca8d158c1f250 /org.eclipse.search
parente414aee94b0ec1e061c130b1408256ba52c875df (diff)
downloadeclipse.platform.text-266c1b8718ae1ad4a13c26f5cf0f0913250b1855.tar.gz
eclipse.platform.text-266c1b8718ae1ad4a13c26f5cf0f0913250b1855.tar.xz
eclipse.platform.text-266c1b8718ae1ad4a13c26f5cf0f0913250b1855.zip
Diffstat (limited to 'org.eclipse.search')
-rw-r--r--org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchViewManager.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchViewManager.java b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchViewManager.java
index 6645088d9..017c558c2 100644
--- a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchViewManager.java
+++ b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchViewManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
@@ -22,6 +22,7 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchException;
import org.eclipse.search.internal.ui.SearchPlugin;
+import org.eclipse.search.internal.ui.SearchPreferencePage;
import org.eclipse.search.internal.ui.util.ExceptionHandler;
import org.eclipse.search.ui.IQueryListener;
import org.eclipse.search.ui.ISearchQuery;
@@ -94,16 +95,18 @@ public class SearchViewManager {
if (activePage != null) {
try {
ISearchResultViewPart viewPart= null;
- if (!openInNew)
+ if (!openInNew) {
viewPart= findLRUSearchResultView(activePage, avoidPinnedViews);
+ }
String secondaryId= null;
if (viewPart == null) {
- if (activePage.findViewReference(NewSearchUI.SEARCH_VIEW_ID) != null) {
+ if (activePage.findViewReference(NewSearchUI.SEARCH_VIEW_ID) != null)
secondaryId= String.valueOf(++fViewCount); // avoid a secondary ID because of bug 125315
- }
- } else {
+ } else if (!SearchPreferencePage.isViewBroughtToFront())
+ return viewPart;
+ else
secondaryId= viewPart.getViewSite().getSecondaryId();
- }
+
return (ISearchResultViewPart) activePage.showView(NewSearchUI.SEARCH_VIEW_ID, secondaryId, IWorkbenchPage.VIEW_ACTIVATE);
} catch (PartInitException ex) {
ExceptionHandler.handle(ex, SearchMessages.Search_Error_openResultView_title, SearchMessages.Search_Error_openResultView_message);

Back to the top