public static void addManifestFileToLayout( final @NotNull String path, final @NotNull ArtifactEditorContext context, final @NotNull CompositePackagingElement<?> element) { context.editLayout( context.getArtifact(), new Runnable() { public void run() { final VirtualFile file = findManifestFile(element, context, context.getArtifactType()); if (file == null || !FileUtil.pathsEqual(file.getPath(), path)) { PackagingElementFactory.getInstance() .addFileCopy(element, MANIFEST_DIR_NAME, path, MANIFEST_FILE_NAME); } } }); }
public void editLayout(Runnable action) { myContext.editLayout(myOriginalArtifact, action); }