コード例 #1
0
 @Override
 public void setState(@NotNull FileEditorState state) {
   ResourceBundleEditorState myState = (ResourceBundleEditorState) state;
   String propertyName = myState.myPropertyName;
   if (propertyName != null) {
     setStructureViewSelection(propertyName);
   }
 }
コード例 #2
0
 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);
 }