1 20 21 package org.apache.directory.ldapstudio.browser.common.actions; 22 23 24 import org.apache.directory.ldapstudio.browser.common.BrowserCommonActivator; 25 import org.apache.directory.ldapstudio.browser.common.BrowserCommonConstants; 26 import org.eclipse.jface.action.Action; 27 import org.eclipse.jface.viewers.TreeViewer; 28 29 30 36 public class CollapseAllAction extends Action 37 { 38 protected TreeViewer viewer; 39 40 41 47 public CollapseAllAction( TreeViewer viewer ) 48 { 49 super( "Collapse All", BrowserCommonActivator.getDefault().getImageDescriptor( BrowserCommonConstants.IMG_COLLAPSEALL ) ); 50 super.setToolTipText( getText() ); 51 super.setEnabled( true ); 52 53 this.viewer = viewer; 54 } 55 56 57 60 public void run() 61 { 62 this.viewer.collapseAll(); 63 } 64 65 66 69 public void dispose() 70 { 71 this.viewer = null; 72 } 73 } 74 | Popular Tags |