1 19 20 21 package ca.mcgill.sable.soot.cfg.model; 22 23 import org.eclipse.ui.views.properties.IPropertyDescriptor; 24 import org.eclipse.ui.views.properties.IPropertySource; 25 import java.beans.*; 26 27 28 public class CFGElement implements IPropertySource { 29 30 public static final String TEXT = "node text"; 31 public static final String CHILDREN = "children"; 32 public static final String INPUTS = "inputs"; 33 public static final String OUTPUTS = "outputs"; 34 public static final String HEAD = "head"; 35 public static final String TAIL = "tail"; 36 public static final String BEFORE_INFO = "before"; 37 public static final String AFTER_INFO = "after"; 38 public static final String NEW_FLOW_DATA = "new_flow_data"; 39 public static final String FLOW_INFO = "flow_info"; 40 public static final String FLOW_CHILDREN = "flow_children"; 41 public static final String PART_FLOW_CHILDREN = "part flow_children"; 42 43 public static final String NODE_DATA = "node_data"; 44 45 public static final String REVEAL = "reveal"; 46 public static final String HIGHLIGHT = "highlight"; 47 48 protected PropertyChangeSupport listeners = new PropertyChangeSupport(this); 49 50 public void addPropertyChangeListener(PropertyChangeListener l){ 51 listeners.addPropertyChangeListener(l); 52 } 53 54 protected void firePropertyChange(String name, Object oldVal, Object newVal){ 55 listeners.firePropertyChange(name, oldVal, newVal); 56 } 57 58 protected void firePropertyChange(String name, Object newVal){ 59 firePropertyChange(name, null, newVal); 60 } 61 62 public void removePropertyChangeListener(PropertyChangeListener l){ 63 listeners.removePropertyChangeListener(l); 64 } 65 66 public void fireStructureChange(String name, Object newVal){ 67 firePropertyChange(name, null, newVal); 68 } 69 70 73 public CFGElement() { 74 super(); 75 } 76 77 80 public Object getEditableValue() { 81 return this; 82 } 83 84 87 public IPropertyDescriptor[] getPropertyDescriptors() { 88 return new IPropertyDescriptor[1]; 89 } 90 91 94 public Object getPropertyValue(Object id) { 95 return null; 96 } 97 98 101 public boolean isPropertySet(Object id) { 102 return false; 103 } 104 105 108 public void resetPropertyValue(Object id) { 109 110 } 111 112 115 public void setPropertyValue(Object id, Object value) { 116 117 } 118 119 } 120 | Popular Tags |