Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2014-02-24 11:05:37 +0000
committerDani Megert2014-02-24 11:05:37 +0000
commitb58659079d4ca44704291d0480d0a855c087d02d (patch)
tree3c55bbada8da9ec375cc72de3e893b601264dfa6 /org.eclipse.search
parentfedcffa9658e56b549d079cbfd6be821aace83c8 (diff)
downloadeclipse.platform.text-b58659079d4ca44704291d0480d0a855c087d02d.tar.gz
eclipse.platform.text-b58659079d4ca44704291d0480d0a855c087d02d.tar.xz
eclipse.platform.text-b58659079d4ca44704291d0480d0a855c087d02d.zip
Fixed bug 428890: Search view only shows default page (NPE in PageBookView.showPageRec)I20140225-1430I20140225-0800
Diffstat (limited to 'org.eclipse.search')
-rw-r--r--org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java22
1 files changed, 17 insertions, 5 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 dc1c5d9f0..c6f1c1ba6 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, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 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
@@ -178,6 +178,11 @@ public class SearchView extends PageBookView implements ISearchResultViewPart, I
}
static class DummyPart implements IWorkbenchPart {
+ public DummyPart(IWorkbenchPartSite site) {
+ fSite= site;
+ }
+
+ private IWorkbenchPartSite fSite;
private int fLastActivation= 0;
public void setLastActivation(int lastActivation) {
fLastActivation= lastActivation;
@@ -185,10 +190,17 @@ public class SearchView extends PageBookView implements ISearchResultViewPart, I
public int getLastActivation() {
return fLastActivation;
}
+
+ public void dispose() {
+ fSite= null;
+ }
+
+ public IWorkbenchPartSite getSite() {
+ return fSite;
+ }
+
public void addPropertyListener(IPropertyListener listener) {/*dummy*/}
public void createPartControl(Composite parent) {/*dummy*/}
- public void dispose() {/*dummy*/}
- public IWorkbenchPartSite getSite() { return null; }
public String getTitle() { return null; }
public Image getTitleImage() { return null; }
public String getTitleToolTip() { return null; }
@@ -327,7 +339,7 @@ public class SearchView extends PageBookView implements ISearchResultViewPart, I
IPageBookViewPage page= new EmptySearchView();
page.createControl(book);
initPage(page);
- DummyPart part= new DummyPart();
+ DummyPart part= new DummyPart(getSite());
fPartsToPages.put(part, page);
fPagesToParts.put(page, part);
fDefaultPart= part;
@@ -394,7 +406,7 @@ public class SearchView extends PageBookView implements ISearchResultViewPart, I
if (page != currentPage) {
DummyPart part= (DummyPart) fPagesToParts.get(page);
if (part == null) {
- part= new DummyPart();
+ part= new DummyPart(getSite());
fPagesToParts.put(page, part);
fPartsToPages.put(part, page);
page.setViewPart(this);

Back to the top