1 20 package org.apache.directory.ldapstudio.schemas.controller.actions; 21 22 23 import org.apache.directory.ldapstudio.schemas.Activator; 24 import org.apache.directory.ldapstudio.schemas.Messages; 25 import org.apache.directory.ldapstudio.schemas.PluginConstants; 26 import org.eclipse.jface.action.Action; 27 import org.eclipse.jface.viewers.TreeViewer; 28 import org.eclipse.ui.plugin.AbstractUIPlugin; 29 30 31 37 public class CollapseAllAction extends Action 38 { 39 protected TreeViewer viewer; 40 41 42 48 public CollapseAllAction( TreeViewer viewer ) 49 { 50 super( Messages.getString( "CollapseAllAction.Collapse_All" ) ); setToolTipText( getText() ); 52 setId( PluginConstants.CMD_COLLAPSE_ALL ); 53 setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID, 54 PluginConstants.IMG_COLLAPSE_ALL ) ); 55 setEnabled( true ); 56 57 this.viewer = viewer; 58 } 59 60 61 64 public void run() 65 { 66 this.viewer.collapseAll(); 67 } 68 69 70 73 public void dispose() 74 { 75 this.viewer = null; 76 } 77 } 78 | Popular Tags |