Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2011-12-15 15:55:20 +0000
committerDani Megert2011-12-15 15:55:20 +0000
commitc949d80f0dbcd3579db24de3d55babb130fb984c (patch)
tree79cc598ff19c0e19391c8a44fbbbc334668058a8 /org.eclipse.search
parent421a68a7bb7a23719f5f97ad94b60863f8d2d67e (diff)
downloadeclipse.platform.text-c949d80f0dbcd3579db24de3d55babb130fb984c.tar.gz
eclipse.platform.text-c949d80f0dbcd3579db24de3d55babb130fb984c.tar.xz
eclipse.platform.text-c949d80f0dbcd3579db24de3d55babb130fb984c.zip
Fixed bug 339340: Search history "Open in new" only allows you to openv20111215-1555
one additional Search view
Diffstat (limited to 'org.eclipse.search')
-rw-r--r--org.eclipse.search/new search/org/eclipse/search2/internal/ui/InternalSearchUI.java17
-rw-r--r--org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchViewManager.java12
2 files changed, 13 insertions, 16 deletions
diff --git a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/InternalSearchUI.java b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/InternalSearchUI.java
index ca2e306a7..1735ee3bb 100644
--- a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/InternalSearchUI.java
+++ b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/InternalSearchUI.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 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
@@ -338,18 +338,9 @@ public class InternalSearchUI {
}
public void showSearchResult(SearchView searchView, ISearchResult result, boolean openInNew) {
- if (openInNew) {
- boolean isPinned= searchView.isPinned();
- searchView.setPinned(true);
- try {
- SearchView newPart= (SearchView) getSearchViewManager().activateSearchView(true);
- showSearchResult(newPart, result);
- } finally {
- searchView.setPinned(isPinned);
- }
- } else {
- showSearchResult(searchView, result);
- }
+ if (openInNew)
+ searchView= (SearchView)getSearchViewManager().activateSearchView(true, openInNew);
+ showSearchResult(searchView, result);
}
private void showSearchResult(SearchView searchView, ISearchResult result) {
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 e6acc2ccd..6645088d9 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, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 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
@@ -73,7 +73,11 @@ public class SearchViewManager {
return false;
}
- public ISearchResultViewPart activateSearchView(boolean useForNewSearch) {
+ public ISearchResultViewPart activateSearchView(boolean avoidPinnedViews) {
+ return activateSearchView(avoidPinnedViews, false);
+ }
+
+ public ISearchResultViewPart activateSearchView(boolean avoidPinnedViews, boolean openInNew) {
IWorkbenchPage activePage= SearchPlugin.getActivePage();
String defaultPerspectiveId= NewSearchUI.getDefaultPerspectiveId();
@@ -89,7 +93,9 @@ public class SearchViewManager {
}
if (activePage != null) {
try {
- ISearchResultViewPart viewPart= findLRUSearchResultView(activePage, useForNewSearch);
+ ISearchResultViewPart viewPart= null;
+ if (!openInNew)
+ viewPart= findLRUSearchResultView(activePage, avoidPinnedViews);
String secondaryId= null;
if (viewPart == null) {
if (activePage.findViewReference(NewSearchUI.SEARCH_VIEW_ID) != null) {

Back to the top