void (@NotNull FileEditorManagerEvent event) { if (!myResourceBundle.isValid()) return; // Ignore events which don't target current editor. FileEditor oldEditor = event.getOldEditor(); FileEditor newEditor = event.getNewEditor(); if (oldEditor != this && newEditor != this) { return; } // We want to sync selected property key on selection change. if (newEditor == this) { if (oldEditor instanceof TextEditor) { myPropertiesInsertDeleteManager.reload(); setStructureViewSelectionFromPropertiesFile(((TextEditor)oldEditor).getEditor()); } else if (myPropertyToSelectWhenVisible != null) { setStructureViewSelection(myPropertyToSelectWhenVisible); myPropertyToSelectWhenVisible = null; } } else if (newEditor instanceof TextEditor) { setPropertiesFileSelectionFromStructureView(((TextEditor)newEditor).getEditor()); } }