no message

This commit is contained in:
2024-10-14 21:55:58 +03:00
parent 7f1d21a067
commit 1f6cc4a579
18 changed files with 129 additions and 124 deletions

View File

@@ -67,6 +67,7 @@ public class FileForm implements FileWindow, FormWithSplitters {
private TreeForm arraysForm;
//-
private SPFEditor Body = null; //времянка? не очень красиво.
FileMenuBar fileMenuBar= null;
//-
public FileForm(DBProjectFile file_in) {
LoadSplitters();
@@ -90,11 +91,11 @@ public class FileForm implements FileWindow, FormWithSplitters {
ShowGCOVLog();
ShowAllAnalyses();
Body.addCaretListener(ce -> ShowCaretInfo());
editorPanel.add(UI.fileMenuBar = new FileMenuBar(Body), BorderLayout.NORTH);
editorPanel.add(fileMenuBar = new FileMenuBar(Body), BorderLayout.NORTH);
ShowCaretInfo();
Body.requestFocus();
RefreshTabsNames();
UI.fileMenuBar.sToGo.addChangeListener(e -> Body.gotoLine((Integer) UI.fileMenuBar.sToGo.getValue()));
fileMenuBar.sToGo.addChangeListener(e -> Body.gotoLine((Integer) fileMenuBar.sToGo.getValue()));
ShowProperties();
Global.mainModule.getPass(PassCode.Save).setControlsEnabled(false);
//-
@@ -122,11 +123,11 @@ public class FileForm implements FileWindow, FormWithSplitters {
Body.setSyntaxEditingStyle(file.languageName.getStyleKey());
Body.setCodeFoldingEnabled(true);
Body.switching_language = false;
UI.fileMenuBar.ShowLanguage();
fileMenuBar.ShowLanguage();
}
@Override
public void ShowType() {
UI.fileMenuBar.ShowType();
fileMenuBar.ShowType();
}
@Override
public void ShowStyle() {
@@ -149,7 +150,7 @@ public class FileForm implements FileWindow, FormWithSplitters {
}
}
Body.switching_language = false;
UI.fileMenuBar.ShowStyle();
fileMenuBar.ShowStyle();
}
@Override
public SPFEditorInterface getEditor() {
@@ -299,12 +300,12 @@ public class FileForm implements FileWindow, FormWithSplitters {
int new_current_line = Body.getCurrentLine();
boolean line_changed = (new_current_line != current_file_line);
current_file_line = new_current_line;
UI.fileMenuBar.sToGo.setModel(new SpinnerNumberModel(current_file_line,
fileMenuBar.sToGo.setModel(new SpinnerNumberModel(current_file_line,
1, Body.getLineCount(), 1
));
//-
UI.fileMenuBar.ShowLinesCount();
UI.fileMenuBar.CurrentSymbolLabel.setText(String.valueOf(Body.getCurrentSymbol()));
fileMenuBar.ShowLinesCount();
fileMenuBar.CurrentSymbolLabel.setText(String.valueOf(Body.getCurrentSymbol()));
//если выделяем строку из графа, то тоже надо отключиьт события.
//чтобы по ней не начался поиск.
if (events_on && line_changed) {