aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaloyan Raev2014-01-09 08:03:17 (EST)
committerKaloyan Raev2014-01-09 08:03:17 (EST)
commitf1a350551b0af3de034b07f846c845a62834d4ce (patch)
treeb9213c58a58d7451c6c2d20cd4e474be2e2dcf8b
parent2f047e4dca9dadf5b28b55d0f3b204153062cefc (diff)
downloadorg.eclipse.pdt-f1a350551b0af3de034b07f846c845a62834d4ce.zip
org.eclipse.pdt-f1a350551b0af3de034b07f846c845a62834d4ce.tar.gz
org.eclipse.pdt-f1a350551b0af3de034b07f846c845a62834d4ce.tar.bz2
Bug 425184 - NPE on PHPWorkingSetFilterActionGroup.setWorkingSetrefs/changes/29/20429/1
Bug: 425184 Change-Id: Iddebcbcd0c0414ba161f59dabd4d948c7e19a5ab Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/workingset/PHPWorkingSetFilterActionGroup.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/workingset/PHPWorkingSetFilterActionGroup.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/workingset/PHPWorkingSetFilterActionGroup.java
index 44961f7..66ee7e0 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/workingset/PHPWorkingSetFilterActionGroup.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/workingset/PHPWorkingSetFilterActionGroup.java
@@ -12,7 +12,6 @@ package org.eclipse.php.internal.ui.workingset;
import org.eclipse.dltk.internal.ui.workingsets.WorkingSetFilterActionGroup;
import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPartSite;
@@ -26,35 +25,34 @@ import org.eclipse.ui.IWorkingSet;
*/
public class PHPWorkingSetFilterActionGroup extends WorkingSetFilterActionGroup {
- private final PHPWorkingSetFilter fWorkingSetFilter;
+ private PHPWorkingSetFilter fWorkingSetFilter;
public PHPWorkingSetFilterActionGroup(IWorkbenchPartSite site,
IPropertyChangeListener changeListener) {
super(site, changeListener);
- fWorkingSetFilter = new PHPWorkingSetFilter();
}
public PHPWorkingSetFilterActionGroup(Shell shell, IWorkbenchPage page,
IPropertyChangeListener changeListener) {
super(shell, page, changeListener);
- fWorkingSetFilter = new PHPWorkingSetFilter();
}
@Override
public boolean isFiltered(Object parent, Object object) {
- if (fWorkingSetFilter == null)
- return false;
- return !fWorkingSetFilter.select(null, parent, object);
+ return !getWorkingSetFilter().select(null, parent, object);
}
@Override
public void setWorkingSet(IWorkingSet workingSet, boolean refreshViewer) {
- fWorkingSetFilter.setWorkingSet(workingSet);
+ getWorkingSetFilter().setWorkingSet(workingSet);
super.setWorkingSet(workingSet, refreshViewer);
}
@Override
- public ViewerFilter getWorkingSetFilter() {
+ public PHPWorkingSetFilter getWorkingSetFilter() {
+ if (fWorkingSetFilter == null) {
+ fWorkingSetFilter = new PHPWorkingSetFilter();
+ }
return fWorkingSetFilter;
}