no message

This commit is contained in:
2024-10-08 23:21:47 +03:00
parent 31c0cad38f
commit 42675d55d8
4 changed files with 14 additions and 11 deletions

View File

@@ -50,8 +50,10 @@ public class SearchReplaceForm extends Form {
public void DropMatchCount() {
lCount.setText("0");
}
public void setEditor(RSyntaxTextArea editor_in) {
public void updateEditor(RSyntaxTextArea editor_in) {
editor = editor_in;
if (isVisible())
requestFocus();
}
@Override
protected JPanel getMainPanel() {
@@ -127,7 +129,7 @@ public class SearchReplaceForm extends Form {
}
@Override
protected String getFormKey() {
return FormType.SearchReplace.toString();
return "SearchReplace";
}
private void createUIComponents() {
// TODO: place custom component creation code here

View File

@@ -31,7 +31,7 @@ public class CloseCurrentFile extends Pass_2021<DBProjectFile> {
target.form.SaveSplitters();
target.UpdateLastLine(target.form.getEditor().getCurrentLine());
passes.get(PassCode_2021.Save).Do();
UI.getSearchReplaceForm().ClearMarkers();
UI.getSearchReplaceWindow().ClearMarkers();
target.form = null;
}
@Override

View File

@@ -7,7 +7,6 @@ import _VisualDVM.Global;
import Common_old.UI.Menus_2023.MainMenuBar.MainWindow;
import Common_old.UI.UI;
import Common.Visual.Windows.Form;
import Common_old.UI.Windows.FormType;
import TestingSystem.Common.Group.Group;
import TestingSystem.Common.Test.Test;
import Visual_DVM_2021.Passes.PassCode_2021;
@@ -36,7 +35,7 @@ public class MainForm extends Form implements MainWindow {
}
@Override
protected String getFormKey() {
return FormType.Main.toString();
return "Main"; //можно было бы через имя класса
}
@Override
public String getIconPath() {
@@ -59,8 +58,8 @@ public class MainForm extends Form implements MainWindow {
SaveTestsPanel();
SaveTestingPanel();
//--
if (UI.debugWindow != null)
((FormWithSplitters) UI.debugWindow).SaveSplitters();
if (UI.getDebugWindow() != null)
((FormWithSplitters) UI.getDebugWindow()).SaveSplitters();
//--
((GlobalDatabase)CommonUtils.db).SaveCredentials();
//--

View File

@@ -1,7 +1,6 @@
package Visual_DVM_2021.UI.Main;
import Common.Utils.CommonUtils;
import Common.Visual.Windows.Dialog.Dialog;
import Common_old.UI.Windows.FormType;
import Common.Database.Objects.DBForm.DBForm;
import GlobalData.GlobalDatabase;
//todo разобраться с DBform
@@ -55,9 +54,12 @@ public class ProfilesForm extends Dialog<Object, ProfilesFields> {
ex.printStackTrace();
}
}
protected String getFormKey() {
return "Profiles"; //можно было бы через имя класса
}
public void LoadWindowParameters() throws Exception {
if (((GlobalDatabase)CommonUtils.db).forms.Data.containsKey(FormType.Profiles.toString())) {
info = ((GlobalDatabase)CommonUtils.db).forms.Data.get(FormType.Profiles.toString());
if (((GlobalDatabase)CommonUtils.db).forms.Data.containsKey(getFormKey())) {
info = ((GlobalDatabase)CommonUtils.db).forms.Data.get(getFormKey());
info.Apply(this);
return;
}
@@ -68,6 +70,6 @@ public class ProfilesForm extends Dialog<Object, ProfilesFields> {
info.Init(this);
CommonUtils.db.Update(info);
} else
CommonUtils.db.Insert(new DBForm(FormType.Profiles.toString(), this));
CommonUtils.db.Insert(new DBForm(getFormKey(), this));
}
}