Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2002-08-21 09:43:18 +0000
committerDani Megert2002-08-21 09:43:18 +0000
commit4ed7edb91e97f4b9260d76ff5750caba12434ef4 (patch)
treefa3436939ddc0977234ce9e3a92447ef29e3577e
parent925049605d8a926c9b62885ff6a387218c88035e (diff)
downloadeclipse.platform.text-4ed7edb91e97f4b9260d76ff5750caba12434ef4.tar.gz
eclipse.platform.text-4ed7edb91e97f4b9260d76ff5750caba12434ef4.tar.xz
eclipse.platform.text-4ed7edb91e97f4b9260d76ff5750caba12434ef4.zip
Keep Select All always enabled
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultView.java10
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/SelectAllAction.java17
2 files changed, 3 insertions, 24 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultView.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultView.java
index 5d0b328a8..0cbae1b39 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultView.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultView.java
@@ -15,9 +15,10 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
@@ -25,8 +26,6 @@ import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IViewSite;
@@ -94,7 +93,6 @@ public class SearchResultView extends ViewPart implements ISearchResultView {
fCellEditorActionHandler = new CellEditorActionHandler(getViewSite().getActionBars());
fSelectAllAction= new SelectAllAction(fViewer);
fCellEditorActionHandler.setSelectAllAction(fSelectAllAction);
- getViewSite().getSelectionProvider().addSelectionChangedListener(fSelectAllAction);
fPropertyChangeListener= new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
@@ -134,10 +132,6 @@ public class SearchResultView extends ViewPart implements ISearchResultView {
fCellEditorActionHandler.dispose();
fCellEditorActionHandler= null;
}
- ISelectionProvider selectionProvider= getViewSite().getSelectionProvider();
- if (selectionProvider != null && fSelectAllAction != null)
- selectionProvider.removeSelectionChangedListener(fSelectAllAction);
-
super.dispose();
}
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SelectAllAction.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SelectAllAction.java
index 7c218e908..3c28c7fc5 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SelectAllAction.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SelectAllAction.java
@@ -5,15 +5,13 @@
package org.eclipse.search.internal.ui;
import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.ui.help.WorkbenchHelp;
/**
* This action selects all entries currently showing in view.
*/
-class SelectAllAction extends Action implements ISelectionChangedListener {
+class SelectAllAction extends Action {
private SearchResultViewer fViewer;
@@ -24,7 +22,6 @@ class SelectAllAction extends Action implements ISelectionChangedListener {
super("selectAll"); //$NON-NLS-1$
setText(SearchMessages.getString("SelectAllAction.label")); //$NON-NLS-1$
setToolTipText(SearchMessages.getString("SelectAllAction.tooltip")); //$NON-NLS-1$
- updateEnablement();
WorkbenchHelp.setHelp(this, ISearchHelpContextIds.SELECT_ALL_ACTION);
fViewer= viewer;
}
@@ -37,16 +34,4 @@ class SelectAllAction extends Action implements ISelectionChangedListener {
// force viewer selection change
fViewer.setSelection(fViewer.getSelection());
}
-
- /* (non-Javadoc)
- * Method declared on ISelectionChangedListener.
- */
- public void selectionChanged(SelectionChangedEvent event) {
- updateEnablement();
- }
-
- private void updateEnablement() {
- boolean enabled= SearchManager.getDefault().getCurrentItemCount() > 0;
- setEnabled(enabled);
- }
} \ No newline at end of file

Back to the top