1 19 package org.netbeans.modules.xml.refactoring.ui.j.api; 20 21 import org.netbeans.modules.xml.refactoring.ui.j.spi.RefactoringElementImplementation; 24 import org.openide.filesystems.FileObject; 25 import org.openide.text.PositionBounds; 26 27 34 public final class RefactoringElement { 35 36 public static final int NORMAL = 0; 37 38 public static final int WARNING = 1; 39 41 public static final int GUARDED = 2; 42 43 public static final int READ_ONLY = 3; 44 45 private final RefactoringElementImplementation impl; 47 48 RefactoringElement(RefactoringElementImplementation impl) { 49 assert impl != null; 50 this.impl = impl; 51 } 52 53 56 public String getText() { 57 return impl.getText(); 58 } 59 60 63 public String getDisplayText() { 64 return impl.getDisplayText(); 65 } 66 67 70 public boolean isEnabled() { 71 return impl.isEnabled(); 72 } 73 74 77 public void setEnabled(boolean enabled) { 78 impl.setEnabled(enabled); 79 } 80 81 84 88 91 public FileObject getParentFile() { 92 return impl.getParentFile(); 93 } 94 95 97 public PositionBounds getPosition() { 98 return impl.getPosition(); 99 } 100 101 105 public int getStatus() { 106 return impl.getStatus(); 107 } 108 109 113 public void openInEditor() { 114 impl.openInEditor(); 115 } 116 117 } 118 | Popular Tags |