Modified:
/trunk/uk.ac.lancs.comp.khatchad.rejuvenatepc.core/src/ca/mcgill/cs/swevo/jayfx/FastConverter.java
/trunk/uk.ac.lancs.comp.khatchad.rejuvenatepc.core/src/uk/ac/lancs/comp/khatchad/rejuvenatepc/core/util/XMLUtil.java
=======================================
---
/trunk/uk.ac.lancs.comp.khatchad.rejuvenatepc.core/src/ca/mcgill/cs/swevo/jayfx/FastConverter.java
Thu Jul 17 04:48:16 2008
+++
/trunk/uk.ac.lancs.comp.khatchad.rejuvenatepc.core/src/ca/mcgill/cs/swevo/jayfx/FastConverter.java
Wed Jan 20 09:10:09 2010
@@ -157,8 +157,10 @@
System.out.println(lName);
}
- if (lReturn == null)
+ if (lReturn == null) {
+ System.err.println("Error with element: " + pElement);
throw new IllegalStateException("In trouble.");
+ }
return lReturn;
}
=======================================
---
/trunk/uk.ac.lancs.comp.khatchad.rejuvenatepc.core/src/uk/ac/lancs/comp/khatchad/rejuvenatepc/core/util/XMLUtil.java
Sat Jan 9 11:51:27 2010
+++
/trunk/uk.ac.lancs.comp.khatchad.rejuvenatepc.core/src/uk/ac/lancs/comp/khatchad/rejuvenatepc/core/util/XMLUtil.java
Wed Jan 20 09:10:09 2010
@@ -62,7 +62,15 @@
*/
public static Element getXML(IJavaElement elem) {
Element ret = new Element(elem.getClass().getSimpleName());
- ret.setAttribute(new Attribute("id", elem.getHandleIdentifier()));
+ String handleIdentifier = null;
+ try {
+ handleIdentifier = elem.getHandleIdentifier();
+ }
+ catch(NullPointerException e) {
+ System.err.println("Can't retrieve element handler for: " + elem);
+ System.exit(-1);
+ }
+ ret.setAttribute(new Attribute("id", handleIdentifier));
ret.setAttribute(new Attribute("name", elem.getElementName()));
ret.setAttribute(new Attribute("type", String.valueOf(elem
.getElementType())));