1 11 package org.eclipse.ui.internal.navigator.actions; 12 13 import org.eclipse.jface.action.Action; 14 import org.eclipse.jface.action.IAction; 15 import org.eclipse.ui.internal.navigator.CommonNavigatorMessages; 16 import org.eclipse.ui.navigator.CommonViewer; 17 18 22 public class CollapseAllAction extends Action implements IAction { 23 24 private final CommonViewer commonViewer; 25 26 32 public CollapseAllAction(CommonViewer aViewer) { 33 super(CommonNavigatorMessages.CollapseAllActionDelegate_0); 34 setToolTipText(CommonNavigatorMessages.CollapseAllActionDelegate_0); 35 commonViewer = aViewer; 36 } 37 38 public void run() { 39 if (commonViewer != null) { 40 commonViewer.collapseAll(); 41 } 42 } 43 } 44 | Popular Tags |