void () { super.doCancelAction(); PsiViewerSettings settings = PsiViewerSettings.getSettings(); PsiViewerSourceWrapper wrapper = (PsiViewerSourceWrapper)myFileTypeComboBox.getSelectedItem(); if (wrapper != null) settings.type = wrapper.getText(); if (!myExternalDocument) { settings.text = StringUtil.first(myEditor.getDocument().getText(), 2048, true); } settings.showTreeNodes = myShowTreeNodesCheckBox.isSelected(); settings.showWhiteSpaces = myShowWhiteSpacesBox.isSelected(); Object selectedDialect = myDialectComboBox.getSelectedItem(); settings.dialect = myDialectComboBox.isVisible() && selectedDialect != null ? selectedDialect.toString() : ""; settings.textDividerLocation = myTextSplit.getDividerLocation(); settings.treeDividerLocation = myTreeSplit.getDividerLocation(); }