void (String name) { final String oldName = getArtifact().getName(); if (name != null && !name.equals(oldName) && !isUpdatingNameFieldFromDisplayName()) { ModifiableArtifactModel modifiableArtifactModel = myArtifactsStructureContext.getOrCreateModifiableArtifactModel(); // Modify artifact name only in case no other artifacts have the same name because names should be unique between the artifacts if (modifiableArtifactModel.findArtifact(name) == null) { modifiableArtifactModel.getOrCreateModifiableArtifact(myOriginalArtifact).setName(name); getEditor().updateOutputPath(oldName, name); } } }