/**
* Process <export package=""/>
*/
public JavaExport read(XMLStreamReader reader, ProcessorContext context) throws ContributionReadException {
JavaExport javaExport = this.factory.createJavaExport();
QName element = null;
try {
while (reader.hasNext()) {
int event = reader.getEventType();
switch (event) {
case START_ELEMENT:
element = reader.getName();
// Read <export.java>
if (EXPORT_JAVA.equals(element)) {
String packageName = reader.getAttributeValue(null, PACKAGE);
if (packageName == null) {
error(context.getMonitor(), "AttributePackageMissing", reader);
//throw new ContributionReadException("Attribute 'package' is missing");
} else
javaExport.setPackage(packageName);
}
break;
case XMLStreamConstants.END_ELEMENT:
if (EXPORT_JAVA.equals(reader.getName())) {
return javaExport;