рефакторинг хранения окон
This commit is contained in:
@@ -77,10 +77,10 @@ public class SPFEditor extends BaseEditor implements SPFEditorInterface {
|
||||
if (e.isControlDown()) {
|
||||
switch (e.getKeyCode()) {
|
||||
case KeyEvent.VK_F:
|
||||
UI.ShowSearchForm(false);
|
||||
Global.mainModule.getUI().ShowSearchForm(false);
|
||||
break;
|
||||
case KeyEvent.VK_H:
|
||||
UI.ShowSearchForm(true);
|
||||
Global.mainModule.getUI().ShowSearchForm(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.ProjectData.Files.UI;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -36,7 +37,7 @@ public class FilesHyperlinksPanel extends JPanel {
|
||||
String[] data = links.get(index).split(":");
|
||||
String file = data[0];
|
||||
int line = Integer.parseInt(data[1]);
|
||||
UI.getMainWindow().getProjectWindow().GotoFile(file, line, true);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().GotoFile(file, line, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -70,14 +70,14 @@ public class FilesTree extends StyledTree {
|
||||
if (o instanceof File) {
|
||||
Global.mainModule.set(Current.SelectedDirectory, o);
|
||||
Global.mainModule.set(Current.SelectedFile, null);
|
||||
UI.getMainWindow().getProjectWindow().ShowNoSelectedFile();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowNoSelectedFile();
|
||||
} else if (o instanceof DBProjectFile) {
|
||||
Global.mainModule.set(Current.SelectedFile, o);
|
||||
File file = ((DBProjectFile) o).file;
|
||||
Global.mainModule.set(Current.SelectedDirectory, file.getParentFile());
|
||||
UI.getMainWindow().getProjectWindow().ShowSelectedFile();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowSelectedFile();
|
||||
}
|
||||
UI.getMainWindow().getProjectWindow().ShowSelectedDirectory();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowSelectedDirectory();
|
||||
}
|
||||
@Override
|
||||
public void LeftMouseAction2() {
|
||||
@@ -86,7 +86,7 @@ public class FilesTree extends StyledTree {
|
||||
if (o instanceof DBProjectFile) {
|
||||
//очень важно. иначе по открытии файла дерево остается в фокусе.
|
||||
//и не происходит прокрутки скролла к строке!!
|
||||
UI.getMainWindow().getProjectWindow().FocusFileTabs();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusFileTabs();
|
||||
Global.mainModule.getPass(PassCode.OpenCurrentFile).Do(o);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user