package p.studio.workspaces.editor;

import java.nio.file.Path;
import java.util.Objects;

public record EditorOpenFileBuffer(
        Path path,
        String tabLabel,
        String content,
        String lineSeparator) {
    public EditorOpenFileBuffer {
        path = Objects.requireNonNull(path, "path").toAbsolutePath().normalize();
        tabLabel = Objects.requireNonNull(tabLabel, "tabLabel");
        content = Objects.requireNonNull(content, "content");
        lineSeparator = Objects.requireNonNull(lineSeparator, "lineSeparator");
    }
}
