Files
VisualSapfor/src/_VisualDVM/Visual/Windows/CombineFilesDialog.java
2024-10-14 15:19:13 +03:00

24 lines
1010 B
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package _VisualDVM.Visual.Windows;
import Common.Visual.Windows.Dialog.Text.ComboTextDialog;
import _VisualDVM.Global;
import _VisualDVM.Utils;
import java.util.Vector;
public class CombineFilesDialog extends ComboTextDialog {
public CombineFilesDialog() {
fields.setEditable(true);
}
@Override
public void validateFields() {
super.validateFields();
if (Log.isEmpty()) {
String fileName = (String) fields.getSelectedItem();
// тут 2 случая. если имя файла совпадает с 1 из существующих, то все хорошо.
//если нет. тогда проверяем отсуствие слешей и полная валидация имени одиночного файла.
Vector<String> files_order = Global.mainModule.getProject().files_order;
if (!files_order.contains(fileName))
Utils.validateFileShortNewName(fileName, Log);
}
}
}