KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ca > mcgill > sable > soot > cfg > model > CFGElement


1 /* Soot - a J*va Optimization Framework
2  * Copyright (C) 2004 Jennifer Lhotak
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */

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 JavaDoc TEXT = "node text";
31     public static final String JavaDoc CHILDREN = "children";
32     public static final String JavaDoc INPUTS = "inputs";
33     public static final String JavaDoc OUTPUTS = "outputs";
34     public static final String JavaDoc HEAD = "head";
35     public static final String JavaDoc TAIL = "tail";
36     public static final String JavaDoc BEFORE_INFO = "before";
37     public static final String JavaDoc AFTER_INFO = "after";
38     public static final String JavaDoc NEW_FLOW_DATA = "new_flow_data";
39     public static final String JavaDoc FLOW_INFO = "flow_info";
40     public static final String JavaDoc FLOW_CHILDREN = "flow_children";
41     public static final String JavaDoc PART_FLOW_CHILDREN = "part flow_children";
42     
43     public static final String JavaDoc NODE_DATA = "node_data";
44     
45     public static final String JavaDoc REVEAL = "reveal";
46     public static final String JavaDoc 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 JavaDoc name, Object JavaDoc oldVal, Object JavaDoc newVal){
55         listeners.firePropertyChange(name, oldVal, newVal);
56     }
57     
58     protected void firePropertyChange(String JavaDoc name, Object JavaDoc 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 JavaDoc name, Object JavaDoc newVal){
67         firePropertyChange(name, null, newVal);
68     }
69     
70     /**
71      *
72      */

73     public CFGElement() {
74         super();
75     }
76
77     /* (non-Javadoc)
78      * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
79      */

80     public Object JavaDoc getEditableValue() {
81         return this;
82     }
83
84     /* (non-Javadoc)
85      * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
86      */

87     public IPropertyDescriptor[] getPropertyDescriptors() {
88         return new IPropertyDescriptor[1];
89     }
90
91     /* (non-Javadoc)
92      * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
93      */

94     public Object JavaDoc getPropertyValue(Object JavaDoc id) {
95         return null;
96     }
97
98     /* (non-Javadoc)
99      * @see org.eclipse.ui.views.properties.IPropertySource#isPropertySet(java.lang.Object)
100      */

101     public boolean isPropertySet(Object JavaDoc id) {
102         return false;
103     }
104
105     /* (non-Javadoc)
106      * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
107      */

108     public void resetPropertyValue(Object JavaDoc id) {
109         
110     }
111
112     /* (non-Javadoc)
113      * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
114      */

115     public void setPropertyValue(Object JavaDoc id, Object JavaDoc value) {
116         
117     }
118
119 }
120
Popular Tags