@Override
 public void doGenerateStubs(IFileSystemAccess access, IResourceDescription description) {
   for (IEObjectDescription objectDesc : description.getExportedObjects()) {
     String javaFileName = getJavaFileName(objectDesc);
     if (javaFileName != null) {
       String javaStubSource = getJavaStubSource(objectDesc);
       access.generateFile(javaFileName, javaStubSource);
     }
   }
 }
 @Override
 public void doGenerate(Resource input, IFileSystemAccess fsa) {
   if (input.getContents().isEmpty()) return;
   EObject root = input.getContents().get(0);
   if (!(root instanceof Model)) return;
   GenerateDirective generateDirective = ((Model) root).getGenerateDirective();
   if (generateDirective != null) {
     fsa.generateFile(
         generateFileName(generateDirective), generateFileContents(generateDirective));
   }
 }