@Override public void setState(@NotNull FileEditorState state) { ResourceBundleEditorState myState = (ResourceBundleEditorState) state; String propertyName = myState.myPropertyName; if (propertyName != null) { setStructureViewSelection(propertyName); } }
private void setStructureViewSelectionFromPropertiesFile(@NotNull Editor propertiesFileEditor) { int line = propertiesFileEditor.getCaretModel().getLogicalPosition().line; Document document = propertiesFileEditor.getDocument(); if (line >= document.getLineCount()) { return; } final String propertyName = getPropertyName(document, line); if (propertyName == null) { return; } setStructureViewSelection(propertyName); }