Set<MetricEvent> () { Set<MetricEvent> set = new HashSet<>(); EditorSettingsExternalizable es = EditorSettingsExternalizable.getInstance(); EditorSettingsExternalizable esDefault = new EditorSettingsExternalizable(new EditorSettingsExternalizable.OsSpecificState()); addBoolIfDiffers(set, es, esDefault, s -> s.isVirtualSpace(), Settings.CARET_AFTER_LINE_END); addBoolIfDiffers(set, es, esDefault, s -> s.isCaretInsideTabs(), Settings.CARET_INSIDE_TABS); addBoolIfDiffers(set, es, esDefault, s -> s.isAdditionalPageAtBottom(), Settings.VIRTUAL_SPACE_AT_FILE_BOTTOM); addBoolIfDiffers(set, es, esDefault, s -> s.isUseSoftWraps(SoftWrapAppliancePlaces.MAIN_EDITOR), Settings.SOFT_WRAPS); addBoolIfDiffers(set, es, esDefault, s -> s.isUseSoftWraps(SoftWrapAppliancePlaces.CONSOLE), Settings.SOFT_WRAPS_CONSOLE); addBoolIfDiffers(set, es, esDefault, s -> s.isUseSoftWraps(SoftWrapAppliancePlaces.PREVIEW), Settings.SOFT_WRAPS_PREVIEW); addBoolIfDiffers(set, es, esDefault, s -> s.isUseCustomSoftWrapIndent(), Settings.SOFT_WRAPS_RELATIVE_INDENT); addBoolIfDiffers(set, es, esDefault, s -> s.isAllSoftWrapsShown(), Settings.SOFT_WRAPS_SHOW_ALL); addIfDiffers(set, es, esDefault, s -> s.getStripTrailingSpaces(), Settings.STRIP_TRAILING_SPACES, TRAILING_SPACES_FIELD); addBoolIfDiffers(set, es, esDefault, s -> s.isEnsureNewLineAtEOF(), Settings.ENSURE_NEWLINE_AT_EOF); addBoolIfDiffers(set, es, esDefault, s -> s.isShowQuickDocOnMouseOverElement(), Settings.QUICK_DOC_ON_MOUSE_HOVER); addBoolIfDiffers(set, es, esDefault, s -> s.isBlinkCaret(), Settings.BLINKING_CARET); addIfDiffers(set, es, esDefault, s -> s.getBlinkPeriod(), Settings.BLINK_PERIOD, INT_VALUE_FIELD); addBoolIfDiffers(set, es, esDefault, s -> s.isBlockCursor(), Settings.BLOCK_CARET); addBoolIfDiffers(set, es, esDefault, s -> s.isRightMarginShown(), Settings.RIGHT_MARGIN); addBoolIfDiffers(set, es, esDefault, s -> s.isLineNumbersShown(), Settings.LINE_NUMBERS); addBoolIfDiffers(set, es, esDefault, s -> s.areGutterIconsShown(), Settings.GUTTER_ICONS); addBoolIfDiffers(set, es, esDefault, s -> s.isFoldingOutlineShown(), Settings.FOLDING_OUTLINE); addBoolIfDiffers(set, es, esDefault, s -> s.isFoldingOutlineShownOnlyOnHover(), Settings.FOLDING_OUTLINE_ONLY_ON_HOVER); addBoolIfDiffers(set, es, esDefault, s -> s.isWhitespacesShown() && s.isLeadingWhitespacesShown(), Settings.SHOW_LEADING_WHITESPACE); addBoolIfDiffers(set, es, esDefault, s -> s.isWhitespacesShown() && s.isInnerWhitespacesShown(), Settings.SHOW_INNER_WHITESPACE); addBoolIfDiffers(set, es, esDefault, s -> s.isWhitespacesShown() && s.isTrailingWhitespacesShown(), Settings.SHOW_TRAILING_WHITESPACE); addBoolIfDiffers(set, es, esDefault, s -> s.isIndentGuidesShown(), Settings.INDENT_GUIDES); addBoolIfDiffers(set, es, esDefault, s -> s.isSmoothScrolling(), Settings.ANIMATED_SCROLL); addBoolIfDiffers(set, es, esDefault, s -> s.isDndEnabled(), Settings.DRAG_N_DROP); addBoolIfDiffers(set, es, esDefault, s -> s.isWheelFontChangeEnabled(), Settings.WHEEL_ZOOM); addBoolIfDiffers(set, es, esDefault, s -> s.isMouseClickSelectionHonorsCamelWords(), Settings.MOUSE_CAMEL); addBoolIfDiffers(set, es, esDefault, s -> s.isVariableInplaceRenameEnabled(), Settings.INPLACE_RENAME); addBoolIfDiffers(set, es, esDefault, s -> s.isPreselectRename(), Settings.PRESELECT_ON_RENAME); addBoolIfDiffers(set, es, esDefault, s -> s.isShowInlineLocalDialog(), Settings.INLINE_DIALOG); addBoolIfDiffers(set, es, esDefault, s -> s.isRefrainFromScrolling(), Settings.MINIMIZE_SCROLLING); addBoolIfDiffers(set, es, esDefault, s -> s.isShowNotificationAfterReformat(), Settings.AFTER_REFORMAT_NOTIFICATION); addBoolIfDiffers(set, es, esDefault, s -> s.isShowNotificationAfterOptimizeImports(), Settings.AFTER_OPTIMIZE_NOTIFICATION); addBoolIfDiffers(set, es, esDefault, s -> s.isSmartHome(), Settings.SMART_HOME); addBoolIfDiffers(set, es, esDefault, s -> s.isCamelWords(), Settings.CAMEL_WORDS); addBoolIfDiffers(set, es, esDefault, s -> s.isBreadcrumbsAbove(), Settings.BREADCRUMBS_ABOVE); addBoolIfDiffers(set, es, esDefault, s -> s.isBreadcrumbsShown(), Settings.ALL_BREADCRUMBS); addBoolIfDiffers(set, es, esDefault, s -> s.isShowIntentionBulb(), Settings.INTENTION_BULB); addBoolIfDiffers(set, es, esDefault, s -> s.isDocCommentRenderingEnabled(), Settings.RENDER_DOC); addBoolIfDiffers(set, es, esDefault, s -> s.isShowIntentionPreview(), Settings.INTENTION_PREVIEW); addBoolIfDiffers(set, es, esDefault, s -> s.isUseEditorFontInInlays(), Settings.USE_EDITOR_FONT_IN_INLAYS); for (String language : es.getOptions().getLanguageBreadcrumbsMap().keySet()) { addBoolIfDiffers(set, es, esDefault, s -> s.isBreadcrumbsShownFor(language), Settings.BREADCRUMBS, EventFields.LanguageById.with(language)); } RichCopySettings rcs = RichCopySettings.getInstance(); RichCopySettings rcsDefault = new RichCopySettings(); addBoolIfDiffers(set, rcs, rcsDefault, s -> s.isEnabled(), Settings.RICH_COPY); CodeInsightSettings cis = CodeInsightSettings.getInstance(); CodeInsightSettings cisDefault = new CodeInsightSettings(); addBoolIfDiffers(set, cis, cisDefault, s -> s.AUTO_POPUP_PARAMETER_INFO, Settings.PARAMETER_AUTO_POPUP); addBoolIfDiffers(set, cis, cisDefault, s -> s.AUTO_POPUP_JAVADOC_INFO, Settings.JAVADOC_AUTO_POPUP); addBoolIfDiffers(set, cis, cisDefault, s -> s.AUTO_POPUP_COMPLETION_LOOKUP, Settings.COMPLETION_AUTO_POPUP); addIfDiffers(set, cis, cisDefault, s -> s.COMPLETION_CASE_SENSITIVE, Settings.COMPLETION_CASE_SENSITIVITY, INT_VALUE_FIELD); addBoolIfDiffers(set, cis, cisDefault, s -> s.isSelectAutopopupSuggestionsByChars(), Settings.AUTO_POPUP_CHAR_COMPLETE); addBoolIfDiffers(set, cis, cisDefault, s -> s.AUTOCOMPLETE_ON_CODE_COMPLETION, Settings.AUTO_COMPLETE_BASIC); addBoolIfDiffers(set, cis, cisDefault, s -> s.AUTOCOMPLETE_ON_SMART_TYPE_COMPLETION, Settings.AUTO_COMPLETE_SMART); addBoolIfDiffers(set, cis, cisDefault, s -> s.SHOW_FULL_SIGNATURES_IN_PARAMETER_INFO, Settings.PARAMETER_INFO_FULL_SIGNATURE); addIfDiffers(set, cis, cisDefault, s -> s.getBackspaceMode(), Settings.SMART_BACKSPACE, BACKSPACE_MODE); addBoolIfDiffers(set, cis, cisDefault, s -> s.SMART_INDENT_ON_ENTER, Settings.INDENT_ON_ENTER); addBoolIfDiffers(set, cis, cisDefault, s -> s.INSERT_BRACE_ON_ENTER, Settings.BRACE_ON_ENTER); addBoolIfDiffers(set, cis, cisDefault, s -> s.JAVADOC_STUB_ON_ENTER, Settings.JAVADOC_ON_ENTER); addBoolIfDiffers(set, cis, cisDefault, s -> s.INSERT_SCRIPTLET_END_ON_ENTER, Settings.SCRIPTLET_END_ON_ENTER); addBoolIfDiffers(set, cis, cisDefault, s -> s.SMART_END_ACTION, Settings.SMART_END); addBoolIfDiffers(set, cis, cisDefault, s -> s.JAVADOC_GENERATE_CLOSING_TAG, Settings.AUTO_CLOSE_JAVADOC_TAGS); addBoolIfDiffers(set, cis, cisDefault, s -> s.SURROUND_SELECTION_ON_QUOTE_TYPED, Settings.SURROUND_BY_QUOTE_OR_BRACE); addBoolIfDiffers(set, cis, cisDefault, s -> s.AUTOINSERT_PAIR_BRACKET, Settings.PAIR_BRACKET_AUTO_INSERT); addBoolIfDiffers(set, cis, cisDefault, s -> s.AUTOINSERT_PAIR_QUOTE, Settings.PAIR_QUOTE_AUTO_INSERT); addBoolIfDiffers(set, cis, cisDefault, s -> s.REFORMAT_BLOCK_ON_RBRACE, Settings.REFORMAT_ON_R_BRACE); addIfDiffers(set, cis, cisDefault, s -> s.REFORMAT_ON_PASTE, Settings.REFORMAT_ON_PASTE, INT_VALUE_FIELD); addIfDiffers(set, cis, cisDefault, s -> s.ADD_IMPORTS_ON_PASTE, Settings.IMPORTS_ON_PASTE, INT_VALUE_FIELD); addBoolIfDiffers(set, cis, cisDefault, s -> s.HIGHLIGHT_BRACES, Settings.BRACES_HIGHLIGHT); addBoolIfDiffers(set, cis, cisDefault, s -> s.HIGHLIGHT_SCOPE, Settings.SCOPE_HIGHLIGHT); addBoolIfDiffers(set, cis, cisDefault, s -> s.HIGHLIGHT_IDENTIFIER_UNDER_CARET, Settings.IDENTIFIER_UNDER_CARET_HIGHLIGHT); addBoolIfDiffers(set, cis, cisDefault, s -> s.ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY, Settings.AUTO_ADD_IMPORTS); addBoolIfDiffers(set, cis, cisDefault, s -> s.SHOW_PARAMETER_NAME_HINTS_ON_COMPLETION, Settings.COMPLETION_HINTS); addBoolIfDiffers(set, cis, cisDefault, s -> s.TAB_EXITS_BRACKETS_AND_QUOTES, Settings.TAB_EXITS_BRACKETS_AND_QUOTES); addTooltipActionsMetricIfDiffers(set); DaemonCodeAnalyzerSettings dcas = DaemonCodeAnalyzerSettings.getInstance(); DaemonCodeAnalyzerSettings dcasDefault = new DaemonCodeAnalyzerSettings(); addBoolIfDiffers(set, dcas, dcasDefault, s -> s.isNextErrorActionGoesToErrorsFirst(), Settings.NEXT_ERROR_ACTION_GOES_TO_ERRORS_FIRST); addIfDiffers(set, dcas, dcasDefault, s -> s.getAutoReparseDelay(), Settings.AUTO_REPARSE_DELAY, INT_VALUE_FIELD); addIfDiffers(set, dcas, dcasDefault, s -> s.getErrorStripeMarkMinHeight(), Settings.ERROR_STRIPE_MARK_MIN_HEIGHT, INT_VALUE_FIELD); addBoolIfDiffers(set, dcas, dcasDefault, s -> s.isSuppressWarnings(), Settings.SUPPRESS_WARNINGS); addBoolIfDiffers(set, dcas, dcasDefault, s -> s.isImportHintEnabled(), Settings.IMPORT_HINT_ENABLED); addBoolIfDiffers(set, dcas, dcasDefault, s -> s.SHOW_METHOD_SEPARATORS, Settings.SHOW_METHOD_SEPARATORS); final CaretStopOptionsTransposed defaultCaretStop = CaretStopOptionsTransposed.fromCaretStopOptions(new CaretStopOptions()); final CaretStopOptionsTransposed caretStop = CaretStopOptionsTransposed.fromCaretStopOptions(es.getCaretStopOptions()); addIfDiffers(set, caretStop.getLineBoundary(), defaultCaretStop.getLineBoundary(), s -> toCaretStopValue(s), Settings.CARET_MOVEMENT_WORD, CARET_STOP_BOUNDARIES); addIfDiffers(set, caretStop.getWordBoundary(), defaultCaretStop.getWordBoundary(), s -> toCaretStopValue(s), Settings.CARET_MOVEMENT_LINE, CARET_STOP_BOUNDARIES); if (!FileColorManagerImpl._isEnabled()) { set.add(SETTING.metric(SETTING_ID.with(Settings.FILE_COLORS_ENABLED), EventFields.Enabled.with(false))); } if (!FileColorManagerImpl._isEnabledForProjectView()) { set.add(SETTING.metric(SETTING_ID.with(Settings.FILE_COLORS_ENABLED_FOR_PROJECT_VIEW), EventFields.Enabled.with(false))); } if (!FileColorManagerImpl._isEnabledForTabs()) { set.add(SETTING.metric(SETTING_ID.with(Settings.FILE_COLORS_ENABLED_FOR_TABS), EventFields.Enabled.with(false))); } UISettings uiSettings = UISettings.getInstance(); UISettings uiSettingsDefault = new UISettings(); addBoolIfDiffers(set, uiSettings, uiSettingsDefault, s -> s.getOpenTabsInMainWindow(), Settings.OPEN_TABS_IN_MAIN_WINDOW); return set; }