namedWrapper = namedWrapperImport.substring(lastdot+1);
lastdot = hierarchicWrapperImport.lastIndexOf(".");
hierarchicWrapper = hierarchicWrapperImport.substring(lastdot+1);
SchemaDefinition sd = sm.isSchema(config.getSchemaToLoad());
if (sd.getDmwPackage(genContext) == null){
System.err.println("The " + sd.getName() + " schema must define a dmwTypeToPackage mapping for this context: " + genContext);
System.err.println("You should do this for all other schemas on which this schema depends.\n");
System.err.println("Example: dmwTypeToPackage gxt com.example.client\n");
System.exit(1);
}
Iterator<ClassDefinition> cdefs = sd.getClassDefList();
if (cdefs != null){
while(cdefs.hasNext()){
ClassDefinition cd = cdefs.next();
if (cd.generateWrapper(genContext) == false){
// DebugInfo.debug("Skipping " + cd.getName() + " for context " + genContext);
continue;
}
cd.adjustJavaClass(genContext,genSuffix);
if (cd.getClassType() == ClassTypeEnum.AUXILIARY){
// createIfRequired(auxwdir);
dumpAUX(cd, dmwdir);
}
else{
if (cd.getJavaClass() == null){
ResultException ex = new ResultException();
ex.addError("The " + cd.getName() + " class must define the javaClass attribute to facilitate wrapper creation.");
ex.result.lastResult().fileName(cd.getFile());
ex.result.lastResult().lineNumber(cd.getLineNumber());
throw(ex);
}
dumpWrapper(config, loc, f, sm, cd);
}
}
}
if (useWrappedObjectRefs){
Iterator<TypeDefinition> tdefs = sd.getInternalTypeDefList();
while(tdefs.hasNext()){
TypeDefinition td = tdefs.next();
ClassDefinition cd = td.getOriginalClass();
if (cd != null){
dumpIterable(config, loc, f, sm, cd, sd);
}
}
Iterator<ExtendedReferenceTypeDefinition> extrefs = sd.getExtendedReferenceTypeDefList();
while(extrefs.hasNext()){
ExtendedReferenceTypeDefinition ertd = extrefs.next();
ClassDefinition cd = ertd.getExtendedReferenceClass();
dumpExtendedReferenceIterable(config, loc, f, sm, cd, sd, ertd);
}