1 22 package org.aspectj.debugger.gui; 23 24 import javax.swing.event.*; 25 import javax.swing.tree.*; 26 27 public class ClassNodeSelectionListener implements TreeSelectionListener { 28 29 protected GUIDebugger guiDebugger; 30 31 public ClassNodeSelectionListener(GUIDebugger guiDebugger) { 32 this.guiDebugger = guiDebugger; 33 } 34 35 public void valueChanged(TreeSelectionEvent e) { 36 TreePath path = e.getPath(); 37 Object treeNode = path.getLastPathComponent(); 38 if (treeNode instanceof Sourceable) { 39 Sourceable sourceable = (Sourceable) treeNode; 40 sourceable.showOnSource(ComponentRepository.getSourcePane()); 41 } 42 } 43 } 44 | Popular Tags |