Check if file is already open

master
Marco Maccaferri 2018-12-23 05:23:08 +01:00
rodzic 96fd4a4c49
commit a8cd985d0a
1 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -1189,6 +1189,17 @@ public class Application {
}
void openSourceTab(File file) {
CTabItem[] tabItem = tabFolder.getItems();
for (int i = 0; i < tabItem.length; i++) {
SourceEditorTab tab = (SourceEditorTab) tabItem[i].getData();
if (file.equals(tab.getFile())) {
tabFolder.setSelection(tab.getTabItem());
if (tabFolder.getSelection() != null) {
tabFolder.getSelection().getControl().setFocus();
}
return;
}
}
BusyIndicator.showWhile(display, new Runnable() {
@Override