/**
* Process <import.java package="" location=""/>
*/
public JavaImport read(XMLStreamReader reader) throws ContributionReadException {
JavaImport javaImport = this.factory.createJavaImport();
QName element = null;
try {
while (reader.hasNext()) {
int event = reader.getEventType();
switch (event) {
case START_ELEMENT:
element = reader.getName();
// Read <import.java>
if (IMPORT_JAVA.equals(element)) {
String packageName = reader.getAttributeValue(null, PACKAGE);
if (packageName == null) {
error("AttributePackageMissing", reader);
//throw new ContributionReadException("Attribute 'package' is missing");
} else
javaImport.setPackage(packageName);
String location = reader.getAttributeValue(null, LOCATION);
javaImport.setLocation(location);
}
break;
case XMLStreamConstants.END_ELEMENT:
if (IMPORT_JAVA.equals(reader.getName())) {
return javaImport;