AnAction (JBSplitter splitter) { updateStubDetailsTreeView(PropertiesComponent.getInstance().getBoolean(PROPERTY_NAME, DEFAULT_SHOW_STUB_DETAILS), splitter); return new ToggleAction(DevPsiViewerBundle.message("action.show.stub.details.text"), null, AllIcons.Actions.PreviewDetails) { @Override public boolean isSelected(@NotNull AnActionEvent e) { return PropertiesComponent.getInstance().getBoolean(PROPERTY_NAME, DEFAULT_SHOW_STUB_DETAILS); } @Override public void setSelected(@NotNull AnActionEvent e, boolean state) { PropertiesComponent.getInstance().setValue(PROPERTY_NAME, state, DEFAULT_SHOW_STUB_DETAILS); updateStubDetailsTreeView(state, splitter); if (state) { valueChanged(myStubViewerTree.getSelectedStub()); } } @Override public @NotNull ActionUpdateThread getActionUpdateThread() { return ActionUpdateThread.BGT; } }; }