@Override
  public void editLayout(@NotNull final Artifact artifact, final Runnable action) {
    final Artifact originalArtifact = getOriginalArtifact(artifact);
    WriteAction.run(() -> {
      final ModifiableArtifact modifiableArtifact = getOrCreateModifiableArtifactModel().getOrCreateModifiableArtifact(originalArtifact);
      if (modifiableArtifact.getRootElement() == originalArtifact.getRootElement()) {
        modifiableArtifact.setRootElement(getOrCreateModifiableRootElement(originalArtifact));
      }
      action.run();
    });
    myContext.getDaemonAnalyzer().queueUpdate(getOrCreateArtifactElement(originalArtifact));
  }
@Override
  public void editLayout(@NotNull final Artifact artifact, final Runnable action)