progressMonitor.subTask(CodeGenEcorePlugin.INSTANCE.getString("_UI_GeneratingEditorPackages"));
progressMonitor.subTask(CodeGenEcorePlugin.INSTANCE.getString("_UI_GeneratingEditorPackages_message"));
  public void generateEditor(Monitor progressMonitor)  {    try    {      if (!canGenerateEditor()) return;      getStaticGenPackages();      progressMonitor.beginTask("", getGenPackages().size() + 1);      // Force the project to be setup properly.      //      if (EMFPlugin.IS_ECLIPSE_RUNNING && isUpdateClasspath())      {        EclipseUtil.findOrCreateContainer          ((GenModel)this,           createMonitor(progressMonitor, 1),            Generator.EMF_EDITOR_PROJECT_STYLE,            getEffectiveModelPluginVariables(),           getEditorDirectory(),            true);      }      progressMonitor.subTask(CodeGenEcorePlugin.INSTANCE.getString("_UI_GeneratingEditorPackages"));      for (Iterator iter = getGenPackages().iterator(); iter.hasNext(); )      {        GenPackage genPackage = (GenPackage)iter.next();        progressMonitor.subTask          (CodeGenEcorePlugin.INSTANCE.getString             ("_UI_GeneratingJavaPackage_message", new Object [] { genPackage.getInterfacePackageName() }));        genPackage.generateEditor(createMonitor(progressMonitor, 1));      }      progressMonitor.subTask        (CodeGenEcorePlugin.INSTANCE.getString           ("_UI_GeneratingJavaClass_message", new Object [] { getQualifiedEditorPluginClassName() }));      generate        (createMonitor(progressMonitor, 1),         Generator.EMF_EDITOR_PROJECT_STYLE,         getEffectiveModelPluginVariables(),         getEditorPluginDirectory(),         getEditorPluginPackageName(),         getEditorPluginClassName(),         getEditorPluginClassEmitter());      if (isBundleManifest())      {        progressMonitor.subTask(CodeGenEcorePlugin.INSTANCE.getString("_UI_GeneratingEditorManifestMF_message"));        generate          (createMonitor(progressMonitor, 1),           Generator.EMF_EDITOR_PROJECT_STYLE,           getEffectiveModelPluginVariables(),           getEditorProjectDirectory() + "/META-INF/MANIFEST.MF",           getEditorManifestMFEmitter());      }            progressMonitor.subTask(CodeGenEcorePlugin.INSTANCE.getString("_UI_GeneratingEditorPluginXML_message"));      generate        (createMonitor(progressMonitor, 1),         Generator.EMF_EDITOR_PROJECT_STYLE,         getEffectiveModelPluginVariables(),         getEditorProjectDirectory() + "/plugin.xml",         getEditorPluginXMLEmitter());                  progressMonitor.subTask(CodeGenEcorePlugin.INSTANCE.getString("_UI_GeneratingEditorPluginProperties_message"));      generate        (createMonitor(progressMonitor, 1),         Generator.EMF_EDITOR_PROJECT_STYLE,         getEffectiveModelPluginVariables(),         getEditorProjectDirectory() + "/plugin.properties",         getEditorPluginPropertiesEmitter());      progressMonitor.subTask(CodeGenEcorePlugin.INSTANCE.getString("_UI_GeneratingEditorBuildProperties_message"));      generate        (createMonitor(progressMonitor, 1),         Generator.EMF_EDITOR_PROJECT_STYLE,         getEffectiveModelPluginVariables(),         getEditorProjectDirectory() + "/build.properties",         getEditorBuildPropertiesEmitter());            if (getGenModel().isRichClientPlatform())      {        progressMonitor.subTask        (CodeGenEcorePlugin.INSTANCE.getString           ("_UI_GeneratingJavaClass_message", new Object [] { getQualifiedEditorAdvisorClassName() }));      generate        (createMonitor(progressMonitor, 1),         Generator.EMF_EDITOR_PROJECT_STYLE,         getEffectiveModelPluginVariables(),         getEditorPluginDirectory(),         getEditorPluginPackageName(),         getEditorAdvisorClassName(),         getEditorAdvisorEmitter());      }          }    finally    {      progressMonitor.done();    }  }