@Nullable
  public static VirtualFile showDialogAndCreateManifest(
      final ArtifactEditorContext context, final CompositePackagingElement<?> element) {
    FileChooserDescriptor descriptor = createDescriptorForManifestDirectory();
    final VirtualFile directory =
        suggestManifestFileDirectory(element, context, context.getArtifactType());
    final VirtualFile file = FileChooser.chooseFile(descriptor, context.getProject(), directory);
    if (file == null) {
      return null;
    }

    return createManifestFile(file, context.getProject());
  }
 private void updateManifest() {
   myManifestFileConfiguration = myContext.getManifestFile(myElement, myContext.getArtifactType());
   final String card;
   if (myManifestFileConfiguration != null) {
     card = "properties";
     myManifestPathField.setText(
         FileUtil.toSystemDependentName(myManifestFileConfiguration.getManifestFilePath()));
     myMainClassField.setText(StringUtil.notNullize(myManifestFileConfiguration.getMainClass()));
     myClasspathField.setText(StringUtil.join(myManifestFileConfiguration.getClasspath(), " "));
   } else {
     card = "buttons";
     myManifestPathField.setText("");
   }
   ((CardLayout) myPropertiesPanel.getLayout()).show(myPropertiesPanel, card);
 }