Skip to content

Commit ac572c9

Browse files
author
lhwlyd
committed
Removed savings
1 parent 344a102 commit ac572c9

File tree

2 files changed

+0
-86
lines changed

2 files changed

+0
-86
lines changed

src/paintcomponents/java/interactive/ClassConstructorPaintComponent.java

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -112,63 +112,4 @@ public boolean canProvideInformationToDataFromPoint(
112112
return instance != null;
113113
}
114114

115-
public ClassConstructorPaintComponent(Element rootElement,
116-
PaintPanel panel) {
117-
super(rootElement, panel);
118-
Element main = (Element) rootElement
119-
.getElementsByTagName("classconstructorcomponent").item(0);
120-
Element classNameElem = (Element) main
121-
.getElementsByTagName("classname").item(0);
122-
Element constructorInfoElem = (Element) main
123-
.getElementsByTagName("constructorinfo").item(0);
124-
125-
126-
127-
String className = classNameElem.getTextContent();
128-
129-
//index appproach
130-
try {
131-
Class consClass = Class.forName(className);
132-
this.displayingConstructor = consClass.getConstructors()[Integer.parseInt(constructorInfoElem.getAttribute("index"))];
133-
this.setDisplayingText(displayingConstructor.toString());
134-
init();
135-
linkPoints(rootElement);
136-
137-
} catch (ClassNotFoundException | DOMException | SecurityException e) {
138-
JOptionPane.showMessageDialog(panel, e.toString());
139-
e.printStackTrace();
140-
}
141-
142-
143-
/* type approach */
144-
// NodeList types = constructorParamTypesElem
145-
// .getElementsByTagName("typename");
146-
// Class[] paramTypes = new Class[types.getLength()];
147-
//
148-
// for (int i = 0; i < types.getLength(); i++) {
149-
// Element typeElem = (Element) types.item(i);
150-
// String typeName = typeElem.getTextContent();
151-
// try {
152-
// paramTypes[i] = Class.forName(typeName);
153-
// } catch (ClassNotFoundException e) {
154-
// JOptionPane.showMessageDialog(panel, e.toString());
155-
// e.printStackTrace();
156-
// }
157-
// }
158-
//
159-
// try {
160-
// Class consClass = Class.forName(className);
161-
// this.displayingConstructor = consClass.getConstructor(paramTypes);
162-
// this.setDisplayingText(displayingConstructor.toString());
163-
// init();
164-
// linkPoints(rootElement);
165-
//
166-
// } catch (ClassNotFoundException | DOMException | NoSuchMethodException
167-
// | SecurityException e) {
168-
// JOptionPane.showMessageDialog(panel, e.toString());
169-
// e.printStackTrace();
170-
// }
171-
172-
}
173-
174115
}

src/paintcomponents/java/interactive/MethodPaintComponent.java

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

146-
147-
public MethodPaintComponent(Element rootElement,
148-
PaintPanel panel) {
149-
super(rootElement, panel);
150-
Element main = (Element) rootElement
151-
.getElementsByTagName("methodcomponent").item(0);
152-
Element classNameElem = (Element) main
153-
.getElementsByTagName("classname").item(0);
154-
Element methodInfoElem = (Element) main
155-
.getElementsByTagName("methodinfo").item(0);
156-
157-
String className = classNameElem.getTextContent();
158-
159-
//index appproach
160-
try {
161-
Class mtdClass = Class.forName(className);
162-
this.displayingMethod = mtdClass.getMethods()[Integer.parseInt(methodInfoElem.getAttribute("index"))];
163-
this.setDisplayingText(displayingMethod.toString());
164-
init();
165-
linkPoints(rootElement);
166-
167-
} catch (ClassNotFoundException | DOMException | SecurityException e) {
168-
JOptionPane.showMessageDialog(panel, e.toString());
169-
e.printStackTrace();
170-
}
171-
172-
}
173146
}

0 commit comments

Comments
 (0)