Skip to content

Commit aff64e8

Browse files
author
lhwlyd
committed
deleted the savings
1 parent 29a67e8 commit aff64e8

2 files changed

Lines changed: 0 additions & 58 deletions

File tree

src/paintcomponents/java/interactive/ClassConstructorPaintComponent.java

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ public void evaluate(DataFromPoint dataFromPoint){
8585
| IllegalArgumentException | InvocationTargetException e) {
8686
e.printStackTrace();
8787
// TODO Handle Exception
88-
// TODO Handle Exception
8988
throw new IllegalStateException();
9089
}
9190
}
@@ -112,40 +111,6 @@ public boolean canProvideInformationToDataFromPoint(
112111

113112
return instance != null;
114113
}
115-
116-
@Override
117-
public void saveToElement(Element rootElement, Document doc) {
118-
super.saveToElement(rootElement, doc);
119-
// build the structure
120-
Element main = doc.createElement("classconstructorcomponent");
121-
Element className = doc.createElement("classname");
122-
Element constructorInfoElem = doc
123-
.createElement("constructorinfo");
124-
125-
main.appendChild(className);
126-
main.appendChild(constructorInfoElem);
127-
rootElement.appendChild(main);
128-
129-
// store the class name in the classname element
130-
className.setTextContent(displayingConstructor.getDeclaringClass().getName());
131-
132-
// this approach connot deal with arrays and primitives
133-
// //store a list of constructor types in constructorParamType element
134-
// Class[] parameterTypes = displayingConstructor.getParameterTypes();
135-
// for (Class type : parameterTypes) {
136-
// Element typeElem = doc.createElement("typename");
137-
// typeElem.appendChild(doc.createTextNode(type.getName()));
138-
// constructorParamType.appendChild(typeElem);
139-
// }
140-
141-
/* Index approach */
142-
constructorInfoElem
143-
.setAttribute("index",
144-
Integer.toString(Arrays.asList(this.displayingConstructor
145-
.getDeclaringClass().getConstructors())
146-
.indexOf(displayingConstructor)));
147-
148-
}
149114

150115
public ClassConstructorPaintComponent(Element rootElement,
151116
PaintPanel panel) {

src/paintcomponents/java/interactive/MethodPaintComponent.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -143,29 +143,6 @@ public Object getInstance(){
143143
return instance;
144144
}
145145

146-
@Override
147-
public void saveToElement(Element rootElement, Document doc) {
148-
super.saveToElement(rootElement, doc);
149-
// build the structure
150-
Element main = doc.createElement("methodcomponent");
151-
Element className = doc.createElement("classname");
152-
Element methodInfoElem = doc
153-
.createElement("methodinfo");
154-
155-
main.appendChild(className);
156-
main.appendChild(methodInfoElem);
157-
rootElement.appendChild(main);
158-
159-
// store the class name in the classname element
160-
className.setTextContent(displayingMethod.getDeclaringClass().getName());
161-
162-
/* Index approach */
163-
methodInfoElem
164-
.setAttribute("index",
165-
Integer.toString(Arrays.asList(this.displayingMethod
166-
.getDeclaringClass().getMethods())
167-
.indexOf(displayingMethod)));
168-
}
169146

170147
public MethodPaintComponent(Element rootElement,
171148
PaintPanel panel) {

0 commit comments

Comments
 (0)