1 11 package org.eclipse.core.internal.variables; 12 13 import org.eclipse.core.variables.IValueVariable; 14 15 18 public class ValueVariable extends StringVariable implements IValueVariable { 19 20 23 private String fValue; 24 25 28 private boolean fReadOnly; 29 30 39 public ValueVariable(String name, String description, boolean readOnly, String value) { 40 super(name, description, null); 41 fReadOnly = readOnly; 42 fValue = value; 43 } 44 45 48 public void setValue(String value) { 49 if (!isReadOnly()){ 50 fValue = value; 51 StringVariableManager.getDefault().notifyChanged(this); 52 } 53 } 54 55 58 public String getValue() { 59 return fValue; 60 } 61 62 65 public boolean isReadOnly() { 66 return fReadOnly; 67 } 68 69 72 public boolean isContributed() { 73 return false; 74 } 75 76 } 77 | Popular Tags |