1 19 20 package org.netbeans.modules.refactoring.plugins; 21 22 import javax.swing.Icon ; 23 import org.netbeans.modules.refactoring.api.RefactoringElement; 24 import org.netbeans.modules.refactoring.spi.ui.TreeElement; 25 import org.netbeans.modules.refactoring.spi.ui.TreeElementFactory; 26 27 31 public class RefactoringTreeElement implements TreeElement { 32 33 RefactoringElement element; 34 35 RefactoringTreeElement(RefactoringElement element) { 36 this.element = element; 37 } 38 39 public TreeElement getParent(boolean isLogical) { 40 if (isLogical) { 41 return TreeElementFactory.getTreeElement(element.getComposite()); 42 } else { 43 return TreeElementFactory.getTreeElement(element.getParentFile()); 44 } 45 } 46 47 public Icon getIcon() { 48 return null; 49 } 50 51 public String getText(boolean isLogical) { 52 return element.getDisplayText(); 53 } 54 55 public Object getUserObject() { 56 return element; 57 } 58 } 59 | Popular Tags |