refactor(creation): remove file path type selection

This commit is contained in:
2026-08-31 11:05:58 +04:00
parent 57c20ab7fe
commit 482184d9c8
2 changed files with 0 additions and 40 deletions
@@ -1,6 +0,0 @@
package ru.project.ui.creation.file;
public enum FilePathType {
ABSOLUTE,
RELATIVE
}
@@ -1,34 +0,0 @@
package ru.project.ui.creation.file;
import com.googlecode.lanterna.gui2.ActionListBox;
import com.googlecode.lanterna.gui2.WindowBasedTextGUI;
import java.util.function.Consumer;
import ru.project.ui.base.BaseModalWindow;
public class FilePathTypeSelectionWindow extends BaseModalWindow {
private final Consumer<FilePathType> onPathTypeSelected;
public FilePathTypeSelectionWindow(
WindowBasedTextGUI gui, Consumer<FilePathType> onPathTypeSelected) {
super("Выбор типа пути", gui);
this.onPathTypeSelected = onPathTypeSelected;
ActionListBox menu = new ActionListBox();
menu.addItem("Абсолютный", () -> selectPathType(FilePathType.ABSOLUTE));
menu.addItem("Относительный", () -> selectPathType(FilePathType.RELATIVE));
menu.addItem("Выйти", this::close);
setComponent(menu);
}
private void selectPathType(FilePathType pathType) {
onPathTypeSelected.accept(pathType);
close();
}
}