1 23 package org.objectweb.clif.scenario.util.isac.gui.action; 24 25 import java.net.URL ; 26 27 import org.apache.log4j.Category; 28 import org.eclipse.jface.action.Action; 29 import org.eclipse.jface.resource.ImageDescriptor; 30 import org.eclipse.jface.window.ApplicationWindow; 31 import org.objectweb.clif.scenario.util.isac.FileName; 32 import org.objectweb.clif.scenario.util.isac.gui.ScenarioGUIEditor; 33 39 public class ExpandCurrentTreeAction extends Action { 40 43 ScenarioGUIEditor window; 44 static Category cat = Category.getInstance(ExpandCurrentTreeAction.class 45 .getName()); 46 52 public ExpandCurrentTreeAction(ApplicationWindow w) { 53 cat.debug("-> constructor"); 54 this.window = (ScenarioGUIEditor) w; 55 this.setText("Expand current tree@Ctrl+Alt+X"); 56 this.setToolTipText("Expand current tree, which has the focus"); 57 try { 58 this.setImageDescriptor(ImageDescriptor.createFromURL(new URL ( 59 "file:" + FileName.EXPAND_ICON))); 60 } catch (Exception e) { 61 cat.warn("Unable to find expand icon file"); 62 } 63 64 } 65 66 public void run() { 67 cat.debug("-> run"); 68 this.window.getTreeViewer().expandAll(); 69 } 70 } | Popular Tags |