1 11 package org.eclipse.search2.internal.ui.basic.views; 12 13 import org.eclipse.jface.action.Action; 14 import org.eclipse.jface.viewers.TreeViewer; 15 import org.eclipse.search.internal.ui.SearchPluginImages; 16 import org.eclipse.search2.internal.ui.SearchMessages; 17 18 public class CollapseAllAction extends Action { 19 20 private TreeViewer fViewer; 21 22 public CollapseAllAction(TreeViewer viewer) { 23 super(SearchMessages.CollapseAllAction_0); 24 fViewer= viewer; 25 setToolTipText(SearchMessages.CollapseAllAction_1); 26 SearchPluginImages.setImageDescriptors(this, SearchPluginImages.T_LCL, SearchPluginImages.IMG_LCL_SEARCH_COLLAPSE_ALL); 27 } 28 29 public void run() { 30 fViewer.collapseAll(); 31 } 32 } 33 | Popular Tags |