("_UI_GeneratingJavaInterface_message", new Object [] { getInterfacePackageName() + "." + getFactoryInterfaceName() }));
("_UI_GeneratingJavaInterface_message", new Object [] { getQualifiedFactoryInterfaceName() }));
  public void generate(IProgressMonitor progressMonitor)  {    try    {      if (!canGenerate()) return;      progressMonitor.beginTask("", 2 * getGenClasses().size() + 2 * getGenEnums().size() + 8 + getNestedGenPackages().size());      progressMonitor.subTask        (CodeGenEcorePlugin.INSTANCE.getString("_UI_GeneratingPackage_message", new Object [] { getPackageInterfaceName() }));      // Create helpers to cache and supply information for unique naming      switchHelper = new SwitchHelper();      validatorHelper = new ValidatorHelper();      dependencyHelper = new DependencyHelper();      for (Iterator iter = getGenClasses().iterator(); iter.hasNext(); )      {        GenClass genClass = (GenClass)iter.next();        progressMonitor.subTask          (CodeGenEcorePlugin.INSTANCE.getString("_UI_GeneratingModelClass_message", new Object [] { genClass.getFormattedName() }));        genClass.generate(new SubProgressMonitor(progressMonitor, 2));      }      for (Iterator iter = getGenEnums().iterator(); iter.hasNext(); )      {        GenEnum genEnum = (GenEnum)iter.next();        progressMonitor.subTask          (CodeGenEcorePlugin.INSTANCE.getString("_UI_GeneratingModelEnum_message", new Object [] { genEnum.getFormattedName() }));        genEnum.generate(new SubProgressMonitor(progressMonitor, 2));      }      if (hasClassifiers())      {        if (getGenModel().isGenerateSchema())        {          generateSchema(new SubProgressMonitor(progressMonitor, 1));        }        if (isLoadingInitialization())        {          generatePackageSerialization(new SubProgressMonitor(progressMonitor, 1));        }        progressMonitor.subTask          (CodeGenEcorePlugin.INSTANCE.getString             ("_UI_GeneratingJavaInterface_message", new Object [] { getInterfacePackageName() + "." + getPackageInterfaceName() }));        generate          (new SubProgressMonitor(progressMonitor, 1),            Generator.EMF_MODEL_PROJECT_STYLE,           getGenModel().getEffectiveModelPluginVariables(),           getGenModel().getModelDirectory(),           getInterfacePackageName(),            getPackageInterfaceName(),            getGenModel().getPackageInterfaceEmitter());          progressMonitor.subTask          (CodeGenEcorePlugin.INSTANCE.getString             ("_UI_GeneratingJavaClass_message", new Object [] { getClassPackageName() + "." + getPackageClassName() }));        generate          (new SubProgressMonitor(progressMonitor, 1),            Generator.EMF_MODEL_PROJECT_STYLE,           getGenModel().getEffectiveModelPluginVariables(),           getGenModel().getModelDirectory(),           getClassPackageName(),            getPackageClassName(),            getGenModel().getPackageClassEmitter());          progressMonitor.subTask          (CodeGenEcorePlugin.INSTANCE.getString            ("_UI_GeneratingJavaInterface_message", new Object [] { getInterfacePackageName() + "." + getFactoryInterfaceName() }));        generate          (new SubProgressMonitor(progressMonitor, 1),            Generator.EMF_MODEL_PROJECT_STYLE,           getGenModel().getEffectiveModelPluginVariables(),           getGenModel().getModelDirectory(),           getInterfacePackageName(),            getFactoryInterfaceName(),            getGenModel().getFactoryInterfaceEmitter());          progressMonitor.subTask          (CodeGenEcorePlugin.INSTANCE.getString             ("_UI_GeneratingJavaClass_message", new Object [] { getClassPackageName() + "." + getFactoryClassName() }));        generate          (new SubProgressMonitor(progressMonitor, 1),            Generator.EMF_MODEL_PROJECT_STYLE,           getGenModel().getEffectiveModelPluginVariables(),           getGenModel().getModelDirectory(),           getClassPackageName(),            getFactoryClassName(),            getGenModel().getFactoryClassEmitter());                        if (getResource().getValue() == GenResourceKind.XML)        {          progressMonitor.subTask          (CodeGenEcorePlugin.INSTANCE.getString             ("_UI_GeneratingJavaClass_message", new Object [] { getClassPackageName() + "." + getXMLProcessorClassName() }));          generate(            new SubProgressMonitor(progressMonitor, 1),            Generator.EMF_MODEL_PROJECT_STYLE,            getGenModel().getEffectiveModelPluginVariables(),            getGenModel().getModelDirectory(),            getUtilitiesPackageName(),            getXMLProcessorClassName(),            getGenModel().getXMLProcessorClassEmitter());        }                if (hasConstraints())        {          progressMonitor.subTask            (CodeGenEcorePlugin.INSTANCE.getString               ("_UI_GeneratingJavaClass_message", new Object [] { getUtilitiesPackageName() + "." + getValidatorClassName() }));          generate            (new SubProgressMonitor(progressMonitor, 1),              Generator.EMF_MODEL_PROJECT_STYLE,             getGenModel().getEffectiveModelPluginVariables(),             getGenModel().getModelDirectory(),             getUtilitiesPackageName(),              getValidatorClassName(),              getGenModel().getValidatorClassEmitter());        }        if (isAdapterFactory())        {          progressMonitor.subTask            (CodeGenEcorePlugin.INSTANCE.getString               ("_UI_GeneratingJavaClass_message", new Object [] { getUtilitiesPackageName() + "." + getSwitchClassName() }));          generate            (new SubProgressMonitor(progressMonitor, 1),              Generator.EMF_MODEL_PROJECT_STYLE,             getGenModel().getEffectiveModelPluginVariables(),             getGenModel().getModelDirectory(),             getUtilitiesPackageName(),              getSwitchClassName(),              getGenModel().getSwitchClassEmitter());            progressMonitor.subTask            (CodeGenEcorePlugin.INSTANCE.getString               ("_UI_GeneratingJavaClass_message", new Object [] { getUtilitiesPackageName() + "." + getAdapterFactoryClassName() }));          generate            (new SubProgressMonitor(progressMonitor, 1),              Generator.EMF_MODEL_PROJECT_STYLE,             getGenModel().getEffectiveModelPluginVariables(),             getGenModel().getModelDirectory(),             getUtilitiesPackageName(),              getAdapterFactoryClassName(),              getGenModel().getAdapterFactoryClassEmitter());        }      }      if (getResource() != GenResourceKind.NONE_LITERAL)      {        progressMonitor.subTask          (CodeGenEcorePlugin.INSTANCE.getString             ("_UI_GeneratingJavaClass_message", new Object [] { getQualifiedResourceFactoryClassName() }));        generate          (new SubProgressMonitor(progressMonitor, 1),            Generator.EMF_MODEL_PROJECT_STYLE,           getGenModel().getEffectiveModelPluginVariables(),           getGenModel().getModelDirectory(),           getUtilitiesPackageName(),            getResourceFactoryClassName(),            getGenModel().getResourceFactoryClassEmitter());          progressMonitor.subTask          (CodeGenEcorePlugin.INSTANCE.getString             ("_UI_GeneratingJavaClass_message", new Object [] { getQualifiedResourceFactoryClassName() }));        generate          (new SubProgressMonitor(progressMonitor, 1),            Generator.EMF_MODEL_PROJECT_STYLE,           getGenModel().getEffectiveModelPluginVariables(),           getGenModel().getModelDirectory(),           getUtilitiesPackageName(),            getResourceClassName(),            getGenModel().getResourceClassEmitter());      }      for (Iterator nestedGenPackages = getNestedGenPackages().iterator(); nestedGenPackages.hasNext(); )      {        GenPackage nestedGenPackage = (GenPackage)nestedGenPackages.next();        nestedGenPackage.generate(new SubProgressMonitor(progressMonitor, 1));      }    }    finally    {      // Clear the transient helpers      switchHelper = null;      validatorHelper = null;      dependencyHelper = null;      progressMonitor.done();    }  }