@@ -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}
0 commit comments