1 19 20 package org.netbeans.lib.editor.codetemplates.spi; 21 22 import java.util.Collection ; 23 import java.util.Map ; 24 import org.netbeans.lib.editor.codetemplates.CodeTemplateParameterImpl; 25 26 53 public final class CodeTemplateParameter { 54 55 58 public static final String CURSOR_PARAMETER_NAME = "cursor"; 60 public static final String SELECTION_PARAMETER_NAME = "selection"; 62 public static final String LINE_HINT_NAME = "line"; 64 67 public static final String DEFAULT_VALUE_HINT_NAME = "default"; 69 82 public static final String EDITABLE_HINT_NAME = "editable"; 84 85 private final CodeTemplateParameterImpl impl; 86 87 CodeTemplateParameter(CodeTemplateParameterImpl impl) { 88 this.impl = impl; 89 } 90 91 94 public String getName() { 95 return impl.getName(); 96 } 97 98 115 public String getValue() { 116 return impl.getValue(); 117 } 118 119 133 public void setValue(String newValue) { 134 impl.setValue(newValue, true); 135 } 136 137 143 public boolean isEditable() { 144 return impl.isEditable(); 145 } 146 147 153 public boolean isUserModified() { 154 return impl.isUserModified(); 155 } 156 157 169 public int getInsertTextOffset() { 170 return impl.getInsertTextOffset(); 171 } 172 173 182 public int getParametrizedTextStartOffset() { 183 return impl.getParametrizedTextStartOffset(); 184 } 185 186 196 public int getParametrizedTextEndOffset() { 197 return impl.getParametrizedTextEndOffset(); 198 } 199 200 206 public Map getHints() { 207 return impl.getHints(); 208 } 209 210 216 public CodeTemplateParameter getMaster() { 217 return impl.getMaster(); 218 } 219 220 228 public Collection getSlaves() { 229 return impl.getSlaves(); 230 } 231 232 235 public boolean isSlave() { 236 return impl.isSlave(); 237 } 238 239 CodeTemplateParameterImpl getImpl() { 240 return impl; 241 } 242 243 } 244 | Popular Tags |