{"repo": "0verEngineer/InlineProblems", "pr_number": 76, "pr_title": "added feature to hover and click in a error and get context window ", "pr_state": "merged", "pr_author": "khopland", "base_branch": "main", "head_branch": "feature/67-inline-click", "created_at": "2025-04-24T23:44:13Z", "merged_at": "2025-05-01T12:38:13Z", "base_ref_oid": "2adbca9050c540d54ede18035a93c97841a8ced1", "head_ref_oid": "46a6aaf4e6b53dd275e914ed750aaa8415c37b40", "base_commit": {"oid": "2adbca9050c540d54ede18035a93c97841a8ced1", "message": "Create FUNDING.yml", "authoredDate": "2025-04-12T12:12:21Z", "author": {"name": "Julian Hackinger", "email": "dev@hackinger.net", "user": {"login": "0verEngineer"}}}, "rounds": [{"round_index": 0, "review_state": "COMMENTED", "review_author": "khopland", "submitted_at": "2025-04-25T19:27:41Z", "feedback_type": "inline", "review_author_association": "CONTRIBUTOR", "inline_comments": [{"id": "PRRC_kwDOImWGlc561QIo", "body": "I don't have a better name \ud83e\udd37\ud83c\udffb, any ideas to what to name it?", "path": "src/main/resources/messages/SettingsBundle_en.properties", "originalLine": 56, "line": null, "originalStartLine": null, "startLine": null, "position": 1, "originalPosition": 7, "outdated": true, "subjectType": "LINE", "authorAssociation": "CONTRIBUTOR", "originalCommit": {"oid": "4dbdf85f150d750afece3ed712385763a4e66602"}, "diffHunk": "@@ -52,4 +52,5 @@ settings.forceProblemsInOneLine=Force problems in the same line even if they are\n settings.useEditorFont=Use editor font instead of tooltip font\n settings.showOnlyHighestPerLine=Show only the problem with the highest severity per line\n settings.enableHtmlStripping=Enable stripping of HTML in the messages\n-settings.enableXmlUnescaping=Enable unescaping of XML in the messages\n\\ No newline at end of file\n+settings.enableXmlUnescaping=Enable unescaping of XML in the messages\n+settings.enableHovering=Enable hovering", "replyTo": null, "createdAt": "2025-04-25T19:27:40Z", "author": {"login": "khopland"}, "reactions": {"totalCount": 0, "nodes": []}, "in_reply_to_id": null, "suggested_changes": [], "extended_context": "settings.additionalSeveritiesWeakWarningDesc=Semicolon separated list of additional weak-warning severities e.g. '10, 100'\nsettings.infoTextColor=Info text color:\nsettings.infoLabelBorderColor=Info label border color:\nsettings.infoLineHighlightColor=Info line highlight color:\nsettings.additionalSeveritiesInfoDesc=Semicolon separated list of additional info severities e.g. '10, 100'\nsettings.forceProblemsInOneLine=Force problems in the same line even if they are too long to fit\nsettings.useEditorFont=Use editor font instead of tooltip font\nsettings.showOnlyHighestPerLine=Show only the problem with the highest severity per line\nsettings.enableHtmlStripping=Enable stripping of HTML in the messages\nsettings.enableXmlUnescaping=Enable unescaping of XML in the messages", "referenced_paths": []}], "body_comments": [], "response_commits": [], "force_pushes": [{"__typename": "HeadRefForcePushedEvent", "createdAt": "2025-04-25T23:11:41Z", "beforeCommit": {"oid": "4dbdf85f150d750afece3ed712385763a4e66602", "tree": {"oid": "d3144eb780d31ad7dc9183f57e20a92ceba2d395"}}, "afterCommit": {"oid": "5091d9fd353dbf94d66867a484eba6bfcaf3109d", "tree": {"oid": "e3415603e57bbcd4fe04a72927ae1b9d7971882b"}}, "is_rebase_only": false}], "builds_on_rounds": [], "references_repo_structure": false, "ci_state_at_review": null, "ci_state_after_response": null, "ci_transition": "no_response_commits", "response_commit_diffs": {}, "has_code_backing": false, "head_commit_at_review": "5091d9fd353dbf94d66867a484eba6bfcaf3109d", "file_contents_at_review": {"src/main/resources/messages/SettingsBundle_en.properties": "settings.showErrors=Show errors\nsettings.highlightErrors=Highlight errors\nsettings.showErrorsInGutter=Show error icons in gutter\nsettings.showWarnings=Show warnings\nsettings.highlightWarnings=Highlight warnings\nsettings.showWarningsInGutter=Show warning icons in gutter\nsettings.showWeakWarnings=Show weak warnings\nsettings.highlightWeakWarnings=Highlight weak warnings\nsettings.showWeakWarningsInGutter=Show weak warning icons in gutter\nsettings.showInfos=Show infos\nsettings.highlightInfos=Highlight infos\nsettings.showInfosInGutter=Show info icons in gutter\nsettings.submenu.label=Box / Label\nsettings.drawBoxesAroundProblemLabels=Draw boxes around problem labels\nsettings.roundedCornerBoxes=Rounded corners\nsettings.fillProblemLabels=Fill problem label background\nsettings.boldProblemLabels=Bold problem labels\nsettings.italicProblemLabels=Italic problem labels\nsettings.submenu.general=General\nsettings.activeProblemListener=Enabled problem listener\nsettings.markupModelListenerDescription=- MarkupModelListener (default): Called after addition of a RangeHighlighter to a file. Faster on large files, slower on small ones.\nsettings.highlightProblemListenerDescription=- HighlightProblemListener: Faster on small to medium sized files, slower on large ones. Called very often and can cause slowdowns.\nsettings.manualScannerDescription=- ManualScanner: Scans the DocumentMarkupModel for all highlighters at a fixed delay, uses the same logic\nsettings.manualScannerDescriptionSupplement= as HighlightProblemListener but can help with slowdowns on big files.\nsettings.manualScannerDelayLabel=ManualScanner delay in milliseconds\nsettings.manualScannerDelayTooltip=Delay between manual scans, only used when ManualScanner is enabled\nsettings.inlaySizeDelta=Inlay size delta\nsettings.inlaySizeDeltaTooltip=Used to have smaller font size for the inlays, should be smaller than editor font size\nsettings.problemFilterListLabel=Problem filter list\nsettings.problemFilterListTooltip=Semicolon separated list of problem text beginnings that will not be handled\nsettings.fileExtensionBlacklistLabel=File extension blacklist\nsettings.fileExtensionBlaclistTooltip=Semicolon separated list of file extensions to ignore (like \".java;.md\")\nsettings.submenu.colors=Colors\nsettings.errorTextColor=Error text color:\nsettings.errorLabelBorderColor=Error label border color:\nsettings.errorLineHighlightColor=Error line highlight color:\nsettings.additionalSeverities=Additional severities:\nsettings.additionalSeveritiesErrorDesc=Semicolon separated list of additional error severities e.g. '10, 100'\nsettings.warningTextColor=Warning text color:\nsettings.warningLabelBorderColor=Warning label border color:\nsettings.warningLineHighlightColor=Warning line highlight color:\nsettings.additionalSeveritiesWarningDesc=Semicolon separated list of additional warning severities e.g. '10, 100'\nsettings.weakWarningTextColor=Weak warning text color:\nsettings.weakWarningLabelBorderColor=Weak warning label border color:\nsettings.weakWarningLineHighlightColor=Weak warning line highlight color:\nsettings.additionalSeveritiesWeakWarningDesc=Semicolon separated list of additional weak-warning severities e.g. '10, 100'\nsettings.infoTextColor=Info text color:\nsettings.infoLabelBorderColor=Info label border color:\nsettings.infoLineHighlightColor=Info line highlight color:\nsettings.additionalSeveritiesInfoDesc=Semicolon separated list of additional info severities e.g. '10, 100'\nsettings.forceProblemsInOneLine=Force problems in the same line even if they are too long to fit\nsettings.useEditorFont=Use editor font instead of tooltip font\nsettings.showOnlyHighestPerLine=Show only the problem with the highest severity per line\nsettings.enableHtmlStripping=Enable stripping of HTML in the messages\nsettings.enableXmlUnescaping=Enable unescaping of XML in the messages\nsettings.enableHovering=Enable hovering"}}, {"round_index": 1, "review_state": "CHANGES_REQUESTED", "review_author": "0verEngineer", "submitted_at": "2025-04-28T20:42:51Z", "feedback_type": "inline", "review_author_association": "OWNER", "inline_comments": [{"id": "PRRC_kwDOImWGlc56_s4F", "body": "Hmm, i mean hovering is only 20% of the feature, the click and the context actions is 80% so wouldn't `Enable clickable inline problems for IDE context actions.` be a way better description?", "path": "src/main/resources/messages/SettingsBundle_en.properties", "originalLine": 56, "line": null, "originalStartLine": null, "startLine": null, "position": 1, "originalPosition": 7, "outdated": true, "subjectType": "LINE", "authorAssociation": "OWNER", "originalCommit": {"oid": "4dbdf85f150d750afece3ed712385763a4e66602"}, "diffHunk": "@@ -52,4 +52,5 @@ settings.forceProblemsInOneLine=Force problems in the same line even if they are\n settings.useEditorFont=Use editor font instead of tooltip font\n settings.showOnlyHighestPerLine=Show only the problem with the highest severity per line\n settings.enableHtmlStripping=Enable stripping of HTML in the messages\n-settings.enableXmlUnescaping=Enable unescaping of XML in the messages\n\\ No newline at end of file\n+settings.enableXmlUnescaping=Enable unescaping of XML in the messages\n+settings.enableHovering=Enable hovering", "replyTo": {"id": "PRRC_kwDOImWGlc561QIo"}, "createdAt": "2025-04-28T12:04:44Z", "author": {"login": "0verEngineer"}, "reactions": {"totalCount": 1, "nodes": [{"content": "THUMBS_UP", "user": {"login": "khopland"}}]}, "in_reply_to_id": "PRRC_kwDOImWGlc561QIo", "suggested_changes": [], "extended_context": "settings.additionalSeveritiesWeakWarningDesc=Semicolon separated list of additional weak-warning severities e.g. '10, 100'\nsettings.infoTextColor=Info text color:\nsettings.infoLabelBorderColor=Info label border color:\nsettings.infoLineHighlightColor=Info line highlight color:\nsettings.additionalSeveritiesInfoDesc=Semicolon separated list of additional info severities e.g. '10, 100'\nsettings.forceProblemsInOneLine=Force problems in the same line even if they are too long to fit\nsettings.useEditorFont=Use editor font instead of tooltip font\nsettings.showOnlyHighestPerLine=Show only the problem with the highest severity per line\nsettings.enableHtmlStripping=Enable stripping of HTML in the messages\nsettings.enableXmlUnescaping=Enable unescaping of XML in the messages", "referenced_paths": []}, {"id": "PRRC_kwDOImWGlc56_tKN", "body": "Add an empty line please", "path": "src/main/java/org/overengineer/inlineproblems/settings/SettingsComponent.java", "originalLine": 326, "line": 326, "originalStartLine": null, "startLine": null, "position": 50, "originalPosition": 31, "outdated": false, "subjectType": "LINE", "authorAssociation": "OWNER", "originalCommit": {"oid": "5091d9fd353dbf94d66867a484eba6bfcaf3109d"}, "diffHunk": "@@ -317,6 +321,13 @@ public void setItalicProblemLabels(boolean isSelected) {\n italicProblemLabels.setSelected(isSelected);\n }\n \n+ public boolean isHovering() {\n+ return enableHovering.isSelected();\n+ }", "replyTo": null, "createdAt": "2025-04-28T12:05:38Z", "author": {"login": "0verEngineer"}, "reactions": {"totalCount": 1, "nodes": [{"content": "THUMBS_UP", "user": {"login": "khopland"}}]}, "in_reply_to_id": null, "suggested_changes": [], "extended_context": " public void setItalicProblemLabels(boolean isSelected) {\n italicProblemLabels.setSelected(isSelected);\n }\n\n public boolean isShowErrors() {\n return showErrors.isSelected();\n }\n\n public void setShowErrors(final boolean isSelected) {\n showErrors.setSelected(isSelected);\n }\n\n public boolean isHighlightErrors() {\n return highlightErrors.isSelected();\n }\n\n public void setHighlightErrors(boolean isSelected) {\n highlightErrors.setSelected(isSelected);\n }\n\n public boolean isShowErrorsInGutter() {", "referenced_paths": []}, {"id": "PRRC_kwDOImWGlc56_uUV", "body": "Can we move this above the if/else, there area other things that get set.", "path": "src/main/java/org/overengineer/inlineproblems/entities/InlineProblem.java", "originalLine": 77, "line": null, "originalStartLine": null, "startLine": null, "position": 1, "originalPosition": 12, "outdated": true, "subjectType": "LINE", "authorAssociation": "OWNER", "originalCommit": {"oid": "5091d9fd353dbf94d66867a484eba6bfcaf3109d"}, "diffHunk": "@@ -73,6 +74,7 @@ public InlineProblem(\n this.actualEndOffset = highlightInfo.getActualEndOffset();\n else\n this.actualEndOffset = highlightInfo.getActualEndOffset() -1;\n+ this.actualStartffset = highlightInfo.getStartOffset();", "replyTo": null, "createdAt": "2025-04-28T12:08:56Z", "author": {"login": "0verEngineer"}, "reactions": {"totalCount": 1, "nodes": [{"content": "THUMBS_UP", "user": {"login": "khopland"}}]}, "in_reply_to_id": null, "suggested_changes": [], "extended_context": " this.file = filePath;\n this.project = textEditor.getEditor().getProject();\n this.highlightInfoStartOffset = highlightInfo.hashCode();\n this.rangeHighlighterHashCode = rangeHighlighter.hashCode();\n\n if (highlightInfo.getActualEndOffset() == 0)\n this.actualEndOffset = highlightInfo.getActualEndOffset();\n else\n this.actualEndOffset = highlightInfo.getActualEndOffset() -1;\n }\n\n private String getTextWithHtmlStrippingAndXmlUnescaping(String text, SettingsState settingsState) {\n if (\n settingsState.isEnableHtmlStripping() &&\n text.contains(\"<\") &&\n RegexPattern.HTML_TAG_PATTERN.matcher(text).find()\n ) {\n text = StringUtil.stripHtml(text, \" \");\n }\n\n if (", "referenced_paths": []}, {"id": "PRRC_kwDOImWGlc56_xX8", "body": "Remove the empty line please", "path": "src/main/java/org/overengineer/inlineproblems/InlineProblemLabel.java", "originalLine": 215, "line": null, "originalStartLine": null, "startLine": null, "position": 1, "originalPosition": 174, "outdated": true, "subjectType": "LINE", "authorAssociation": "OWNER", "originalCommit": {"oid": "5091d9fd353dbf94d66867a484eba6bfcaf3109d"}, "diffHunk": "@@ -147,10 +167,64 @@ public void paint(@NotNull Inlay inlay, @NotNull Graphics graphics, @NotNull Rec\n targetRegion.x + DRAW_STRING_LINE_PLACEMENT_OFFSET_X,\n targetRegion.y + DRAW_STRING_LINE_PLACEMENT_OFFSET_Y + editor.getAscent()\n );\n+ if (hovered)\n+ EffectPainter.LINE_UNDERSCORE.paint(\n+ (Graphics2D) graphics,\n+ targetRegion.x - DRAW_BOX_WIDTH_OFFSET,\n+ targetRegion.y + editor.getAscent() ,\n+ width + (DRAW_BOX_WIDTH_OFFSET * 2),\n+ editor.getAscent(),\n+ FontUtil.getActiveFont(editor));\n+ }\n+\n+ private void setHovered(boolean hovered) {\n+ if (!this.hoveredEnabled || this.hovered == hovered) {\n+ return;\n+ }\n+ this.hovered = hovered;\n+ if (inlay != null)\n+ inlay.repaint();\n }\n \n @Override\n public @Nullable GutterIconRenderer calcGutterIconRenderer(@NotNull Inlay inlay) {\n return EditorCustomElementRenderer.super.calcGutterIconRenderer(inlay);\n }\n+\n+ @Override\n+ public void mouseClicked(@NotNull MouseEvent mouseEvent, @NotNull Point point) {\n+ if (!hoveredEnabled) {\n+ return;\n+ }\n+ if (mouseEvent.getButton() == MouseEvent.BUTTON1) {\n+ mouseEvent.consume();\n+\n+ var editor = inlay.getEditor();\n+ editor.getCaretModel().moveToOffset(actualStartOffset);\n+ editor.getScrollingModel().scrollToCaret(ScrollType.CENTER);\n+\n+ var action = ActionManager.getInstance().getAction(IdeActions.ACTION_SHOW_INTENTION_ACTIONS);\n+ if (action == null) {\n+ Project project = editor.getProject();\n+ if (project == null) return;\n+ PsiFile psiFileInEditor = PsiUtilBase.getPsiFileInEditor(editor, project);\n+ if (psiFileInEditor == null) return;\n+ new ShowIntentionActionsHandler().invoke(project, editor, psiFileInEditor, false);\n+ } else {\n+ ActionUtil.invokeAction((AnAction) action, editor.getComponent(), \"EditorInlay\", null, null);\n+", "replyTo": null, "createdAt": "2025-04-28T12:17:39Z", "author": {"login": "0verEngineer"}, "reactions": {"totalCount": 1, "nodes": [{"content": "THUMBS_UP", "user": {"login": "khopland"}}]}, "in_reply_to_id": null, "suggested_changes": [], "extended_context": "", "referenced_paths": []}], "body_comments": [], "response_commits": [{"oid": "46a6aaf4e6b53dd275e914ed750aaa8415c37b40", "message": "small format changes and rename variable to clickableContext", "authoredDate": "2025-04-29T16:49:35Z", "author": {"user": {"login": "khopland"}, "name": "Kristoffer Larsen Hopland"}, "statusCheckRollup": null, "author_type": "human", "agent_commit_signals": [], "ci_state": null, "ci_contexts": [], "ci_failed_checks": [], "ci_test_check_failed": false}], "force_pushes": [], "builds_on_rounds": [], "references_repo_structure": false, "ci_state_at_review": null, "ci_state_after_response": null, "ci_transition": "no_ci", "response_commit_diffs": {"46a6aaf4e6b53dd275e914ed750aaa8415c37b40": {"src/main/java/org/overengineer/inlineproblems/InlineProblemLabel.java": [[42, 48], [79, 85], [178, 184], [193, 199], [212, 217]], "src/main/java/org/overengineer/inlineproblems/entities/InlineProblem.java": [[69, 80]], "src/main/java/org/overengineer/inlineproblems/settings/SettingsComponent.java": [[68, 74], [79, 85], [135, 141], [157, 163], [268, 275], [321, 332], [612, 618]], "src/main/java/org/overengineer/inlineproblems/settings/SettingsConfigurable.java": [[52, 58], [144, 150], [215, 221]], "src/main/java/org/overengineer/inlineproblems/settings/SettingsState.java": [[40, 46]], "src/main/resources/messages/SettingsBundle_en.properties": [[53, 56]], "src/main/resources/messages/SettingsBundle_zh_CN.properties": [[51, 54]]}}, "has_code_backing": true, "head_commit_at_review": "5091d9fd353dbf94d66867a484eba6bfcaf3109d", "file_contents_at_review": {"src/main/resources/messages/SettingsBundle_en.properties": "settings.showErrors=Show errors\nsettings.highlightErrors=Highlight errors\nsettings.showErrorsInGutter=Show error icons in gutter\nsettings.showWarnings=Show warnings\nsettings.highlightWarnings=Highlight warnings\nsettings.showWarningsInGutter=Show warning icons in gutter\nsettings.showWeakWarnings=Show weak warnings\nsettings.highlightWeakWarnings=Highlight weak warnings\nsettings.showWeakWarningsInGutter=Show weak warning icons in gutter\nsettings.showInfos=Show infos\nsettings.highlightInfos=Highlight infos\nsettings.showInfosInGutter=Show info icons in gutter\nsettings.submenu.label=Box / Label\nsettings.drawBoxesAroundProblemLabels=Draw boxes around problem labels\nsettings.roundedCornerBoxes=Rounded corners\nsettings.fillProblemLabels=Fill problem label background\nsettings.boldProblemLabels=Bold problem labels\nsettings.italicProblemLabels=Italic problem labels\nsettings.submenu.general=General\nsettings.activeProblemListener=Enabled problem listener\nsettings.markupModelListenerDescription=- MarkupModelListener (default): Called after addition of a RangeHighlighter to a file. Faster on large files, slower on small ones.\nsettings.highlightProblemListenerDescription=- HighlightProblemListener: Faster on small to medium sized files, slower on large ones. Called very often and can cause slowdowns.\nsettings.manualScannerDescription=- ManualScanner: Scans the DocumentMarkupModel for all highlighters at a fixed delay, uses the same logic\nsettings.manualScannerDescriptionSupplement= as HighlightProblemListener but can help with slowdowns on big files.\nsettings.manualScannerDelayLabel=ManualScanner delay in milliseconds\nsettings.manualScannerDelayTooltip=Delay between manual scans, only used when ManualScanner is enabled\nsettings.inlaySizeDelta=Inlay size delta\nsettings.inlaySizeDeltaTooltip=Used to have smaller font size for the inlays, should be smaller than editor font size\nsettings.problemFilterListLabel=Problem filter list\nsettings.problemFilterListTooltip=Semicolon separated list of problem text beginnings that will not be handled\nsettings.fileExtensionBlacklistLabel=File extension blacklist\nsettings.fileExtensionBlaclistTooltip=Semicolon separated list of file extensions to ignore (like \".java;.md\")\nsettings.submenu.colors=Colors\nsettings.errorTextColor=Error text color:\nsettings.errorLabelBorderColor=Error label border color:\nsettings.errorLineHighlightColor=Error line highlight color:\nsettings.additionalSeverities=Additional severities:\nsettings.additionalSeveritiesErrorDesc=Semicolon separated list of additional error severities e.g. '10, 100'\nsettings.warningTextColor=Warning text color:\nsettings.warningLabelBorderColor=Warning label border color:\nsettings.warningLineHighlightColor=Warning line highlight color:\nsettings.additionalSeveritiesWarningDesc=Semicolon separated list of additional warning severities e.g. '10, 100'\nsettings.weakWarningTextColor=Weak warning text color:\nsettings.weakWarningLabelBorderColor=Weak warning label border color:\nsettings.weakWarningLineHighlightColor=Weak warning line highlight color:\nsettings.additionalSeveritiesWeakWarningDesc=Semicolon separated list of additional weak-warning severities e.g. '10, 100'\nsettings.infoTextColor=Info text color:\nsettings.infoLabelBorderColor=Info label border color:\nsettings.infoLineHighlightColor=Info line highlight color:\nsettings.additionalSeveritiesInfoDesc=Semicolon separated list of additional info severities e.g. '10, 100'\nsettings.forceProblemsInOneLine=Force problems in the same line even if they are too long to fit\nsettings.useEditorFont=Use editor font instead of tooltip font\nsettings.showOnlyHighestPerLine=Show only the problem with the highest severity per line\nsettings.enableHtmlStripping=Enable stripping of HTML in the messages\nsettings.enableXmlUnescaping=Enable unescaping of XML in the messages\nsettings.enableHovering=Enable hovering", "src/main/java/org/overengineer/inlineproblems/settings/SettingsComponent.java": "package org.overengineer.inlineproblems.settings;\n\nimport com.intellij.openapi.ui.ComboBox;\nimport com.intellij.ui.ColorPanel;\nimport com.intellij.ui.components.JBCheckBox;\nimport com.intellij.ui.components.JBLabel;\nimport com.intellij.ui.components.JBTextField;\nimport com.intellij.util.ui.FormBuilder;\nimport lombok.Getter;\nimport org.overengineer.inlineproblems.DocumentMarkupModelScanner;\nimport org.overengineer.inlineproblems.bundles.SettingsBundle;\nimport org.overengineer.inlineproblems.listeners.HighlightProblemListener;\nimport org.overengineer.inlineproblems.listeners.MarkupModelProblemListener;\n\nimport javax.swing.*;\nimport javax.swing.text.NumberFormatter;\nimport java.awt.*;\nimport java.text.NumberFormat;\nimport java.util.Arrays;\nimport java.util.Optional;\nimport java.util.stream.Collectors;\nimport java.util.List;\n\n\npublic class SettingsComponent {\n private final JBCheckBox showErrors = new JBCheckBox(SettingsBundle.message(\"settings.showErrors\"));\n private final JBCheckBox highlightErrors = new JBCheckBox(SettingsBundle.message(\"settings.highlightErrors\"));\n private final JBCheckBox showErrorsInGutter = new JBCheckBox(SettingsBundle.message(\"settings.showErrorsInGutter\"));\n\n private final JBCheckBox showWarnings = new JBCheckBox(SettingsBundle.message(\"settings.showWarnings\"));\n private final JBCheckBox highlightWarnings = new JBCheckBox(SettingsBundle.message(\"settings.highlightWarnings\"));\n private final JBCheckBox showWarningsInGutter = new JBCheckBox(SettingsBundle.message(\"settings.showWarningsInGutter\"));\n\n private final JBCheckBox showWeakWarnings = new JBCheckBox(SettingsBundle.message(\"settings.showWeakWarnings\"));\n private final JBCheckBox highlightWeakWarnings = new JBCheckBox(SettingsBundle.message(\"settings.highlightWeakWarnings\"));\n private final JBCheckBox showWeakWarningsInGutter = new JBCheckBox(SettingsBundle.message(\"settings.showWeakWarningsInGutter\"));\n\n private final JBCheckBox showInfos = new JBCheckBox(SettingsBundle.message(\"settings.showInfos\"));\n private final JBCheckBox highlightInfo = new JBCheckBox(SettingsBundle.message(\"settings.highlightInfos\"));\n private final JBCheckBox showInfosInGutter = new JBCheckBox(SettingsBundle.message(\"settings.showInfosInGutter\"));\n\n private final ColorPanel errorTextColor = new ColorPanel();\n private final ColorPanel errorLabelBackgroundColor = new ColorPanel();\n private final ColorPanel errorHighlightColor = new ColorPanel();\n\n private final ColorPanel warningTextColor = new ColorPanel();\n private final ColorPanel warningLabelBackgroundColor = new ColorPanel();\n private final ColorPanel warningHighlightColor = new ColorPanel();\n\n private final ColorPanel weakWarningTextColor = new ColorPanel();\n private final ColorPanel weakWarningLabelBackgroundColor = new ColorPanel();\n private final ColorPanel weakWarningHighlightColor = new ColorPanel();\n\n private final ColorPanel infoTextColor = new ColorPanel();\n private final ColorPanel infoLabelBackgroundColor = new ColorPanel();\n private final ColorPanel infoHighlightColor = new ColorPanel();\n\n private final JBCheckBox forceErrorsInSameLine = new JBCheckBox(SettingsBundle.message(\"settings.forceProblemsInOneLine\"));\n private final JBCheckBox drawBoxesAroundProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.drawBoxesAroundProblemLabels\"));\n private final JBCheckBox roundedCornerBoxes = new JBCheckBox(SettingsBundle.message(\"settings.roundedCornerBoxes\"));\n private final JBCheckBox useEditorFont = new JBCheckBox(SettingsBundle.message(\"settings.useEditorFont\"));\n\n private final JBCheckBox showOnlyHighestSeverityPerLine = new JBCheckBox(SettingsBundle.message(\"settings.showOnlyHighestPerLine\"));\n private final JBCheckBox enableHtmlStripping = new JBCheckBox(SettingsBundle.message(\"settings.enableHtmlStripping\"));\n private final JBCheckBox enableXmlUnescaping = new JBCheckBox(SettingsBundle.message(\"settings.enableXmlUnescaping\"));\n private final JFormattedTextField inlayFontSizeDeltaText;\n private final JFormattedTextField manualScannerDelay;\n private final JBCheckBox fillProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.fillProblemLabels\"));\n private final JBCheckBox boldProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.boldProblemLabels\"));\n private final JBCheckBox italicProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.italicProblemLabels\"));\n private final JBCheckBox enableHovering = new JBCheckBox(SettingsBundle.message(\"settings.enableHovering\"));\n\n private final JBTextField problemFilterList = new JBTextField();\n private final JBTextField fileExtensionBlacklist = new JBTextField();\n\n private final String[] availableListeners = {HighlightProblemListener.NAME, MarkupModelProblemListener.NAME, DocumentMarkupModelScanner.NAME};\n private final JComboBox enabledListener = new ComboBox<>(availableListeners);\n\n private final JBTextField additionalInfoSeverities = new JBTextField();\n private final JBTextField additionalWarningSeverities = new JBTextField();\n private final JBTextField additionalWeakWarningSeverities = new JBTextField();\n private final JBTextField additionalErrorSeverities = new JBTextField();\n\n @Getter\n private final JPanel settingsPanel;\n\n public SettingsComponent() {\n SettingsState settingsState = SettingsState.getInstance();\n\n showErrors.setSelected(settingsState.isShowErrors());\n highlightErrors.setSelected(settingsState.isHighlightErrors());\n showErrorsInGutter.setSelected(settingsState.isShowErrorsInGutter());\n errorTextColor.setSelectedColor(settingsState.getErrorTextColor());\n errorLabelBackgroundColor.setSelectedColor(settingsState.getErrorBackgroundColor());\n errorHighlightColor.setSelectedColor(settingsState.getErrorHighlightColor());\n\n showWarnings.setSelected(settingsState.isShowWarnings());\n highlightWarnings.setSelected(settingsState.isHighlightWarnings());\n showWarningsInGutter.setSelected(settingsState.isShowWarningsInGutter());\n warningTextColor.setSelectedColor(settingsState.getWarningTextColor());\n warningLabelBackgroundColor.setSelectedColor(settingsState.getWarningBackgroundColor());\n warningHighlightColor.setSelectedColor(settingsState.getWarningHighlightColor());\n\n showWeakWarnings.setSelected(settingsState.isShowWeakWarnings());\n highlightWeakWarnings.setSelected(settingsState.isHighlightWeakWarnings());\n showWeakWarningsInGutter.setSelected(settingsState.isShowWeakWarningsInGutter());\n weakWarningTextColor.setSelectedColor(settingsState.getWeakWarningTextColor());\n weakWarningLabelBackgroundColor.setSelectedColor(settingsState.getWeakWarningBackgroundColor());\n weakWarningHighlightColor.setSelectedColor(settingsState.getWeakWarningHighlightColor());\n\n showInfos.setSelected(settingsState.isShowInfos());\n highlightInfo.setSelected(settingsState.isHighlightInfos());\n showInfosInGutter.setSelected(settingsState.isShowInfosInGutter());\n infoTextColor.setSelectedColor(settingsState.getInfoTextColor());\n infoLabelBackgroundColor.setSelectedColor(settingsState.getInfoBackgroundColor());\n infoHighlightColor.setSelectedColor(settingsState.getInfoHighlightColor());\n\n forceErrorsInSameLine.setSelected(settingsState.isForceProblemsInSameLine());\n drawBoxesAroundProblemLabels.setSelected(settingsState.isDrawBoxesAroundErrorLabels());\n roundedCornerBoxes.setSelected(settingsState.isRoundedCornerBoxes());\n\n useEditorFont.setSelected(settingsState.isUseEditorFont());\n\n NumberFormat intFormat = NumberFormat.getIntegerInstance();\n intFormat.setGroupingUsed(false);\n NumberFormatter numberFormatter = new NumberFormatter(intFormat);\n numberFormatter.setValueClass(Integer.class); // Optional, ensures we always get a int value\n\n inlayFontSizeDeltaText = new JFormattedTextField(numberFormatter);\n inlayFontSizeDeltaText.setText(Integer.toString(settingsState.getInlayFontSizeDelta()));\n\n manualScannerDelay = new JFormattedTextField(numberFormatter);\n manualScannerDelay.setText(Integer.toString(settingsState.getManualScannerDelay()));\n\n fillProblemLabels.setSelected(settingsState.isFillProblemLabels());\n boldProblemLabels.setSelected(settingsState.isBoldProblemLabels());\n italicProblemLabels.setSelected(settingsState.isItalicProblemLabels());\n enableHovering.setSelected(settingsState.isHovering());\n\n additionalInfoSeverities.setText(settingsState.getAdditionalInfoSeveritiesAsString());\n additionalWeakWarningSeverities.setText(settingsState.getAdditionalWeakWarningSeveritiesAsString());\n additionalWarningSeverities.setText(settingsState.getAdditionalWarningSeveritiesAsString());\n additionalErrorSeverities.setText(settingsState.getAdditionalErrorSeveritiesAsString());\n\n problemFilterList.setText(settingsState.getProblemFilterList());\n fileExtensionBlacklist.setText(settingsState.getFileExtensionBlacklist());\n enabledListener.setSelectedItem(Optional.of(settingsState.getEnabledListener()));\n\n Dimension enabledListenerDimension = enabledListener.getPreferredSize();\n enabledListenerDimension.width += 100;\n enabledListener.setPreferredSize(enabledListenerDimension);\n\n settingsPanel = FormBuilder.createFormBuilder()\n .addComponent(new JBLabel(SettingsBundle.message(\"settings.submenu.label\")))\n .addComponent(drawBoxesAroundProblemLabels, 0)\n .addComponent(roundedCornerBoxes, 0)\n .addComponent(fillProblemLabels, 0)\n .addComponent(boldProblemLabels, 0)\n .addComponent(italicProblemLabels, 0)\n .addComponent(enableHovering, 0)\n .addSeparator()\n .addComponent(new JBLabel(SettingsBundle.message(\"settings.submenu.general\")))\n .addLabeledComponent(new JBLabel(SettingsBundle.message(\"settings.activeProblemListener\")), enabledListener)\n .addTooltip(SettingsBundle.message(\"settings.markupModelListenerDescription\"))\n .addTooltip(SettingsBundle.message(\"settings.highlightProblemListenerDescription\"))\n .addTooltip(SettingsBundle.message(\"settings.manualScannerDescription\"))\n .addTooltip(SettingsBundle.message(\"settings.manualScannerDescriptionSupplement\"))\n .addLabeledComponent(new JBLabel(SettingsBundle.message(\"settings.manualScannerDelayLabel\")), manualScannerDelay)\n .addTooltip(SettingsBundle.message(\"settings.manualScannerDelayTooltip\"))\n .addComponent(forceErrorsInSameLine, 0)\n .addComponent(useEditorFont, 0)\n .addComponent(showOnlyHighestSeverityPerLine, 0)\n .addComponent(enableHtmlStripping, 0)\n .addComponent(enableXmlUnescaping, 0)\n .addLabeledComponent(new JBLabel(SettingsBundle.message(\"settings.inlaySizeDelta\")), inlayFontSizeDeltaText)\n .addTooltip(SettingsBundle.message(\"settings.inlaySizeDeltaTooltip\"))\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.problemFilterListLabel\")), problemFilterList)\n .addTooltip(SettingsBundle.message(\"settings.problemFilterListTooltip\"))\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.fileExtensionBlacklistLabel\")), fileExtensionBlacklist)\n .addTooltip(SettingsBundle.message(\"settings.fileExtensionBlaclistTooltip\"))\n .addSeparator()\n .addComponent(new JBLabel(SettingsBundle.message(\"settings.submenu.colors\")))\n .addComponent(showErrors)\n .addComponent(highlightErrors)\n .addComponent(showErrorsInGutter)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.errorTextColor\")), errorTextColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.errorLabelBorderColor\")), errorLabelBackgroundColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.errorLineHighlightColor\")), errorHighlightColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.additionalSeverities\")), additionalErrorSeverities)\n .addTooltip(SettingsBundle.message(\"settings.additionalSeveritiesErrorDesc\"))\n .addSeparator()\n .addComponent(showWarnings)\n .addComponent(highlightWarnings)\n .addComponent(showWarningsInGutter)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.warningTextColor\")), warningTextColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.warningLabelBorderColor\")), warningLabelBackgroundColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.warningLineHighlightColor\")), warningHighlightColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.additionalSeverities\")), additionalWarningSeverities)\n .addTooltip(SettingsBundle.message(\"settings.additionalSeveritiesWarningDesc\"))\n .addSeparator()\n .addComponent(showWeakWarnings)\n .addComponent(highlightWeakWarnings)\n .addComponent(showWeakWarningsInGutter)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.weakWarningTextColor\")), weakWarningTextColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.weakWarningLabelBorderColor\")), weakWarningLabelBackgroundColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.weakWarningLineHighlightColor\")), weakWarningHighlightColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.additionalSeverities\")), additionalWeakWarningSeverities)\n .addTooltip(SettingsBundle.message(\"settings.additionalSeveritiesWeakWarningDesc\"))\n .addSeparator()\n .addComponent(showInfos)\n .addComponent(highlightInfo)\n .addComponent(showInfosInGutter)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.infoTextColor\")), infoTextColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.infoLabelBorderColor\")), infoLabelBackgroundColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.infoLineHighlightColor\")), infoHighlightColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.additionalSeverities\")), additionalInfoSeverities)\n .addTooltip(SettingsBundle.message(\"settings.additionalSeveritiesInfoDesc\"))\n .addComponentFillVertically(new JPanel(), 0)\n .getPanel();\n }\n\n public JComponent getPreferredFocusedComponent() {\n return settingsPanel;\n }\n\n public boolean isForceErrorsInSameLine() {\n return forceErrorsInSameLine.isSelected();\n }\n\n public void setForceErrorsInSameLine(final boolean isSelected) {\n forceErrorsInSameLine.setSelected(isSelected);\n }\n\n public boolean getDrawBoxesAroundProblemLabels() {\n return drawBoxesAroundProblemLabels.isSelected();\n }\n\n public void setDrawBoxesAroundProblemLabels(final boolean isSelected) {\n drawBoxesAroundProblemLabels.setSelected(isSelected);\n }\n\n public boolean isRoundedCornerBoxes() {\n return roundedCornerBoxes.isSelected();\n }\n\n public void setRoundedCornerBoxes(boolean isSelected) {\n roundedCornerBoxes.setSelected(isSelected);\n }\n\n public boolean isUseEditorFont() {\n return useEditorFont.isSelected();\n }\n\n public boolean isShowOnlyHighestSeverityPerLine() {\n return showOnlyHighestSeverityPerLine.isSelected();\n }\n\n public boolean isEnableHtmlStripping() {\n return enableHtmlStripping.isSelected();\n }\n\n public boolean isEnableXmlUnescaping() {\n return enableXmlUnescaping.isSelected();\n }\n\n public int getInlayFontSizeDelta() {\n int val = 0;\n // Convert the String\n try {\n val = Integer.parseInt(inlayFontSizeDeltaText.getText());\n }\n catch (NumberFormatException ignored) {}\n\n if (val < 0)\n val = 0;\n\n return val;\n }\n\n public void setInlayFontSizeDelta(int val) {\n inlayFontSizeDeltaText.setText(String.valueOf(Math.max(0, val)));\n }\n\n public void setUseEditorFont(boolean isSelected) {\n useEditorFont.setSelected(isSelected);\n }\n\n public void setShowOnlyHighestSeverityPerLine(boolean isSelected) {\n showOnlyHighestSeverityPerLine.setSelected(isSelected);\n }\n\n public void setEnableHtmlStripping(boolean isSelected) {\n enableHtmlStripping.setSelected(isSelected);\n }\n\n public void setEnableXmlUnescaping(boolean isSelected) {\n enableXmlUnescaping.setSelected(isSelected);\n }\n\n public boolean isFillProblemLabels() {\n return fillProblemLabels.isSelected();\n }\n\n public void setFillProblemLabels(boolean isSelected) {\n fillProblemLabels.setSelected(isSelected);\n }\n\n public boolean isBoldProblemLabels() {\n return boldProblemLabels.isSelected();\n }\n\n public void setBoldProblemLabels(boolean isSelected) {\n boldProblemLabels.setSelected(isSelected);\n }\n\n public boolean isItalicProblemLabels() {\n return italicProblemLabels.isSelected();\n }\n\n public void setItalicProblemLabels(boolean isSelected) {\n italicProblemLabels.setSelected(isSelected);\n }\n\n public boolean isHovering() {\n return enableHovering.isSelected();\n }\n public void setHovering(boolean isSelected) {\n enableHovering.setSelected(isSelected);\n }\n\n public boolean isShowErrors() {\n return showErrors.isSelected();\n }\n\n public void setShowErrors(final boolean isSelected) {\n showErrors.setSelected(isSelected);\n }\n\n public boolean isHighlightErrors() {\n return highlightErrors.isSelected();\n }\n\n public void setHighlightErrors(boolean isSelected) {\n highlightErrors.setSelected(isSelected);\n }\n\n public boolean isShowErrorsInGutter() {\n return showErrorsInGutter.isSelected();\n }\n\n public void setShowErrorsInGutter(boolean isSelected) {\n showErrorsInGutter.setSelected(isSelected);\n }\n\n public boolean isShowWarnings() {\n return showWarnings.isSelected();\n }\n\n public void setShowWarnings(final boolean isSelected) {\n showWarnings.setSelected(isSelected);\n }\n\n public boolean isHighlightWarnings() {\n return highlightWarnings.isSelected();\n }\n\n public void setHighlightWarnings(final boolean isSelected) {\n highlightWarnings.setSelected(isSelected);\n }\n\n public boolean isShowWarningsInGutter() {\n return showWarningsInGutter.isSelected();\n }\n\n public void setShowWarningsInGutter(final boolean isSelected) {\n showWarningsInGutter.setSelected(isSelected);\n }\n\n public boolean isShowWeakWarnings() {\n return showWeakWarnings.isSelected();\n }\n\n public void setShowWeakWarnings(final boolean isSelected) {\n showWeakWarnings.setSelected(isSelected);\n }\n\n public boolean isHighlightWeakWarnings() {\n return highlightWeakWarnings.isSelected();\n }\n\n public void setHighlightWeakWarnings(final boolean isSelected) {\n highlightWeakWarnings.setSelected(isSelected);\n }\n\n public boolean isShowWeakWarningsInGutter() {\n return showWeakWarningsInGutter.isSelected();\n }\n\n public void setShowWeakWarningsInGutter(boolean isSelected) {\n showWeakWarningsInGutter.setSelected(isSelected);\n }\n\n public boolean isShowInfos() {\n return showInfos.isSelected();\n }\n\n public void setShowInfos(final boolean isSelected) {\n showInfos.setSelected(isSelected);\n }\n\n public boolean isHighlightInfo() {\n return highlightInfo.isSelected();\n }\n\n public void setHighlightInfo(final boolean isSelected) {\n highlightInfo.setSelected(isSelected);\n }\n\n public boolean isShowInfosInGutter() {\n return showInfosInGutter.isSelected();\n }\n\n public void setShowInfosInGutter(boolean isSelected) {\n showInfosInGutter.setSelected(isSelected);\n }\n\n public Color getErrorTextColor() {\n return errorTextColor.getSelectedColor();\n }\n\n public void setErrorTextColor(final Color color) {\n errorTextColor.setSelectedColor(color);\n }\n\n public Color getErrorLabelBackgroundColor() {\n return errorLabelBackgroundColor.getSelectedColor();\n }\n\n public void setErrorLabelBackgroundColor(final Color color) {\n errorLabelBackgroundColor.setSelectedColor(color);\n }\n\n public Color getWarningTextColor() {\n return warningTextColor.getSelectedColor();\n }\n\n public void setWarningTextColor(final Color color) {\n warningTextColor.setSelectedColor(color);\n }\n\n public Color getWarningLabelBackgroundColor() {\n return warningLabelBackgroundColor.getSelectedColor();\n }\n\n public void setWarningLabelBackgroundColor(final Color color) {\n warningLabelBackgroundColor.setSelectedColor(color);\n }\n\n public Color getWeakWarningTextColor() {\n return weakWarningTextColor.getSelectedColor();\n }\n\n public void setWeakWarningTextColor(final Color color) {\n weakWarningTextColor.setSelectedColor(color);\n }\n\n public Color getWeakWarningLabelBackgroundColor() {\n return weakWarningLabelBackgroundColor.getSelectedColor();\n }\n\n public void setWeakWarningLabelBackgroundColor(final Color color) {\n weakWarningLabelBackgroundColor.setSelectedColor(color);\n }\n\n public Color getInfoTextColor() {\n return infoTextColor.getSelectedColor();\n }\n\n public void setInfoTextColor(final Color color) {\n infoTextColor.setSelectedColor(color);\n }\n\n public Color getInfoLabelBackgroundColor() {\n return infoLabelBackgroundColor.getSelectedColor();\n }\n\n public void setInfoLabelBackgroundColor(final Color color) {\n infoLabelBackgroundColor.setSelectedColor(color);\n }\n\n public Color getErrorHighlightColor() {\n return errorHighlightColor.getSelectedColor();\n }\n\n public void setErrorHighlightColor(final Color color) {\n errorHighlightColor.setSelectedColor(color);\n }\n\n public Color getWarningHighlightColor() {\n return warningHighlightColor.getSelectedColor();\n }\n\n public void setWarningHighlightColor(final Color color) {\n warningHighlightColor.setSelectedColor(color);\n }\n\n public Color getWeakWarningHighlightColor() {\n return weakWarningHighlightColor.getSelectedColor();\n }\n\n public void setWeakWarningHighlightColor(final Color color) {\n weakWarningHighlightColor.setSelectedColor(color);\n }\n\n public Color getInfoHighlightColor() {\n return infoHighlightColor.getSelectedColor();\n }\n\n public void setInfoHighlightColor(final Color color) {\n infoHighlightColor.setSelectedColor(color);\n }\n\n public String getProblemFilterList() {\n return problemFilterList.getText();\n }\n\n public void setProblemFilterList(final String newText) {\n problemFilterList.setText(newText);\n }\n\n public String getFileExtensionBlacklist() {\n return fileExtensionBlacklist.getText();\n }\n\n public void setFileExtensionBlacklist(final String newText) {\n fileExtensionBlacklist.setText(newText);\n }\n\n public String getAdditionalInfoSeverities() {\n return additionalInfoSeverities.getText();\n }\n\n public List getAdditionalInfoSeveritiesList() {\n return getSeverityIntegerList(additionalInfoSeverities.getText());\n }\n\n public void setAdditionalInfoSeverities(final String newText) {\n additionalInfoSeverities.setText(newText);\n }\n\n public String getAdditionalWarningSeverities() {\n return additionalWarningSeverities.getText();\n }\n\n public List getAdditionalWarningSeveritiesList() {\n return getSeverityIntegerList(additionalWarningSeverities.getText());\n }\n\n public void setAdditionalWarningSeverities(final String newText) {\n additionalWarningSeverities.setText(newText);\n }\n\n public String getAdditionalErrorSeverities() {\n return additionalErrorSeverities.getText();\n }\n\n public List getAdditionalErrorSeveritiesList() {\n return getSeverityIntegerList(additionalErrorSeverities.getText());\n }\n\n public void setAdditionalErrorSeverities(final String newText) {\n additionalErrorSeverities.setText(newText);\n }\n\n public String getAdditionalWeakWarningSeverities() {\n return additionalWeakWarningSeverities.getText();\n }\n\n public List getAdditionalWeakWarningSeveritiesList() {\n return getSeverityIntegerList(additionalWeakWarningSeverities.getText());\n }\n\n public void setAdditionalWeakWarningSeverities(final String newText) {\n additionalWeakWarningSeverities.setText(newText);\n }\n\n public int getEnabledListener() {\n return enabledListener.getSelectedIndex();\n }\n\n public void setEnabledListener(int index) {\n enabledListener.setSelectedIndex(index);\n }\n\n private List getSeverityIntegerList(String text) {\n return Arrays.stream(text.split(\";\"))\n .map(String::trim)\n .filter(s -> !s.isEmpty())\n .filter(s -> {\n try {\n Integer.parseInt(s);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n })\n .map(Integer::parseInt)\n .collect(Collectors.toList());\n }\n\n public int getManualScannerDelay() {\n try {\n return Math.max(Integer.parseInt(manualScannerDelay.getText()), 10);\n }\n catch (NumberFormatException e) {\n return 100;\n }\n }\n\n public void setManualScannerDelay(int delay) {\n manualScannerDelay.setText(Integer.toString(Math.max(10, delay)));\n }\n}\n", "src/main/java/org/overengineer/inlineproblems/InlineProblemLabel.java": "package org.overengineer.inlineproblems;\n\nimport com.intellij.codeInsight.hints.presentation.InputHandler;\nimport com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler;\nimport com.intellij.ide.ui.AntialiasingType;\nimport com.intellij.ide.ui.UISettings;\nimport com.intellij.openapi.actionSystem.AnAction;\nimport com.intellij.openapi.actionSystem.IdeActions;\nimport com.intellij.openapi.actionSystem.ex.ActionUtil;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.editor.EditorCustomElementRenderer;\nimport com.intellij.openapi.editor.Inlay;\nimport com.intellij.openapi.editor.ScrollType;\nimport com.intellij.openapi.editor.impl.FontInfo;\nimport com.intellij.openapi.editor.markup.GutterIconRenderer;\nimport com.intellij.openapi.editor.markup.TextAttributes;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiUtilBase;\nimport com.intellij.ui.paint.EffectPainter;\nimport lombok.Getter;\nimport lombok.Setter;\nimport org.jdesktop.swingx.action.ActionManager;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.overengineer.inlineproblems.entities.InlineProblem;\nimport org.overengineer.inlineproblems.settings.SettingsState;\nimport org.overengineer.inlineproblems.utils.FontUtil;\n\nimport java.awt.*;\nimport java.awt.event.MouseEvent;\nimport java.awt.font.FontRenderContext;\n\n\n@Getter\npublic class InlineProblemLabel implements EditorCustomElementRenderer, InputHandler {\n private final String text;\n private final Color textColor;\n private final Color backgroundColor;\n private final Color hoverColor;\n private final boolean isDrawBox;\n private final boolean isRoundedCorners;\n private final boolean isFillBackground;\n private boolean hovered;\n private final boolean hoveredEnabled;\n private Inlay inlay;\n private final int actualStartOffset;\n\n @Setter\n private boolean isBlockElement;\n\n private final int inlayFontSizeDelta;\n private final boolean isUseEditorFont;\n\n private static final int WIDTH_OFFSET = 7;\n private static final int DRAW_BOX_HEIGHT_OFFSET = -2; // Makes the box lines visible even if line below / above is highlighted\n private static final int DRAW_BOX_WIDTH_OFFSET = -2; // To have space between 2 boxes\n private static final int DRAW_BOX_PLACEMENT_OFFSET_Y = 1;\n private static final int DRAW_STRING_LINE_PLACEMENT_OFFSET_Y = -1;\n private static final int DRAW_STRING_LINE_PLACEMENT_OFFSET_X = 3;\n\n public InlineProblemLabel(\n final InlineProblem problem,\n final Color textColor,\n final Color backgroundColor,\n final Color hoverColor,\n final SettingsState settings\n ) {\n this.textColor = textColor;\n this.backgroundColor = backgroundColor;\n this.hoverColor = hoverColor;\n this.isDrawBox = settings.isDrawBoxesAroundErrorLabels();\n this.isRoundedCorners = settings.isRoundedCornerBoxes();\n this.text = problem.getText();\n this.isBlockElement = false;\n this.isFillBackground = settings.isFillProblemLabels();\n\n this.isUseEditorFont = settings.isUseEditorFont();\n this.inlayFontSizeDelta = settings.getInlayFontSizeDelta();\n this.hovered = false;\n this.actualStartOffset = problem.getActualStartffset();\n hoveredEnabled = settings.isHovering();\n }\n\n @Override\n public int calcWidthInPixels(@NotNull Inlay inlay) {\n return calcWidthInPixels(inlay.getEditor());\n }\n\n public int calcWidthInPixels(@NotNull Editor editor) {\n var editorContext = FontInfo.getFontRenderContext(editor.getComponent());\n var context = new FontRenderContext(editorContext.getTransform(),\n AntialiasingType.getKeyForCurrentScope(false),\n UISettings.getEditorFractionalMetricsHint());\n\n var fontMetrics = FontInfo.getFontMetrics(FontUtil.getActiveFont(editor), context);\n\n return fontMetrics.stringWidth(text) + WIDTH_OFFSET;\n }\n\n @Override\n public void paint(@NotNull Inlay inlay, @NotNull Graphics graphics, @NotNull Rectangle targetRegion, @NotNull TextAttributes textAttributes) {\n Editor editor = inlay.getEditor();\n this.inlay = inlay;\n // These offsets are applied here and not in the calc functions itself because we use it to shrink the drawn stuff a little bit\n int width = calcWidthInPixels(inlay) + DRAW_BOX_WIDTH_OFFSET;\n int height = calcHeightInPixels(inlay) + DRAW_BOX_HEIGHT_OFFSET;\n\n int targetRegionY = targetRegion.y + DRAW_BOX_PLACEMENT_OFFSET_Y;\n\n int editorFontSize = editor.getColorsScheme().getEditorFontSize();\n\n // Apply delta on the boxes\n if (inlayFontSizeDelta != 0 && editorFontSize > inlayFontSizeDelta) {\n height -= inlayFontSizeDelta;\n targetRegionY += (int) (inlayFontSizeDelta / 1.5);\n }\n\n if (isDrawBox) {\n graphics.setColor(backgroundColor);\n\n if (isRoundedCorners) {\n graphics.drawRoundRect(\n targetRegion.x,\n targetRegionY,\n width,\n height,\n 5,\n 5\n );\n\n if (isFillBackground) {\n graphics.fillRoundRect(\n targetRegion.x,\n targetRegionY,\n width,\n height,\n 5,\n 5\n );\n }\n } else {\n graphics.drawRect(\n targetRegion.x,\n targetRegionY,\n width,\n height\n );\n\n if (isFillBackground) {\n graphics.fillRect(\n targetRegion.x,\n targetRegionY,\n width,\n height\n );\n }\n }\n }\n\n graphics.setColor(hovered ? hoverColor : textColor);\n\n graphics.setFont(FontUtil.getActiveFont(editor));\n\n graphics.drawString(\n text,\n targetRegion.x + DRAW_STRING_LINE_PLACEMENT_OFFSET_X,\n targetRegion.y + DRAW_STRING_LINE_PLACEMENT_OFFSET_Y + editor.getAscent()\n );\n if (hovered)\n EffectPainter.LINE_UNDERSCORE.paint(\n (Graphics2D) graphics,\n targetRegion.x - DRAW_BOX_WIDTH_OFFSET,\n targetRegion.y + editor.getAscent() ,\n width + (DRAW_BOX_WIDTH_OFFSET * 2),\n editor.getAscent(),\n FontUtil.getActiveFont(editor));\n }\n\n private void setHovered(boolean hovered) {\n if (!this.hoveredEnabled || this.hovered == hovered) {\n return;\n }\n this.hovered = hovered;\n if (inlay != null)\n inlay.repaint();\n }\n\n @Override\n public @Nullable GutterIconRenderer calcGutterIconRenderer(@NotNull Inlay inlay) {\n return EditorCustomElementRenderer.super.calcGutterIconRenderer(inlay);\n }\n\n @Override\n public void mouseClicked(@NotNull MouseEvent mouseEvent, @NotNull Point point) {\n if (!hoveredEnabled) {\n return;\n }\n if (mouseEvent.getButton() == MouseEvent.BUTTON1) {\n mouseEvent.consume();\n\n var editor = inlay.getEditor();\n editor.getCaretModel().moveToOffset(actualStartOffset);\n editor.getScrollingModel().scrollToCaret(ScrollType.CENTER);\n\n var action = ActionManager.getInstance().getAction(IdeActions.ACTION_SHOW_INTENTION_ACTIONS);\n if (action == null) {\n Project project = editor.getProject();\n if (project == null) return;\n PsiFile psiFileInEditor = PsiUtilBase.getPsiFileInEditor(editor, project);\n if (psiFileInEditor == null) return;\n new ShowIntentionActionsHandler().invoke(project, editor, psiFileInEditor, false);\n } else {\n ActionUtil.invokeAction((AnAction) action, editor.getComponent(), \"EditorInlay\", null, null);\n\n }\n }\n }\n\n @Override\n public void mouseMoved(@NotNull MouseEvent mouseEvent, @NotNull Point point) {\n setHovered(true);\n }\n\n @Override\n public void mouseExited() {\n setHovered(false);\n }\n\n}\n", "src/main/java/org/overengineer/inlineproblems/entities/InlineProblem.java": "package org.overengineer.inlineproblems.entities;\n\nimport com.intellij.codeInsight.daemon.impl.HighlightInfo;\nimport com.intellij.openapi.editor.markup.RangeHighlighter;\nimport com.intellij.openapi.fileEditor.TextEditor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport lombok.EqualsAndHashCode;\nimport lombok.Getter;\nimport lombok.Setter;\nimport org.overengineer.inlineproblems.definitions.RegexPattern;\nimport org.overengineer.inlineproblems.settings.SettingsState;\n\n@Getter\n@Setter\n@EqualsAndHashCode(exclude = {\"line\", \"problemLineHighlighterHashCode\", \"inlineProblemLabelHashCode\", \"isBlockElement\", \"drawDetails\"})\npublic class InlineProblem {\n\n // The line the problem first appeared\n private final int line;\n @Setter\n private int severity;\n\n // If two problems with the same text occur in the same line only one will be shown\n private final String text;\n private final String file;\n private final TextEditor textEditor;\n private final Project project;\n\n private DrawDetails drawDetails;\n\n private int actualEndOffset;\n private int actualStartffset;\n\n private boolean isBlockElement = false;\n\n // Set after drawing the line highlight, used to remove it again\n private int problemLineHighlighterHashCode;\n\n // Set after drawing the inlay, used to remove the inlay again\n private int inlineProblemLabelHashCode = 0;\n\n // Used to determine if the problem has moved\n private int highlightInfoStartOffset;\n\n // Used to identify the problem, should never change even if problem the problem moved\n private int rangeHighlighterHashCode;\n\n\n public InlineProblem(\n int line,\n String filePath,\n HighlightInfo highlightInfo,\n TextEditor textEditor,\n RangeHighlighter rangeHighlighter,\n SettingsState settingsState\n ) {\n String usedText = highlightInfo.getDescription();\n if (usedText == null)\n usedText = \"\";\n else\n usedText = getTextWithHtmlStrippingAndXmlUnescaping(usedText.stripLeading(), settingsState);\n\n this.line = line;\n this.text = usedText;\n this.severity = highlightInfo.getSeverity().myVal;\n this.textEditor = textEditor;\n this.file = filePath;\n this.project = textEditor.getEditor().getProject();\n this.highlightInfoStartOffset = highlightInfo.hashCode();\n this.rangeHighlighterHashCode = rangeHighlighter.hashCode();\n\n if (highlightInfo.getActualEndOffset() == 0)\n this.actualEndOffset = highlightInfo.getActualEndOffset();\n else\n this.actualEndOffset = highlightInfo.getActualEndOffset() -1;\n this.actualStartffset = highlightInfo.getStartOffset();\n }\n\n private String getTextWithHtmlStrippingAndXmlUnescaping(String text, SettingsState settingsState) {\n if (\n settingsState.isEnableHtmlStripping() &&\n text.contains(\"<\") &&\n RegexPattern.HTML_TAG_PATTERN.matcher(text).find()\n ) {\n text = StringUtil.stripHtml(text, \" \");\n }\n\n if (\n settingsState.isEnableHtmlStripping() &&\n text.contains(\"&\")\n ) {\n text = StringUtil.unescapeXmlEntities(text);\n }\n\n return text;\n }\n}\n"}}, {"round_index": 2, "review_state": "APPROVED", "review_author": "0verEngineer", "submitted_at": "2025-04-30T12:50:10Z", "feedback_type": "none", "review_author_association": "OWNER", "inline_comments": [], "body_comments": [], "response_commits": [], "force_pushes": [], "builds_on_rounds": [], "references_repo_structure": false, "ci_state_at_review": null, "ci_state_after_response": null, "ci_transition": "no_response_commits", "response_commit_diffs": {}, "has_code_backing": false, "head_commit_at_review": "46a6aaf4e6b53dd275e914ed750aaa8415c37b40", "file_contents_at_review": {}}], "threads": [{"id": "PRRT_kwDOImWGlc5O50JD", "is_inline": true, "is_resolved": true, "is_outdated": false, "path": "src/main/java/org/overengineer/inlineproblems/settings/SettingsComponent.java", "line": 326, "start_line": 326, "subject_type": "LINE", "comments": [{"id": "PRRC_kwDOImWGlc56_tKN", "body": "Add an empty line please", "diffHunk": "@@ -317,6 +321,13 @@ public void setItalicProblemLabels(boolean isSelected) {\n italicProblemLabels.setSelected(isSelected);\n }\n \n+ public boolean isHovering() {\n+ return enableHovering.isSelected();\n+ }", "createdAt": "2025-04-28T12:05:38Z", "author": {"login": "0verEngineer"}, "authorAssociation": "OWNER", "originalCommit": {"oid": "5091d9fd353dbf94d66867a484eba6bfcaf3109d"}, "reactions": {"totalCount": 1, "nodes": [{"content": "THUMBS_UP", "user": {"login": "khopland"}}]}, "suggested_changes": []}], "compliance_label": "resolved", "has_author_reply": false, "resolution_round": 1, "review_requested_changes": true, "resolved_at": null, "resolved_by": null, "resolved_by_author": null, "unresolved_events": [], "code_change_aligns": true, "code_change_files": ["46a6aaf4e6b53dd275e914ed750aaa8415c37b40"], "reopened": false, "followup_comments_after_resolution": 0, "author_type": "human"}], "agent_threads": [], "pr_review_class": "iterative", "compliance": {"total_threads": 1, "resolved": 1, "unresolved": 0, "compliance_rate": 1.0, "compliance_class": "full", "inline_threads": 1, "body_only_threads": 0, "compliance_band": "full", "n_agent_threads": 0}, "linked_issues": [{"number": 67, "title": "Feature Request: clickable inline problems", "body": "Add features like left-click to show Quick Fix, IDE Action or Plugin Action and middle-click for navigation code, this would be very useful to be able to fix code quickly using IDE actions or something like that.\n\n\n![Image](https://github.com/user-attachments/assets/3d85061c-bbfc-442e-b54a-39e4a6cf16e8)\n\n![Image](https://github.com/user-attachments/assets/530c6c01-3cb7-40ae-8cd9-d2739ffc578a)\n\n![Image](https://github.com/user-attachments/assets/e8fa51d0-2e45-4dfe-9194-2d58828dfe3f)", "state": "CLOSED", "created_at": "2025-02-25T07:54:31Z", "closed_at": "2025-05-01T12:38:14Z", "author_login": "knevan", "comment_rounds": [{"comments": [{"id": "IC_kwDOImWGlc6fzqml", "body": "Hey, this would be a cool feature but i don't have time in the foreseeable future, would you be willing to try to implement it?", "createdAt": "2025-02-25T08:31:56Z", "updatedAt": "2025-02-25T08:31:56Z", "author": {"login": "0verEngineer"}}, {"id": "IC_kwDOImWGlc6f1yC5", "body": "Ah... Unfortunately I've never used java or kotlin so I'm unlikely to be able to implement it myself. \ud83d\ude22", "createdAt": "2025-02-25T11:41:49Z", "updatedAt": "2025-02-25T11:41:49Z", "author": {"login": "knevan"}}]}, {"comments": [{"id": "IC_kwDOImWGlc6ooFf7", "body": "Hi, i have made a PR with this feature request, please take a look \ud83d\ude03 ", "createdAt": "2025-04-24T23:45:23Z", "updatedAt": "2025-04-24T23:45:38Z", "author": {"login": "khopland"}}]}], "resolution": "closed_by_pr", "closed_by_pr": 76, "link_type": "closing_keyword", "will_close": true, "comment_count": 3, "issue_age_at_pr_days": 58.65951388888889, "issue_was_open_at_pr": false, "labels": ["enhancement", "good first issue"], "milestone": null, "sub_issues": [], "sub_issue_count": 0, "parent_issues": []}], "has_inline_feedback": true, "feedback_track": "inline", "changed_files": 8, "additions": 111, "deletions": 18, "author_association": "CONTRIBUTOR", "is_cross_repository": true, "files": [{"path": "src/main/java/org/overengineer/inlineproblems/InlineDrawer.java", "additions": 1, "deletions": 0, "changeType": "MODIFIED", "base_content": "package org.overengineer.inlineproblems;\n\nimport com.intellij.openapi.Disposable;\nimport com.intellij.openapi.editor.*;\nimport com.intellij.openapi.editor.colors.EditorFontType;\nimport com.intellij.openapi.editor.markup.*;\nimport com.intellij.openapi.util.TextRange;\nimport org.overengineer.inlineproblems.entities.InlineProblem;\nimport org.overengineer.inlineproblems.settings.SettingsState;\nimport org.overengineer.inlineproblems.utils.SeverityUtil;\n\nimport javax.annotation.Nullable;\nimport java.awt.Font;\nimport java.awt.Canvas;\nimport java.util.List;\nimport java.util.Arrays;\n\n\npublic class InlineDrawer {\n\n public void drawProblemLabel(InlineProblem problem) {\n var drawDetails = problem.getDrawDetails();\n if (!drawDetails.isDrawProblem()) {\n return;\n }\n\n SettingsState settings = SettingsState.getInstance();\n Editor editor = problem.getTextEditor().getEditor();\n var inlayModel = editor.getInlayModel();\n\n TextRange textRange = new TextRange(\n editor.getDocument().getLineStartOffset(problem.getLine()),\n editor.getDocument().getLineEndOffset(problem.getLine())\n );\n String lineText = editor.getDocument().getText(textRange);\n\n InlineProblemLabel inlineProblemLabel = new InlineProblemLabel(\n problem,\n drawDetails.getTextColor(),\n drawDetails.getBackgroundColor(),\n settings\n );\n\n // To get the potential width of the whole line with the problem text including existent inline elements\n int existingInlineElementsWidth = 0;\n var existingElements = editor.getInlayModel().getAfterLineEndElementsForLogicalLine(problem.getLine());\n for (final var existingElement : existingElements) {\n existingInlineElementsWidth += existingElement.getWidthInPixels();\n }\n\n int editorWidth = editor.getScrollingModel().getVisibleArea().width;\n\n Font editorFont = editor.getColorsScheme().getFont(EditorFontType.PLAIN);\n\n int problemWidth = inlineProblemLabel.calcWidthInPixels(editor) +\n new Canvas().getFontMetrics(editorFont).stringWidth(lineText) +\n existingInlineElementsWidth;\n\n // We add 50 as offset here because the calculation is somehow not exact\n if (problemWidth + 50 > editorWidth && !settings.isForceProblemsInSameLine())\n {\n inlineProblemLabel.setBlockElement(true);\n problem.setBlockElement(true);\n\n inlayModel.addBlockElement(\n editor.getDocument().getLineStartOffset(problem.getLine()),\n false,\n true,\n 1,\n inlineProblemLabel\n );\n }\n else {\n InlayProperties properties = new InlayProperties()\n .relatesToPrecedingText(true)\n .disableSoftWrapping(true)\n .priority(1);\n\n inlayModel.addAfterLineEndElement(\n problem.getActualEndOffset(),\n properties,\n inlineProblemLabel\n );\n }\n\n problem.setInlineProblemLabelHashCode(inlineProblemLabel.hashCode());\n }\n\n /** Draws the highlighter and the gutter icon for the currently shown problem in the line\n */\n public void drawLineHighlighterAndGutterIcon(List problemsInLine) {\n var problem = problemsInLine.get(0);\n var drawDetails = problem.getDrawDetails();\n\n /* If a lower severity has drawHighlighter and gutterIcon enabled and in the same line a problem with a higher\n * severity which has drawHighlighter and gutterIcon disabled is added, no highlighter and gutter icon is shown.\n */\n if (!drawDetails.isDrawHighlighter() && drawDetails.getIcon() == null) {\n return;\n }\n\n Editor editor = problem.getTextEditor().getEditor();\n Document document = editor.getDocument();\n\n if (document.getLineCount() <= problem.getLine()) {\n return;\n }\n\n TextAttributes textAttributes = new TextAttributes(\n editor.getColorsScheme().getDefaultForeground(),\n drawDetails.getHighlightColor(),\n null,\n null,\n Font.PLAIN\n );\n\n if (!drawDetails.isDrawHighlighter())\n textAttributes.setBackgroundColor(editor.getColorsScheme().getDefaultBackground());\n\n var highlighter = editor.getMarkupModel().addRangeHighlighter(\n document.getLineStartOffset(problem.getLine()),\n document.getLineEndOffset(problem.getLine()),\n problem.getSeverity(), // Use the severity as layer, hopefully it will not overdraw some important stuff\n textAttributes,\n HighlighterTargetArea.EXACT_RANGE\n );\n\n if (drawDetails.getIcon() != null) {\n removeGutterIconsForLine(editor, problem.getLine());\n highlighter.setGutterIconRenderer(new GutterRenderer(getGutterText(problemsInLine), drawDetails.getIcon()));\n }\n\n problem.setProblemLineHighlighterHashCode(highlighter.hashCode());\n }\n\n /**\n * @param problem the problem\n * @param problemsInLine the problems in the same line as problem, null if no gutter icons are enabled, keep in mind that\n * it still contains the problem itself\n */\n public void undrawErrorLineHighlight(InlineProblem problem, @Nullable List problemsInLine) {\n MarkupModel markupModel = problem.getTextEditor().getEditor().getMarkupModel();\n\n Arrays.stream(markupModel.getAllHighlighters())\n .filter(h -> h.isValid() && h.hashCode() == problem.getProblemLineHighlighterHashCode())\n .forEach(markupModel::removeHighlighter);\n\n // Gutter icon re-adding\n if (problemsInLine != null && problemsInLine.size() > 1) {\n problemsInLine.remove(problem);\n drawLineHighlighterAndGutterIcon(problemsInLine);\n }\n }\n\n public void undrawInlineProblemLabel(InlineProblem problem) {\n Editor editor = problem.getTextEditor().getEditor();\n Document document = editor.getDocument();\n\n // Here is not checked if single or multi line, both are disposed because we do not have the info here\n // We search for all elements because they can move\n int documentLineStartOffset = document.getLineStartOffset(0);\n int endLine = document.getLineCount() - 1;\n if (endLine < 0) endLine = 0;\n int documentLineEndOffset = document.getLineEndOffset(endLine);\n\n if (problem.isBlockElement()) {\n editor.getInlayModel()\n .getBlockElementsInRange(\n documentLineStartOffset,\n documentLineEndOffset\n )\n .stream()\n .filter(e -> problem.getInlineProblemLabelHashCode() == e.getRenderer().hashCode())\n .filter(e -> e.getRenderer() instanceof InlineProblemLabel)\n .forEach(Disposable::dispose);\n }\n else {\n editor.getInlayModel()\n .getAfterLineEndElementsInRange(\n documentLineStartOffset,\n documentLineEndOffset\n )\n .stream()\n .filter(e -> problem.getInlineProblemLabelHashCode() == e.getRenderer().hashCode())\n .filter(e -> e.getRenderer() instanceof InlineProblemLabel)\n .forEach(Disposable::dispose);\n }\n }\n\n private String getGutterText(List problemsInLine) {\n StringBuilder text = new StringBuilder();\n int previousSeverity = -1;\n String severityString;\n boolean sizeBiggerThanOne = problemsInLine.size() > 1;\n\n for (var p : problemsInLine) {\n if (sizeBiggerThanOne) {\n if (p.getSeverity() != previousSeverity) {\n severityString = SeverityUtil.getSeverityAsString(p.getSeverity()) + \"S: \\n\";\n text.append(severityString);\n }\n text.append(\"- \");\n }\n\n text.append(p.getText());\n\n if (sizeBiggerThanOne)\n text.append(\"\\n\");\n\n previousSeverity = p.getSeverity();\n }\n\n return text.toString();\n }\n\n private void removeGutterIconsForLine(Editor editor, int line) {\n Document document = editor.getDocument();\n int lineStartOffset = document.getLineStartOffset(line);\n int lineEndOffset = document.getLineEndOffset(line);\n\n MarkupModel markupModel = editor.getMarkupModel();\n for (RangeHighlighter highlighter : markupModel.getAllHighlighters()) {\n if (highlighter.getStartOffset() <= lineEndOffset && highlighter.getEndOffset() >= lineStartOffset) {\n GutterIconRenderer gutterIconRenderer = highlighter.getGutterIconRenderer();\n if (gutterIconRenderer instanceof GutterRenderer) {\n highlighter.setGutterIconRenderer(null);\n }\n }\n }\n }\n}\n", "head_content": "package org.overengineer.inlineproblems;\n\nimport com.intellij.openapi.Disposable;\nimport com.intellij.openapi.editor.*;\nimport com.intellij.openapi.editor.colors.EditorFontType;\nimport com.intellij.openapi.editor.markup.*;\nimport com.intellij.openapi.util.TextRange;\nimport org.overengineer.inlineproblems.entities.InlineProblem;\nimport org.overengineer.inlineproblems.settings.SettingsState;\nimport org.overengineer.inlineproblems.utils.SeverityUtil;\n\nimport javax.annotation.Nullable;\nimport java.awt.Font;\nimport java.awt.Canvas;\nimport java.util.List;\nimport java.util.Arrays;\n\n\npublic class InlineDrawer {\n\n public void drawProblemLabel(InlineProblem problem) {\n var drawDetails = problem.getDrawDetails();\n if (!drawDetails.isDrawProblem()) {\n return;\n }\n\n SettingsState settings = SettingsState.getInstance();\n Editor editor = problem.getTextEditor().getEditor();\n var inlayModel = editor.getInlayModel();\n\n TextRange textRange = new TextRange(\n editor.getDocument().getLineStartOffset(problem.getLine()),\n editor.getDocument().getLineEndOffset(problem.getLine())\n );\n String lineText = editor.getDocument().getText(textRange);\n\n InlineProblemLabel inlineProblemLabel = new InlineProblemLabel(\n problem,\n drawDetails.getTextColor(),\n drawDetails.getBackgroundColor(),\n drawDetails.getTextColor().brighter(),\n settings\n );\n\n // To get the potential width of the whole line with the problem text including existent inline elements\n int existingInlineElementsWidth = 0;\n var existingElements = editor.getInlayModel().getAfterLineEndElementsForLogicalLine(problem.getLine());\n for (final var existingElement : existingElements) {\n existingInlineElementsWidth += existingElement.getWidthInPixels();\n }\n\n int editorWidth = editor.getScrollingModel().getVisibleArea().width;\n\n Font editorFont = editor.getColorsScheme().getFont(EditorFontType.PLAIN);\n\n int problemWidth = inlineProblemLabel.calcWidthInPixels(editor) +\n new Canvas().getFontMetrics(editorFont).stringWidth(lineText) +\n existingInlineElementsWidth;\n\n // We add 50 as offset here because the calculation is somehow not exact\n if (problemWidth + 50 > editorWidth && !settings.isForceProblemsInSameLine())\n {\n inlineProblemLabel.setBlockElement(true);\n problem.setBlockElement(true);\n\n inlayModel.addBlockElement(\n editor.getDocument().getLineStartOffset(problem.getLine()),\n false,\n true,\n 1,\n inlineProblemLabel\n );\n }\n else {\n InlayProperties properties = new InlayProperties()\n .relatesToPrecedingText(true)\n .disableSoftWrapping(true)\n .priority(1);\n\n inlayModel.addAfterLineEndElement(\n problem.getActualEndOffset(),\n properties,\n inlineProblemLabel\n );\n }\n\n problem.setInlineProblemLabelHashCode(inlineProblemLabel.hashCode());\n }\n\n /** Draws the highlighter and the gutter icon for the currently shown problem in the line\n */\n public void drawLineHighlighterAndGutterIcon(List problemsInLine) {\n var problem = problemsInLine.get(0);\n var drawDetails = problem.getDrawDetails();\n\n /* If a lower severity has drawHighlighter and gutterIcon enabled and in the same line a problem with a higher\n * severity which has drawHighlighter and gutterIcon disabled is added, no highlighter and gutter icon is shown.\n */\n if (!drawDetails.isDrawHighlighter() && drawDetails.getIcon() == null) {\n return;\n }\n\n Editor editor = problem.getTextEditor().getEditor();\n Document document = editor.getDocument();\n\n if (document.getLineCount() <= problem.getLine()) {\n return;\n }\n\n TextAttributes textAttributes = new TextAttributes(\n editor.getColorsScheme().getDefaultForeground(),\n drawDetails.getHighlightColor(),\n null,\n null,\n Font.PLAIN\n );\n\n if (!drawDetails.isDrawHighlighter())\n textAttributes.setBackgroundColor(editor.getColorsScheme().getDefaultBackground());\n\n var highlighter = editor.getMarkupModel().addRangeHighlighter(\n document.getLineStartOffset(problem.getLine()),\n document.getLineEndOffset(problem.getLine()),\n problem.getSeverity(), // Use the severity as layer, hopefully it will not overdraw some important stuff\n textAttributes,\n HighlighterTargetArea.EXACT_RANGE\n );\n\n if (drawDetails.getIcon() != null) {\n removeGutterIconsForLine(editor, problem.getLine());\n highlighter.setGutterIconRenderer(new GutterRenderer(getGutterText(problemsInLine), drawDetails.getIcon()));\n }\n\n problem.setProblemLineHighlighterHashCode(highlighter.hashCode());\n }\n\n /**\n * @param problem the problem\n * @param problemsInLine the problems in the same line as problem, null if no gutter icons are enabled, keep in mind that\n * it still contains the problem itself\n */\n public void undrawErrorLineHighlight(InlineProblem problem, @Nullable List problemsInLine) {\n MarkupModel markupModel = problem.getTextEditor().getEditor().getMarkupModel();\n\n Arrays.stream(markupModel.getAllHighlighters())\n .filter(h -> h.isValid() && h.hashCode() == problem.getProblemLineHighlighterHashCode())\n .forEach(markupModel::removeHighlighter);\n\n // Gutter icon re-adding\n if (problemsInLine != null && problemsInLine.size() > 1) {\n problemsInLine.remove(problem);\n drawLineHighlighterAndGutterIcon(problemsInLine);\n }\n }\n\n public void undrawInlineProblemLabel(InlineProblem problem) {\n Editor editor = problem.getTextEditor().getEditor();\n Document document = editor.getDocument();\n\n // Here is not checked if single or multi line, both are disposed because we do not have the info here\n // We search for all elements because they can move\n int documentLineStartOffset = document.getLineStartOffset(0);\n int endLine = document.getLineCount() - 1;\n if (endLine < 0) endLine = 0;\n int documentLineEndOffset = document.getLineEndOffset(endLine);\n\n if (problem.isBlockElement()) {\n editor.getInlayModel()\n .getBlockElementsInRange(\n documentLineStartOffset,\n documentLineEndOffset\n )\n .stream()\n .filter(e -> problem.getInlineProblemLabelHashCode() == e.getRenderer().hashCode())\n .filter(e -> e.getRenderer() instanceof InlineProblemLabel)\n .forEach(Disposable::dispose);\n }\n else {\n editor.getInlayModel()\n .getAfterLineEndElementsInRange(\n documentLineStartOffset,\n documentLineEndOffset\n )\n .stream()\n .filter(e -> problem.getInlineProblemLabelHashCode() == e.getRenderer().hashCode())\n .filter(e -> e.getRenderer() instanceof InlineProblemLabel)\n .forEach(Disposable::dispose);\n }\n }\n\n private String getGutterText(List problemsInLine) {\n StringBuilder text = new StringBuilder();\n int previousSeverity = -1;\n String severityString;\n boolean sizeBiggerThanOne = problemsInLine.size() > 1;\n\n for (var p : problemsInLine) {\n if (sizeBiggerThanOne) {\n if (p.getSeverity() != previousSeverity) {\n severityString = SeverityUtil.getSeverityAsString(p.getSeverity()) + \"S: \\n\";\n text.append(severityString);\n }\n text.append(\"- \");\n }\n\n text.append(p.getText());\n\n if (sizeBiggerThanOne)\n text.append(\"\\n\");\n\n previousSeverity = p.getSeverity();\n }\n\n return text.toString();\n }\n\n private void removeGutterIconsForLine(Editor editor, int line) {\n Document document = editor.getDocument();\n int lineStartOffset = document.getLineStartOffset(line);\n int lineEndOffset = document.getLineEndOffset(line);\n\n MarkupModel markupModel = editor.getMarkupModel();\n for (RangeHighlighter highlighter : markupModel.getAllHighlighters()) {\n if (highlighter.getStartOffset() <= lineEndOffset && highlighter.getEndOffset() >= lineStartOffset) {\n GutterIconRenderer gutterIconRenderer = highlighter.getGutterIconRenderer();\n if (gutterIconRenderer instanceof GutterRenderer) {\n highlighter.setGutterIconRenderer(null);\n }\n }\n }\n }\n}\n", "patch": "--- a/src/main/java/org/overengineer/inlineproblems/InlineDrawer.java\n+++ b/src/main/java/org/overengineer/inlineproblems/InlineDrawer.java\n@@ -38,6 +38,7 @@\n problem,\n drawDetails.getTextColor(),\n drawDetails.getBackgroundColor(),\n+ drawDetails.getTextColor().brighter(),\n settings\n );\n \n"}, {"path": "src/main/java/org/overengineer/inlineproblems/InlineProblemLabel.java", "additions": 86, "deletions": 13, "changeType": "MODIFIED", "base_content": "package org.overengineer.inlineproblems;\n\nimport com.intellij.ide.ui.AntialiasingType;\nimport com.intellij.ide.ui.UISettings;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.editor.EditorCustomElementRenderer;\nimport com.intellij.openapi.editor.Inlay;\nimport com.intellij.openapi.editor.impl.FontInfo;\nimport com.intellij.openapi.editor.markup.GutterIconRenderer;\nimport com.intellij.openapi.editor.markup.TextAttributes;\nimport lombok.Getter;\nimport lombok.Setter;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.overengineer.inlineproblems.entities.InlineProblem;\nimport org.overengineer.inlineproblems.settings.SettingsState;\nimport org.overengineer.inlineproblems.utils.FontUtil;\n\nimport java.awt.*;\nimport java.awt.font.FontRenderContext;\n\n\n@Getter\npublic class InlineProblemLabel implements EditorCustomElementRenderer {\n\n private final String text;\n private final Color textColor;\n private final Color backgroundColor;\n private final boolean isDrawBox;\n private final boolean isRoundedCorners;\n private final boolean isFillBackground;\n\n @Setter\n private boolean isBlockElement;\n\n private final int inlayFontSizeDelta;\n private final boolean isUseEditorFont;\n\n private static final int WIDTH_OFFSET = 7;\n private static final int DRAW_BOX_HEIGHT_OFFSET = -2; // Makes the box lines visible even if line below / above is highlighted\n private static final int DRAW_BOX_WIDTH_OFFSET = -2; // To have space between 2 boxes\n private static final int DRAW_BOX_PLACEMENT_OFFSET_Y = 1;\n private static final int DRAW_STRING_LINE_PLACEMENT_OFFSET_Y = -1;\n private static final int DRAW_STRING_LINE_PLACEMENT_OFFSET_X = 3;\n\n public InlineProblemLabel(\n final InlineProblem problem,\n final Color textColor,\n final Color backgroundColor,\n final SettingsState settings\n ) {\n this.textColor = textColor;\n this.backgroundColor = backgroundColor;\n this.isDrawBox = settings.isDrawBoxesAroundErrorLabels();\n this.isRoundedCorners = settings.isRoundedCornerBoxes();\n this.text = problem.getText();\n this.isBlockElement = false;\n this.isFillBackground = settings.isFillProblemLabels();\n\n this.isUseEditorFont = settings.isUseEditorFont();\n this.inlayFontSizeDelta = settings.getInlayFontSizeDelta();\n }\n\n @Override\n public int calcWidthInPixels(@NotNull Inlay inlay) {\n return calcWidthInPixels(inlay.getEditor());\n }\n\n public int calcWidthInPixels(@NotNull Editor editor) {\n var editorContext = FontInfo.getFontRenderContext(editor.getComponent());\n var context = new FontRenderContext(editorContext.getTransform(),\n AntialiasingType.getKeyForCurrentScope(false),\n UISettings.getEditorFractionalMetricsHint());\n\n var fontMetrics = FontInfo.getFontMetrics(FontUtil.getActiveFont(editor), context);\n\n return fontMetrics.stringWidth(text) + WIDTH_OFFSET;\n }\n\n @Override\n public void paint(@NotNull Inlay inlay, @NotNull Graphics graphics, @NotNull Rectangle targetRegion, @NotNull TextAttributes textAttributes) {\n Editor editor = inlay.getEditor();\n\n // These offsets are applied here and not in the calc functions itself because we use it to shrink the drawn stuff a little bit\n int width = calcWidthInPixels(inlay) + DRAW_BOX_WIDTH_OFFSET;\n int height = calcHeightInPixels(inlay) + DRAW_BOX_HEIGHT_OFFSET;\n\n int targetRegionY = targetRegion.y + DRAW_BOX_PLACEMENT_OFFSET_Y;\n\n int editorFontSize = editor.getColorsScheme().getEditorFontSize();\n\n // Apply delta on the boxes\n if (inlayFontSizeDelta != 0 && editorFontSize > inlayFontSizeDelta) {\n height -= inlayFontSizeDelta;\n targetRegionY += (int)(inlayFontSizeDelta / 1.5);\n }\n\n if (isDrawBox) {\n graphics.setColor(backgroundColor);\n\n if (isRoundedCorners) {\n graphics.drawRoundRect(\n targetRegion.x,\n targetRegionY,\n width,\n height,\n 5,\n 5\n );\n\n if (isFillBackground) {\n graphics.fillRoundRect(\n targetRegion.x,\n targetRegionY,\n width,\n height,\n 5,\n 5\n );\n }\n }\n else {\n graphics.drawRect(\n targetRegion.x,\n targetRegionY,\n width,\n height\n );\n\n if (isFillBackground) {\n graphics.fillRect(\n targetRegion.x,\n targetRegionY,\n width,\n height\n );\n }\n }\n }\n\n graphics.setColor(textColor);\n\n graphics.setFont(FontUtil.getActiveFont(editor));\n\n graphics.drawString(\n text,\n targetRegion.x + DRAW_STRING_LINE_PLACEMENT_OFFSET_X,\n targetRegion.y + DRAW_STRING_LINE_PLACEMENT_OFFSET_Y + editor.getAscent()\n );\n }\n\n @Override\n public @Nullable GutterIconRenderer calcGutterIconRenderer(@NotNull Inlay inlay) {\n return EditorCustomElementRenderer.super.calcGutterIconRenderer(inlay);\n }\n}\n", "head_content": "package org.overengineer.inlineproblems;\n\nimport com.intellij.codeInsight.hints.presentation.InputHandler;\nimport com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler;\nimport com.intellij.ide.ui.AntialiasingType;\nimport com.intellij.ide.ui.UISettings;\nimport com.intellij.openapi.actionSystem.AnAction;\nimport com.intellij.openapi.actionSystem.IdeActions;\nimport com.intellij.openapi.actionSystem.ex.ActionUtil;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.editor.EditorCustomElementRenderer;\nimport com.intellij.openapi.editor.Inlay;\nimport com.intellij.openapi.editor.ScrollType;\nimport com.intellij.openapi.editor.impl.FontInfo;\nimport com.intellij.openapi.editor.markup.GutterIconRenderer;\nimport com.intellij.openapi.editor.markup.TextAttributes;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiUtilBase;\nimport com.intellij.ui.paint.EffectPainter;\nimport lombok.Getter;\nimport lombok.Setter;\nimport org.jdesktop.swingx.action.ActionManager;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.overengineer.inlineproblems.entities.InlineProblem;\nimport org.overengineer.inlineproblems.settings.SettingsState;\nimport org.overengineer.inlineproblems.utils.FontUtil;\n\nimport java.awt.*;\nimport java.awt.event.MouseEvent;\nimport java.awt.font.FontRenderContext;\n\n\n@Getter\npublic class InlineProblemLabel implements EditorCustomElementRenderer, InputHandler {\n private final String text;\n private final Color textColor;\n private final Color backgroundColor;\n private final Color hoverColor;\n private final boolean isDrawBox;\n private final boolean isRoundedCorners;\n private final boolean isFillBackground;\n private boolean hovered;\n private final boolean clickableContext;\n private Inlay inlay;\n private final int actualStartOffset;\n\n @Setter\n private boolean isBlockElement;\n\n private final int inlayFontSizeDelta;\n private final boolean isUseEditorFont;\n\n private static final int WIDTH_OFFSET = 7;\n private static final int DRAW_BOX_HEIGHT_OFFSET = -2; // Makes the box lines visible even if line below / above is highlighted\n private static final int DRAW_BOX_WIDTH_OFFSET = -2; // To have space between 2 boxes\n private static final int DRAW_BOX_PLACEMENT_OFFSET_Y = 1;\n private static final int DRAW_STRING_LINE_PLACEMENT_OFFSET_Y = -1;\n private static final int DRAW_STRING_LINE_PLACEMENT_OFFSET_X = 3;\n\n public InlineProblemLabel(\n final InlineProblem problem,\n final Color textColor,\n final Color backgroundColor,\n final Color hoverColor,\n final SettingsState settings\n ) {\n this.textColor = textColor;\n this.backgroundColor = backgroundColor;\n this.hoverColor = hoverColor;\n this.isDrawBox = settings.isDrawBoxesAroundErrorLabels();\n this.isRoundedCorners = settings.isRoundedCornerBoxes();\n this.text = problem.getText();\n this.isBlockElement = false;\n this.isFillBackground = settings.isFillProblemLabels();\n\n this.isUseEditorFont = settings.isUseEditorFont();\n this.inlayFontSizeDelta = settings.getInlayFontSizeDelta();\n this.hovered = false;\n this.actualStartOffset = problem.getActualStartffset();\n this.clickableContext = settings.isClickableContext();\n }\n\n @Override\n public int calcWidthInPixels(@NotNull Inlay inlay) {\n return calcWidthInPixels(inlay.getEditor());\n }\n\n public int calcWidthInPixels(@NotNull Editor editor) {\n var editorContext = FontInfo.getFontRenderContext(editor.getComponent());\n var context = new FontRenderContext(editorContext.getTransform(),\n AntialiasingType.getKeyForCurrentScope(false),\n UISettings.getEditorFractionalMetricsHint());\n\n var fontMetrics = FontInfo.getFontMetrics(FontUtil.getActiveFont(editor), context);\n\n return fontMetrics.stringWidth(text) + WIDTH_OFFSET;\n }\n\n @Override\n public void paint(@NotNull Inlay inlay, @NotNull Graphics graphics, @NotNull Rectangle targetRegion, @NotNull TextAttributes textAttributes) {\n Editor editor = inlay.getEditor();\n this.inlay = inlay;\n // These offsets are applied here and not in the calc functions itself because we use it to shrink the drawn stuff a little bit\n int width = calcWidthInPixels(inlay) + DRAW_BOX_WIDTH_OFFSET;\n int height = calcHeightInPixels(inlay) + DRAW_BOX_HEIGHT_OFFSET;\n\n int targetRegionY = targetRegion.y + DRAW_BOX_PLACEMENT_OFFSET_Y;\n\n int editorFontSize = editor.getColorsScheme().getEditorFontSize();\n\n // Apply delta on the boxes\n if (inlayFontSizeDelta != 0 && editorFontSize > inlayFontSizeDelta) {\n height -= inlayFontSizeDelta;\n targetRegionY += (int) (inlayFontSizeDelta / 1.5);\n }\n\n if (isDrawBox) {\n graphics.setColor(backgroundColor);\n\n if (isRoundedCorners) {\n graphics.drawRoundRect(\n targetRegion.x,\n targetRegionY,\n width,\n height,\n 5,\n 5\n );\n\n if (isFillBackground) {\n graphics.fillRoundRect(\n targetRegion.x,\n targetRegionY,\n width,\n height,\n 5,\n 5\n );\n }\n } else {\n graphics.drawRect(\n targetRegion.x,\n targetRegionY,\n width,\n height\n );\n\n if (isFillBackground) {\n graphics.fillRect(\n targetRegion.x,\n targetRegionY,\n width,\n height\n );\n }\n }\n }\n\n graphics.setColor(hovered ? hoverColor : textColor);\n\n graphics.setFont(FontUtil.getActiveFont(editor));\n\n graphics.drawString(\n text,\n targetRegion.x + DRAW_STRING_LINE_PLACEMENT_OFFSET_X,\n targetRegion.y + DRAW_STRING_LINE_PLACEMENT_OFFSET_Y + editor.getAscent()\n );\n if (hovered)\n EffectPainter.LINE_UNDERSCORE.paint(\n (Graphics2D) graphics,\n targetRegion.x - DRAW_BOX_WIDTH_OFFSET,\n targetRegion.y + editor.getAscent() ,\n width + (DRAW_BOX_WIDTH_OFFSET * 2),\n editor.getAscent(),\n FontUtil.getActiveFont(editor));\n }\n\n private void setHovered(boolean hovered) {\n if (!this.clickableContext || this.hovered == hovered) {\n return;\n }\n this.hovered = hovered;\n if (inlay != null)\n inlay.repaint();\n }\n\n @Override\n public @Nullable GutterIconRenderer calcGutterIconRenderer(@NotNull Inlay inlay) {\n return EditorCustomElementRenderer.super.calcGutterIconRenderer(inlay);\n }\n\n @Override\n public void mouseClicked(@NotNull MouseEvent mouseEvent, @NotNull Point point) {\n if (!clickableContext) {\n return;\n }\n if (mouseEvent.getButton() == MouseEvent.BUTTON1) {\n mouseEvent.consume();\n\n var editor = inlay.getEditor();\n editor.getCaretModel().moveToOffset(actualStartOffset);\n editor.getScrollingModel().scrollToCaret(ScrollType.CENTER);\n\n var action = ActionManager.getInstance().getAction(IdeActions.ACTION_SHOW_INTENTION_ACTIONS);\n if (action == null) {\n Project project = editor.getProject();\n if (project == null) return;\n PsiFile psiFileInEditor = PsiUtilBase.getPsiFileInEditor(editor, project);\n if (psiFileInEditor == null) return;\n new ShowIntentionActionsHandler().invoke(project, editor, psiFileInEditor, false);\n } else {\n ActionUtil.invokeAction((AnAction) action, editor.getComponent(), \"EditorInlay\", null, null);\n }\n }\n }\n\n @Override\n public void mouseMoved(@NotNull MouseEvent mouseEvent, @NotNull Point point) {\n setHovered(true);\n }\n\n @Override\n public void mouseExited() {\n setHovered(false);\n }\n\n}\n", "patch": "--- a/src/main/java/org/overengineer/inlineproblems/InlineProblemLabel.java\n+++ b/src/main/java/org/overengineer/inlineproblems/InlineProblemLabel.java\n@@ -1,15 +1,26 @@\n package org.overengineer.inlineproblems;\n \n+import com.intellij.codeInsight.hints.presentation.InputHandler;\n+import com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler;\n import com.intellij.ide.ui.AntialiasingType;\n import com.intellij.ide.ui.UISettings;\n+import com.intellij.openapi.actionSystem.AnAction;\n+import com.intellij.openapi.actionSystem.IdeActions;\n+import com.intellij.openapi.actionSystem.ex.ActionUtil;\n import com.intellij.openapi.editor.Editor;\n import com.intellij.openapi.editor.EditorCustomElementRenderer;\n import com.intellij.openapi.editor.Inlay;\n+import com.intellij.openapi.editor.ScrollType;\n import com.intellij.openapi.editor.impl.FontInfo;\n import com.intellij.openapi.editor.markup.GutterIconRenderer;\n import com.intellij.openapi.editor.markup.TextAttributes;\n+import com.intellij.openapi.project.Project;\n+import com.intellij.psi.PsiFile;\n+import com.intellij.psi.util.PsiUtilBase;\n+import com.intellij.ui.paint.EffectPainter;\n import lombok.Getter;\n import lombok.Setter;\n+import org.jdesktop.swingx.action.ActionManager;\n import org.jetbrains.annotations.NotNull;\n import org.jetbrains.annotations.Nullable;\n import org.overengineer.inlineproblems.entities.InlineProblem;\n@@ -17,18 +28,23 @@\n import org.overengineer.inlineproblems.utils.FontUtil;\n \n import java.awt.*;\n+import java.awt.event.MouseEvent;\n import java.awt.font.FontRenderContext;\n \n \n @Getter\n-public class InlineProblemLabel implements EditorCustomElementRenderer {\n-\n+public class InlineProblemLabel implements EditorCustomElementRenderer, InputHandler {\n private final String text;\n private final Color textColor;\n private final Color backgroundColor;\n+ private final Color hoverColor;\n private final boolean isDrawBox;\n private final boolean isRoundedCorners;\n private final boolean isFillBackground;\n+ private boolean hovered;\n+ private final boolean clickableContext;\n+ private Inlay inlay;\n+ private final int actualStartOffset;\n \n @Setter\n private boolean isBlockElement;\n@@ -47,10 +63,12 @@\n final InlineProblem problem,\n final Color textColor,\n final Color backgroundColor,\n+ final Color hoverColor,\n final SettingsState settings\n ) {\n this.textColor = textColor;\n this.backgroundColor = backgroundColor;\n+ this.hoverColor = hoverColor;\n this.isDrawBox = settings.isDrawBoxesAroundErrorLabels();\n this.isRoundedCorners = settings.isRoundedCornerBoxes();\n this.text = problem.getText();\n@@ -59,6 +77,9 @@\n \n this.isUseEditorFont = settings.isUseEditorFont();\n this.inlayFontSizeDelta = settings.getInlayFontSizeDelta();\n+ this.hovered = false;\n+ this.actualStartOffset = problem.getActualStartffset();\n+ this.clickableContext = settings.isClickableContext();\n }\n \n @Override\n@@ -80,7 +101,7 @@\n @Override\n public void paint(@NotNull Inlay inlay, @NotNull Graphics graphics, @NotNull Rectangle targetRegion, @NotNull TextAttributes textAttributes) {\n Editor editor = inlay.getEditor();\n-\n+ this.inlay = inlay;\n // These offsets are applied here and not in the calc functions itself because we use it to shrink the drawn stuff a little bit\n int width = calcWidthInPixels(inlay) + DRAW_BOX_WIDTH_OFFSET;\n int height = calcHeightInPixels(inlay) + DRAW_BOX_HEIGHT_OFFSET;\n@@ -92,7 +113,7 @@\n // Apply delta on the boxes\n if (inlayFontSizeDelta != 0 && editorFontSize > inlayFontSizeDelta) {\n height -= inlayFontSizeDelta;\n- targetRegionY += (int)(inlayFontSizeDelta / 1.5);\n+ targetRegionY += (int) (inlayFontSizeDelta / 1.5);\n }\n \n if (isDrawBox) {\n@@ -118,14 +139,13 @@\n 5\n );\n }\n- }\n- else {\n- graphics.drawRect(\n- targetRegion.x,\n- targetRegionY,\n- width,\n- height\n- );\n+ } else {\n+ graphics.drawRect(\n+ targetRegion.x,\n+ targetRegionY,\n+ width,\n+ height\n+ );\n \n if (isFillBackground) {\n graphics.fillRect(\n@@ -138,7 +158,7 @@\n }\n }\n \n- graphics.setColor(textColor);\n+ graphics.setColor(hovered ? hoverColor : textColor);\n \n graphics.setFont(FontUtil.getActiveFont(editor));\n \n@@ -147,10 +167,63 @@\n targetRegion.x + DRAW_STRING_LINE_PLACEMENT_OFFSET_X,\n targetRegion.y + DRAW_STRING_LINE_PLACEMENT_OFFSET_Y + editor.getAscent()\n );\n+ if (hovered)\n+ EffectPainter.LINE_UNDERSCORE.paint(\n+ (Graphics2D) graphics,\n+ targetRegion.x - DRAW_BOX_WIDTH_OFFSET,\n+ targetRegion.y + editor.getAscent() ,\n+ width + (DRAW_BOX_WIDTH_OFFSET * 2),\n+ editor.getAscent(),\n+ FontUtil.getActiveFont(editor));\n+ }\n+\n+ private void setHovered(boolean hovered) {\n+ if (!this.clickableContext || this.hovered == hovered) {\n+ return;\n+ }\n+ this.hovered = hovered;\n+ if (inlay != null)\n+ inlay.repaint();\n }\n \n @Override\n public @Nullable GutterIconRenderer calcGutterIconRenderer(@NotNull Inlay inlay) {\n return EditorCustomElementRenderer.super.calcGutterIconRenderer(inlay);\n }\n+\n+ @Override\n+ public void mouseClicked(@NotNull MouseEvent mouseEvent, @NotNull Point point) {\n+ if (!clickableContext) {\n+ return;\n+ }\n+ if (mouseEvent.getButton() == MouseEvent.BUTTON1) {\n+ mouseEvent.consume();\n+\n+ var editor = inlay.getEditor();\n+ editor.getCaretModel().moveToOffset(actualStartOffset);\n+ editor.getScrollingModel().scrollToCaret(ScrollType.CENTER);\n+\n+ var action = ActionManager.getInstance().getAction(IdeActions.ACTION_SHOW_INTENTION_ACTIONS);\n+ if (action == null) {\n+ Project project = editor.getProject();\n+ if (project == null) return;\n+ PsiFile psiFileInEditor = PsiUtilBase.getPsiFileInEditor(editor, project);\n+ if (psiFileInEditor == null) return;\n+ new ShowIntentionActionsHandler().invoke(project, editor, psiFileInEditor, false);\n+ } else {\n+ ActionUtil.invokeAction((AnAction) action, editor.getComponent(), \"EditorInlay\", null, null);\n+ }\n+ }\n+ }\n+\n+ @Override\n+ public void mouseMoved(@NotNull MouseEvent mouseEvent, @NotNull Point point) {\n+ setHovered(true);\n+ }\n+\n+ @Override\n+ public void mouseExited() {\n+ setHovered(false);\n+ }\n+\n }\n"}, {"path": "src/main/java/org/overengineer/inlineproblems/entities/InlineProblem.java", "additions": 2, "deletions": 0, "changeType": "MODIFIED", "base_content": "package org.overengineer.inlineproblems.entities;\n\nimport com.intellij.codeInsight.daemon.impl.HighlightInfo;\nimport com.intellij.openapi.editor.markup.RangeHighlighter;\nimport com.intellij.openapi.fileEditor.TextEditor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport lombok.EqualsAndHashCode;\nimport lombok.Getter;\nimport lombok.Setter;\nimport org.overengineer.inlineproblems.definitions.RegexPattern;\nimport org.overengineer.inlineproblems.settings.SettingsState;\n\n@Getter\n@Setter\n@EqualsAndHashCode(exclude = {\"line\", \"problemLineHighlighterHashCode\", \"inlineProblemLabelHashCode\", \"isBlockElement\", \"drawDetails\"})\npublic class InlineProblem {\n\n // The line the problem first appeared\n private final int line;\n @Setter\n private int severity;\n\n // If two problems with the same text occur in the same line only one will be shown\n private final String text;\n private final String file;\n private final TextEditor textEditor;\n private final Project project;\n\n private DrawDetails drawDetails;\n\n private int actualEndOffset;\n\n private boolean isBlockElement = false;\n\n // Set after drawing the line highlight, used to remove it again\n private int problemLineHighlighterHashCode;\n\n // Set after drawing the inlay, used to remove the inlay again\n private int inlineProblemLabelHashCode = 0;\n\n // Used to determine if the problem has moved\n private int highlightInfoStartOffset;\n\n // Used to identify the problem, should never change even if problem the problem moved\n private int rangeHighlighterHashCode;\n\n\n public InlineProblem(\n int line,\n String filePath,\n HighlightInfo highlightInfo,\n TextEditor textEditor,\n RangeHighlighter rangeHighlighter,\n SettingsState settingsState\n ) {\n String usedText = highlightInfo.getDescription();\n if (usedText == null)\n usedText = \"\";\n else\n usedText = getTextWithHtmlStrippingAndXmlUnescaping(usedText.stripLeading(), settingsState);\n\n this.line = line;\n this.text = usedText;\n this.severity = highlightInfo.getSeverity().myVal;\n this.textEditor = textEditor;\n this.file = filePath;\n this.project = textEditor.getEditor().getProject();\n this.highlightInfoStartOffset = highlightInfo.hashCode();\n this.rangeHighlighterHashCode = rangeHighlighter.hashCode();\n\n if (highlightInfo.getActualEndOffset() == 0)\n this.actualEndOffset = highlightInfo.getActualEndOffset();\n else\n this.actualEndOffset = highlightInfo.getActualEndOffset() -1;\n }\n\n private String getTextWithHtmlStrippingAndXmlUnescaping(String text, SettingsState settingsState) {\n if (\n settingsState.isEnableHtmlStripping() &&\n text.contains(\"<\") &&\n RegexPattern.HTML_TAG_PATTERN.matcher(text).find()\n ) {\n text = StringUtil.stripHtml(text, \" \");\n }\n\n if (\n settingsState.isEnableHtmlStripping() &&\n text.contains(\"&\")\n ) {\n text = StringUtil.unescapeXmlEntities(text);\n }\n\n return text;\n }\n}\n", "head_content": "package org.overengineer.inlineproblems.entities;\n\nimport com.intellij.codeInsight.daemon.impl.HighlightInfo;\nimport com.intellij.openapi.editor.markup.RangeHighlighter;\nimport com.intellij.openapi.fileEditor.TextEditor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport lombok.EqualsAndHashCode;\nimport lombok.Getter;\nimport lombok.Setter;\nimport org.overengineer.inlineproblems.definitions.RegexPattern;\nimport org.overengineer.inlineproblems.settings.SettingsState;\n\n@Getter\n@Setter\n@EqualsAndHashCode(exclude = {\"line\", \"problemLineHighlighterHashCode\", \"inlineProblemLabelHashCode\", \"isBlockElement\", \"drawDetails\"})\npublic class InlineProblem {\n\n // The line the problem first appeared\n private final int line;\n @Setter\n private int severity;\n\n // If two problems with the same text occur in the same line only one will be shown\n private final String text;\n private final String file;\n private final TextEditor textEditor;\n private final Project project;\n\n private DrawDetails drawDetails;\n\n private int actualEndOffset;\n private int actualStartffset;\n\n private boolean isBlockElement = false;\n\n // Set after drawing the line highlight, used to remove it again\n private int problemLineHighlighterHashCode;\n\n // Set after drawing the inlay, used to remove the inlay again\n private int inlineProblemLabelHashCode = 0;\n\n // Used to determine if the problem has moved\n private int highlightInfoStartOffset;\n\n // Used to identify the problem, should never change even if problem the problem moved\n private int rangeHighlighterHashCode;\n\n\n public InlineProblem(\n int line,\n String filePath,\n HighlightInfo highlightInfo,\n TextEditor textEditor,\n RangeHighlighter rangeHighlighter,\n SettingsState settingsState\n ) {\n String usedText = highlightInfo.getDescription();\n if (usedText == null)\n usedText = \"\";\n else\n usedText = getTextWithHtmlStrippingAndXmlUnescaping(usedText.stripLeading(), settingsState);\n\n this.line = line;\n this.text = usedText;\n this.severity = highlightInfo.getSeverity().myVal;\n this.textEditor = textEditor;\n this.file = filePath;\n this.project = textEditor.getEditor().getProject();\n this.highlightInfoStartOffset = highlightInfo.hashCode();\n this.rangeHighlighterHashCode = rangeHighlighter.hashCode();\n this.actualStartffset = highlightInfo.getStartOffset();\n\n if (highlightInfo.getActualEndOffset() == 0)\n this.actualEndOffset = highlightInfo.getActualEndOffset();\n else\n this.actualEndOffset = highlightInfo.getActualEndOffset() -1;\n }\n\n private String getTextWithHtmlStrippingAndXmlUnescaping(String text, SettingsState settingsState) {\n if (\n settingsState.isEnableHtmlStripping() &&\n text.contains(\"<\") &&\n RegexPattern.HTML_TAG_PATTERN.matcher(text).find()\n ) {\n text = StringUtil.stripHtml(text, \" \");\n }\n\n if (\n settingsState.isEnableHtmlStripping() &&\n text.contains(\"&\")\n ) {\n text = StringUtil.unescapeXmlEntities(text);\n }\n\n return text;\n }\n}\n", "patch": "--- a/src/main/java/org/overengineer/inlineproblems/entities/InlineProblem.java\n+++ b/src/main/java/org/overengineer/inlineproblems/entities/InlineProblem.java\n@@ -30,6 +30,7 @@\n private DrawDetails drawDetails;\n \n private int actualEndOffset;\n+ private int actualStartffset;\n \n private boolean isBlockElement = false;\n \n@@ -68,6 +69,7 @@\n this.project = textEditor.getEditor().getProject();\n this.highlightInfoStartOffset = highlightInfo.hashCode();\n this.rangeHighlighterHashCode = rangeHighlighter.hashCode();\n+ this.actualStartffset = highlightInfo.getStartOffset();\n \n if (highlightInfo.getActualEndOffset() == 0)\n this.actualEndOffset = highlightInfo.getActualEndOffset();\n"}, {"path": "src/main/java/org/overengineer/inlineproblems/settings/SettingsComponent.java", "additions": 15, "deletions": 4, "changeType": "MODIFIED", "base_content": "package org.overengineer.inlineproblems.settings;\n\nimport com.intellij.openapi.ui.ComboBox;\nimport com.intellij.ui.ColorPanel;\nimport com.intellij.ui.components.JBCheckBox;\nimport com.intellij.ui.components.JBLabel;\nimport com.intellij.ui.components.JBTextField;\nimport com.intellij.util.ui.FormBuilder;\nimport lombok.Getter;\nimport org.overengineer.inlineproblems.DocumentMarkupModelScanner;\nimport org.overengineer.inlineproblems.bundles.SettingsBundle;\nimport org.overengineer.inlineproblems.listeners.HighlightProblemListener;\nimport org.overengineer.inlineproblems.listeners.MarkupModelProblemListener;\n\nimport javax.swing.*;\nimport javax.swing.text.NumberFormatter;\nimport java.awt.*;\nimport java.text.NumberFormat;\nimport java.util.Arrays;\nimport java.util.Optional;\nimport java.util.stream.Collectors;\nimport java.util.List;\n\n\npublic class SettingsComponent {\n private final JBCheckBox showErrors = new JBCheckBox(SettingsBundle.message(\"settings.showErrors\"));\n private final JBCheckBox highlightErrors = new JBCheckBox(SettingsBundle.message(\"settings.highlightErrors\"));\n private final JBCheckBox showErrorsInGutter = new JBCheckBox(SettingsBundle.message(\"settings.showErrorsInGutter\"));\n\n private final JBCheckBox showWarnings = new JBCheckBox(SettingsBundle.message(\"settings.showWarnings\"));\n private final JBCheckBox highlightWarnings = new JBCheckBox(SettingsBundle.message(\"settings.highlightWarnings\"));\n private final JBCheckBox showWarningsInGutter = new JBCheckBox(SettingsBundle.message(\"settings.showWarningsInGutter\"));\n\n private final JBCheckBox showWeakWarnings = new JBCheckBox(SettingsBundle.message(\"settings.showWeakWarnings\"));\n private final JBCheckBox highlightWeakWarnings = new JBCheckBox(SettingsBundle.message(\"settings.highlightWeakWarnings\"));\n private final JBCheckBox showWeakWarningsInGutter = new JBCheckBox(SettingsBundle.message(\"settings.showWeakWarningsInGutter\"));\n\n private final JBCheckBox showInfos = new JBCheckBox(SettingsBundle.message(\"settings.showInfos\"));\n private final JBCheckBox highlightInfo = new JBCheckBox(SettingsBundle.message(\"settings.highlightInfos\"));\n private final JBCheckBox showInfosInGutter = new JBCheckBox(SettingsBundle.message(\"settings.showInfosInGutter\"));\n\n private final ColorPanel errorTextColor = new ColorPanel();\n private final ColorPanel errorLabelBackgroundColor = new ColorPanel();\n private final ColorPanel errorHighlightColor = new ColorPanel();\n\n private final ColorPanel warningTextColor = new ColorPanel();\n private final ColorPanel warningLabelBackgroundColor = new ColorPanel();\n private final ColorPanel warningHighlightColor = new ColorPanel();\n\n private final ColorPanel weakWarningTextColor = new ColorPanel();\n private final ColorPanel weakWarningLabelBackgroundColor = new ColorPanel();\n private final ColorPanel weakWarningHighlightColor = new ColorPanel();\n\n private final ColorPanel infoTextColor = new ColorPanel();\n private final ColorPanel infoLabelBackgroundColor = new ColorPanel();\n private final ColorPanel infoHighlightColor = new ColorPanel();\n\n private final JBCheckBox forceErrorsInSameLine = new JBCheckBox(SettingsBundle.message(\"settings.forceProblemsInOneLine\"));\n private final JBCheckBox drawBoxesAroundProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.drawBoxesAroundProblemLabels\"));\n private final JBCheckBox roundedCornerBoxes = new JBCheckBox(SettingsBundle.message(\"settings.roundedCornerBoxes\"));\n private final JBCheckBox useEditorFont = new JBCheckBox(SettingsBundle.message(\"settings.useEditorFont\"));\n\n private final JBCheckBox showOnlyHighestSeverityPerLine = new JBCheckBox(SettingsBundle.message(\"settings.showOnlyHighestPerLine\"));\n private final JBCheckBox enableHtmlStripping = new JBCheckBox(SettingsBundle.message(\"settings.enableHtmlStripping\"));\n private final JBCheckBox enableXmlUnescaping = new JBCheckBox(SettingsBundle.message(\"settings.enableXmlUnescaping\"));\n private final JFormattedTextField inlayFontSizeDeltaText;\n private final JFormattedTextField manualScannerDelay;\n private final JBCheckBox fillProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.fillProblemLabels\"));\n private final JBCheckBox boldProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.boldProblemLabels\"));\n private final JBCheckBox italicProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.italicProblemLabels\"));\n private final JBTextField problemFilterList = new JBTextField();\n private final JBTextField fileExtensionBlacklist = new JBTextField();\n\n private final String[] availableListeners = {HighlightProblemListener.NAME, MarkupModelProblemListener.NAME, DocumentMarkupModelScanner.NAME};\n private final JComboBox enabledListener = new ComboBox<>(availableListeners);\n\n private final JBTextField additionalInfoSeverities = new JBTextField();\n private final JBTextField additionalWarningSeverities = new JBTextField();\n private final JBTextField additionalWeakWarningSeverities = new JBTextField();\n private final JBTextField additionalErrorSeverities = new JBTextField();\n\n @Getter\n private final JPanel settingsPanel;\n\n public SettingsComponent() {\n SettingsState settingsState = SettingsState.getInstance();\n\n showErrors.setSelected(settingsState.isShowErrors());\n highlightErrors.setSelected(settingsState.isHighlightErrors());\n showErrorsInGutter.setSelected(settingsState.isShowErrorsInGutter());\n errorTextColor.setSelectedColor(settingsState.getErrorTextColor());\n errorLabelBackgroundColor.setSelectedColor(settingsState.getErrorBackgroundColor());\n errorHighlightColor.setSelectedColor(settingsState.getErrorHighlightColor());\n\n showWarnings.setSelected(settingsState.isShowWarnings());\n highlightWarnings.setSelected(settingsState.isHighlightWarnings());\n showWarningsInGutter.setSelected(settingsState.isShowWarningsInGutter());\n warningTextColor.setSelectedColor(settingsState.getWarningTextColor());\n warningLabelBackgroundColor.setSelectedColor(settingsState.getWarningBackgroundColor());\n warningHighlightColor.setSelectedColor(settingsState.getWarningHighlightColor());\n\n showWeakWarnings.setSelected(settingsState.isShowWeakWarnings());\n highlightWeakWarnings.setSelected(settingsState.isHighlightWeakWarnings());\n showWeakWarningsInGutter.setSelected(settingsState.isShowWeakWarningsInGutter());\n weakWarningTextColor.setSelectedColor(settingsState.getWeakWarningTextColor());\n weakWarningLabelBackgroundColor.setSelectedColor(settingsState.getWeakWarningBackgroundColor());\n weakWarningHighlightColor.setSelectedColor(settingsState.getWeakWarningHighlightColor());\n\n showInfos.setSelected(settingsState.isShowInfos());\n highlightInfo.setSelected(settingsState.isHighlightInfos());\n showInfosInGutter.setSelected(settingsState.isShowInfosInGutter());\n infoTextColor.setSelectedColor(settingsState.getInfoTextColor());\n infoLabelBackgroundColor.setSelectedColor(settingsState.getInfoBackgroundColor());\n infoHighlightColor.setSelectedColor(settingsState.getInfoHighlightColor());\n\n forceErrorsInSameLine.setSelected(settingsState.isForceProblemsInSameLine());\n drawBoxesAroundProblemLabels.setSelected(settingsState.isDrawBoxesAroundErrorLabels());\n roundedCornerBoxes.setSelected(settingsState.isRoundedCornerBoxes());\n\n useEditorFont.setSelected(settingsState.isUseEditorFont());\n\n NumberFormat intFormat = NumberFormat.getIntegerInstance();\n intFormat.setGroupingUsed(false);\n NumberFormatter numberFormatter = new NumberFormatter(intFormat);\n numberFormatter.setValueClass(Integer.class); // Optional, ensures we always get a int value\n\n inlayFontSizeDeltaText = new JFormattedTextField(numberFormatter);\n inlayFontSizeDeltaText.setText(Integer.toString(settingsState.getInlayFontSizeDelta()));\n\n manualScannerDelay = new JFormattedTextField(numberFormatter);\n manualScannerDelay.setText(Integer.toString(settingsState.getManualScannerDelay()));\n\n fillProblemLabels.setSelected(settingsState.isFillProblemLabels());\n boldProblemLabels.setSelected(settingsState.isBoldProblemLabels());\n italicProblemLabels.setSelected(settingsState.isItalicProblemLabels());\n\n additionalInfoSeverities.setText(settingsState.getAdditionalInfoSeveritiesAsString());\n additionalWeakWarningSeverities.setText(settingsState.getAdditionalWeakWarningSeveritiesAsString());\n additionalWarningSeverities.setText(settingsState.getAdditionalWarningSeveritiesAsString());\n additionalErrorSeverities.setText(settingsState.getAdditionalErrorSeveritiesAsString());\n\n problemFilterList.setText(settingsState.getProblemFilterList());\n fileExtensionBlacklist.setText(settingsState.getFileExtensionBlacklist());\n enabledListener.setSelectedItem(Optional.of(settingsState.getEnabledListener()));\n\n Dimension enabledListenerDimension = enabledListener.getPreferredSize();\n enabledListenerDimension.width += 100;\n enabledListener.setPreferredSize(enabledListenerDimension);\n\n settingsPanel = FormBuilder.createFormBuilder()\n .addComponent(new JBLabel(SettingsBundle.message(\"settings.submenu.label\")))\n .addComponent(drawBoxesAroundProblemLabels, 0)\n .addComponent(roundedCornerBoxes, 0)\n .addComponent(fillProblemLabels, 0)\n .addComponent(boldProblemLabels, 0)\n .addComponent(italicProblemLabels, 0)\n .addSeparator()\n .addComponent(new JBLabel(SettingsBundle.message(\"settings.submenu.general\")))\n .addLabeledComponent(new JBLabel(SettingsBundle.message(\"settings.activeProblemListener\")), enabledListener)\n .addTooltip(SettingsBundle.message(\"settings.markupModelListenerDescription\"))\n .addTooltip(SettingsBundle.message(\"settings.highlightProblemListenerDescription\"))\n .addTooltip(SettingsBundle.message(\"settings.manualScannerDescription\"))\n .addTooltip(SettingsBundle.message(\"settings.manualScannerDescriptionSupplement\"))\n .addLabeledComponent(new JBLabel(SettingsBundle.message(\"settings.manualScannerDelayLabel\")), manualScannerDelay)\n .addTooltip(SettingsBundle.message(\"settings.manualScannerDelayTooltip\"))\n .addComponent(forceErrorsInSameLine, 0)\n .addComponent(useEditorFont, 0)\n .addComponent(showOnlyHighestSeverityPerLine, 0)\n .addComponent(enableHtmlStripping, 0)\n .addComponent(enableXmlUnescaping, 0)\n .addLabeledComponent(new JBLabel(SettingsBundle.message(\"settings.inlaySizeDelta\")), inlayFontSizeDeltaText)\n .addTooltip(SettingsBundle.message(\"settings.inlaySizeDeltaTooltip\"))\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.problemFilterListLabel\")), problemFilterList)\n .addTooltip(SettingsBundle.message(\"settings.problemFilterListTooltip\"))\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.fileExtensionBlacklistLabel\")), fileExtensionBlacklist)\n .addTooltip(SettingsBundle.message(\"settings.fileExtensionBlaclistTooltip\"))\n .addSeparator()\n .addComponent(new JBLabel(SettingsBundle.message(\"settings.submenu.colors\")))\n .addComponent(showErrors)\n .addComponent(highlightErrors)\n .addComponent(showErrorsInGutter)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.errorTextColor\")), errorTextColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.errorLabelBorderColor\")), errorLabelBackgroundColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.errorLineHighlightColor\")), errorHighlightColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.additionalSeverities\")), additionalErrorSeverities)\n .addTooltip(SettingsBundle.message(\"settings.additionalSeveritiesErrorDesc\"))\n .addSeparator()\n .addComponent(showWarnings)\n .addComponent(highlightWarnings)\n .addComponent(showWarningsInGutter)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.warningTextColor\")), warningTextColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.warningLabelBorderColor\")), warningLabelBackgroundColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.warningLineHighlightColor\")), warningHighlightColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.additionalSeverities\")), additionalWarningSeverities)\n .addTooltip(SettingsBundle.message(\"settings.additionalSeveritiesWarningDesc\"))\n .addSeparator()\n .addComponent(showWeakWarnings)\n .addComponent(highlightWeakWarnings)\n .addComponent(showWeakWarningsInGutter)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.weakWarningTextColor\")), weakWarningTextColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.weakWarningLabelBorderColor\")), weakWarningLabelBackgroundColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.weakWarningLineHighlightColor\")), weakWarningHighlightColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.additionalSeverities\")), additionalWeakWarningSeverities)\n .addTooltip(SettingsBundle.message(\"settings.additionalSeveritiesWeakWarningDesc\"))\n .addSeparator()\n .addComponent(showInfos)\n .addComponent(highlightInfo)\n .addComponent(showInfosInGutter)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.infoTextColor\")), infoTextColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.infoLabelBorderColor\")), infoLabelBackgroundColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.infoLineHighlightColor\")), infoHighlightColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.additionalSeverities\")), additionalInfoSeverities)\n .addTooltip(SettingsBundle.message(\"settings.additionalSeveritiesInfoDesc\"))\n .addComponentFillVertically(new JPanel(), 0)\n .getPanel();\n }\n\n public JComponent getPreferredFocusedComponent() {\n return settingsPanel;\n }\n\n public boolean isForceErrorsInSameLine() {\n return forceErrorsInSameLine.isSelected();\n }\n\n public void setForceErrorsInSameLine(final boolean isSelected) {\n forceErrorsInSameLine.setSelected(isSelected);\n }\n\n public boolean getDrawBoxesAroundProblemLabels() {\n return drawBoxesAroundProblemLabels.isSelected();\n }\n\n public void setDrawBoxesAroundProblemLabels(final boolean isSelected) {\n drawBoxesAroundProblemLabels.setSelected(isSelected);\n }\n\n public boolean isRoundedCornerBoxes() {\n return roundedCornerBoxes.isSelected();\n }\n\n public void setRoundedCornerBoxes(boolean isSelected) {\n roundedCornerBoxes.setSelected(isSelected);\n }\n\n public boolean isUseEditorFont() {\n return useEditorFont.isSelected();\n }\n\n public boolean isShowOnlyHighestSeverityPerLine() {\n return showOnlyHighestSeverityPerLine.isSelected();\n }\n\n public boolean isEnableHtmlStripping() {\n return enableHtmlStripping.isSelected();\n }\n\n public boolean isEnableXmlUnescaping() {\n return enableXmlUnescaping.isSelected();\n }\n\n public int getInlayFontSizeDelta() {\n int val = 0;\n // Convert the String\n try {\n val = Integer.parseInt(inlayFontSizeDeltaText.getText());\n }\n catch (NumberFormatException ignored) {}\n\n if (val < 0)\n val = 0;\n\n return val;\n }\n\n public void setInlayFontSizeDelta(int val) {\n inlayFontSizeDeltaText.setText(String.valueOf(Math.max(0, val)));\n }\n\n public void setUseEditorFont(boolean isSelected) {\n useEditorFont.setSelected(isSelected);\n }\n\n public void setShowOnlyHighestSeverityPerLine(boolean isSelected) {\n showOnlyHighestSeverityPerLine.setSelected(isSelected);\n }\n\n public void setEnableHtmlStripping(boolean isSelected) {\n enableHtmlStripping.setSelected(isSelected);\n }\n\n public void setEnableXmlUnescaping(boolean isSelected) {\n enableXmlUnescaping.setSelected(isSelected);\n }\n\n public boolean isFillProblemLabels() {\n return fillProblemLabels.isSelected();\n }\n\n public void setFillProblemLabels(boolean isSelected) {\n fillProblemLabels.setSelected(isSelected);\n }\n\n public boolean isBoldProblemLabels() {\n return boldProblemLabels.isSelected();\n }\n\n public void setBoldProblemLabels(boolean isSelected) {\n boldProblemLabels.setSelected(isSelected);\n }\n\n public boolean isItalicProblemLabels() {\n return italicProblemLabels.isSelected();\n }\n\n public void setItalicProblemLabels(boolean isSelected) {\n italicProblemLabels.setSelected(isSelected);\n }\n\n public boolean isShowErrors() {\n return showErrors.isSelected();\n }\n\n public void setShowErrors(final boolean isSelected) {\n showErrors.setSelected(isSelected);\n }\n\n public boolean isHighlightErrors() {\n return highlightErrors.isSelected();\n }\n\n public void setHighlightErrors(boolean isSelected) {\n highlightErrors.setSelected(isSelected);\n }\n\n public boolean isShowErrorsInGutter() {\n return showErrorsInGutter.isSelected();\n }\n\n public void setShowErrorsInGutter(boolean isSelected) {\n showErrorsInGutter.setSelected(isSelected);\n }\n\n public boolean isShowWarnings() {\n return showWarnings.isSelected();\n }\n\n public void setShowWarnings(final boolean isSelected) {\n showWarnings.setSelected(isSelected);\n }\n\n public boolean isHighlightWarnings() {\n return highlightWarnings.isSelected();\n }\n\n public void setHighlightWarnings(final boolean isSelected) {\n highlightWarnings.setSelected(isSelected);\n }\n\n public boolean isShowWarningsInGutter() {\n return showWarningsInGutter.isSelected();\n }\n\n public void setShowWarningsInGutter(final boolean isSelected) {\n showWarningsInGutter.setSelected(isSelected);\n }\n\n public boolean isShowWeakWarnings() {\n return showWeakWarnings.isSelected();\n }\n\n public void setShowWeakWarnings(final boolean isSelected) {\n showWeakWarnings.setSelected(isSelected);\n }\n\n public boolean isHighlightWeakWarnings() {\n return highlightWeakWarnings.isSelected();\n }\n\n public void setHighlightWeakWarnings(final boolean isSelected) {\n highlightWeakWarnings.setSelected(isSelected);\n }\n\n public boolean isShowWeakWarningsInGutter() {\n return showWeakWarningsInGutter.isSelected();\n }\n\n public void setShowWeakWarningsInGutter(boolean isSelected) {\n showWeakWarningsInGutter.setSelected(isSelected);\n }\n\n public boolean isShowInfos() {\n return showInfos.isSelected();\n }\n\n public void setShowInfos(final boolean isSelected) {\n showInfos.setSelected(isSelected);\n }\n\n public boolean isHighlightInfo() {\n return highlightInfo.isSelected();\n }\n\n public void setHighlightInfo(final boolean isSelected) {\n highlightInfo.setSelected(isSelected);\n }\n\n public boolean isShowInfosInGutter() {\n return showInfosInGutter.isSelected();\n }\n\n public void setShowInfosInGutter(boolean isSelected) {\n showInfosInGutter.setSelected(isSelected);\n }\n\n public Color getErrorTextColor() {\n return errorTextColor.getSelectedColor();\n }\n\n public void setErrorTextColor(final Color color) {\n errorTextColor.setSelectedColor(color);\n }\n\n public Color getErrorLabelBackgroundColor() {\n return errorLabelBackgroundColor.getSelectedColor();\n }\n\n public void setErrorLabelBackgroundColor(final Color color) {\n errorLabelBackgroundColor.setSelectedColor(color);\n }\n\n public Color getWarningTextColor() {\n return warningTextColor.getSelectedColor();\n }\n\n public void setWarningTextColor(final Color color) {\n warningTextColor.setSelectedColor(color);\n }\n\n public Color getWarningLabelBackgroundColor() {\n return warningLabelBackgroundColor.getSelectedColor();\n }\n\n public void setWarningLabelBackgroundColor(final Color color) {\n warningLabelBackgroundColor.setSelectedColor(color);\n }\n\n public Color getWeakWarningTextColor() {\n return weakWarningTextColor.getSelectedColor();\n }\n\n public void setWeakWarningTextColor(final Color color) {\n weakWarningTextColor.setSelectedColor(color);\n }\n\n public Color getWeakWarningLabelBackgroundColor() {\n return weakWarningLabelBackgroundColor.getSelectedColor();\n }\n\n public void setWeakWarningLabelBackgroundColor(final Color color) {\n weakWarningLabelBackgroundColor.setSelectedColor(color);\n }\n\n public Color getInfoTextColor() {\n return infoTextColor.getSelectedColor();\n }\n\n public void setInfoTextColor(final Color color) {\n infoTextColor.setSelectedColor(color);\n }\n\n public Color getInfoLabelBackgroundColor() {\n return infoLabelBackgroundColor.getSelectedColor();\n }\n\n public void setInfoLabelBackgroundColor(final Color color) {\n infoLabelBackgroundColor.setSelectedColor(color);\n }\n\n public Color getErrorHighlightColor() {\n return errorHighlightColor.getSelectedColor();\n }\n\n public void setErrorHighlightColor(final Color color) {\n errorHighlightColor.setSelectedColor(color);\n }\n\n public Color getWarningHighlightColor() {\n return warningHighlightColor.getSelectedColor();\n }\n\n public void setWarningHighlightColor(final Color color) {\n warningHighlightColor.setSelectedColor(color);\n }\n\n public Color getWeakWarningHighlightColor() {\n return weakWarningHighlightColor.getSelectedColor();\n }\n\n public void setWeakWarningHighlightColor(final Color color) {\n weakWarningHighlightColor.setSelectedColor(color);\n }\n\n public Color getInfoHighlightColor() {\n return infoHighlightColor.getSelectedColor();\n }\n\n public void setInfoHighlightColor(final Color color) {\n infoHighlightColor.setSelectedColor(color);\n }\n\n public String getProblemFilterList() {\n return problemFilterList.getText();\n }\n\n public void setProblemFilterList(final String newText) {\n problemFilterList.setText(newText);\n }\n\n public String getFileExtensionBlacklist() {\n return fileExtensionBlacklist.getText();\n }\n\n public void setFileExtensionBlacklist(final String newText) {\n fileExtensionBlacklist.setText(newText);\n }\n\n public String getAdditionalInfoSeverities() {\n return additionalInfoSeverities.getText();\n }\n\n public List getAdditionalInfoSeveritiesList() {\n return getSeverityIntegerList(additionalInfoSeverities.getText());\n }\n\n public void setAdditionalInfoSeverities(final String newText) {\n additionalInfoSeverities.setText(newText);\n }\n\n public String getAdditionalWarningSeverities() {\n return additionalWarningSeverities.getText();\n }\n\n public List getAdditionalWarningSeveritiesList() {\n return getSeverityIntegerList(additionalWarningSeverities.getText());\n }\n\n public void setAdditionalWarningSeverities(final String newText) {\n additionalWarningSeverities.setText(newText);\n }\n\n public String getAdditionalErrorSeverities() {\n return additionalErrorSeverities.getText();\n }\n\n public List getAdditionalErrorSeveritiesList() {\n return getSeverityIntegerList(additionalErrorSeverities.getText());\n }\n\n public void setAdditionalErrorSeverities(final String newText) {\n additionalErrorSeverities.setText(newText);\n }\n\n public String getAdditionalWeakWarningSeverities() {\n return additionalWeakWarningSeverities.getText();\n }\n\n public List getAdditionalWeakWarningSeveritiesList() {\n return getSeverityIntegerList(additionalWeakWarningSeverities.getText());\n }\n\n public void setAdditionalWeakWarningSeverities(final String newText) {\n additionalWeakWarningSeverities.setText(newText);\n }\n\n public int getEnabledListener() {\n return enabledListener.getSelectedIndex();\n }\n\n public void setEnabledListener(int index) {\n enabledListener.setSelectedIndex(index);\n }\n\n private List getSeverityIntegerList(String text) {\n return Arrays.stream(text.split(\";\"))\n .map(String::trim)\n .filter(s -> !s.isEmpty())\n .filter(s -> {\n try {\n Integer.parseInt(s);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n })\n .map(Integer::parseInt)\n .collect(Collectors.toList());\n }\n\n public int getManualScannerDelay() {\n try {\n return Math.max(Integer.parseInt(manualScannerDelay.getText()), 10);\n }\n catch (NumberFormatException e) {\n return 100;\n }\n }\n\n public void setManualScannerDelay(int delay) {\n manualScannerDelay.setText(Integer.toString(Math.max(10, delay)));\n }\n}\n", "head_content": "package org.overengineer.inlineproblems.settings;\n\nimport com.intellij.openapi.ui.ComboBox;\nimport com.intellij.ui.ColorPanel;\nimport com.intellij.ui.components.JBCheckBox;\nimport com.intellij.ui.components.JBLabel;\nimport com.intellij.ui.components.JBTextField;\nimport com.intellij.util.ui.FormBuilder;\nimport lombok.Getter;\nimport org.overengineer.inlineproblems.DocumentMarkupModelScanner;\nimport org.overengineer.inlineproblems.bundles.SettingsBundle;\nimport org.overengineer.inlineproblems.listeners.HighlightProblemListener;\nimport org.overengineer.inlineproblems.listeners.MarkupModelProblemListener;\n\nimport javax.swing.*;\nimport javax.swing.text.NumberFormatter;\nimport java.awt.*;\nimport java.text.NumberFormat;\nimport java.util.Arrays;\nimport java.util.Optional;\nimport java.util.stream.Collectors;\nimport java.util.List;\n\n\npublic class SettingsComponent {\n private final JBCheckBox showErrors = new JBCheckBox(SettingsBundle.message(\"settings.showErrors\"));\n private final JBCheckBox highlightErrors = new JBCheckBox(SettingsBundle.message(\"settings.highlightErrors\"));\n private final JBCheckBox showErrorsInGutter = new JBCheckBox(SettingsBundle.message(\"settings.showErrorsInGutter\"));\n\n private final JBCheckBox showWarnings = new JBCheckBox(SettingsBundle.message(\"settings.showWarnings\"));\n private final JBCheckBox highlightWarnings = new JBCheckBox(SettingsBundle.message(\"settings.highlightWarnings\"));\n private final JBCheckBox showWarningsInGutter = new JBCheckBox(SettingsBundle.message(\"settings.showWarningsInGutter\"));\n\n private final JBCheckBox showWeakWarnings = new JBCheckBox(SettingsBundle.message(\"settings.showWeakWarnings\"));\n private final JBCheckBox highlightWeakWarnings = new JBCheckBox(SettingsBundle.message(\"settings.highlightWeakWarnings\"));\n private final JBCheckBox showWeakWarningsInGutter = new JBCheckBox(SettingsBundle.message(\"settings.showWeakWarningsInGutter\"));\n\n private final JBCheckBox showInfos = new JBCheckBox(SettingsBundle.message(\"settings.showInfos\"));\n private final JBCheckBox highlightInfo = new JBCheckBox(SettingsBundle.message(\"settings.highlightInfos\"));\n private final JBCheckBox showInfosInGutter = new JBCheckBox(SettingsBundle.message(\"settings.showInfosInGutter\"));\n\n private final ColorPanel errorTextColor = new ColorPanel();\n private final ColorPanel errorLabelBackgroundColor = new ColorPanel();\n private final ColorPanel errorHighlightColor = new ColorPanel();\n\n private final ColorPanel warningTextColor = new ColorPanel();\n private final ColorPanel warningLabelBackgroundColor = new ColorPanel();\n private final ColorPanel warningHighlightColor = new ColorPanel();\n\n private final ColorPanel weakWarningTextColor = new ColorPanel();\n private final ColorPanel weakWarningLabelBackgroundColor = new ColorPanel();\n private final ColorPanel weakWarningHighlightColor = new ColorPanel();\n\n private final ColorPanel infoTextColor = new ColorPanel();\n private final ColorPanel infoLabelBackgroundColor = new ColorPanel();\n private final ColorPanel infoHighlightColor = new ColorPanel();\n\n private final JBCheckBox forceErrorsInSameLine = new JBCheckBox(SettingsBundle.message(\"settings.forceProblemsInOneLine\"));\n private final JBCheckBox drawBoxesAroundProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.drawBoxesAroundProblemLabels\"));\n private final JBCheckBox roundedCornerBoxes = new JBCheckBox(SettingsBundle.message(\"settings.roundedCornerBoxes\"));\n private final JBCheckBox useEditorFont = new JBCheckBox(SettingsBundle.message(\"settings.useEditorFont\"));\n\n private final JBCheckBox showOnlyHighestSeverityPerLine = new JBCheckBox(SettingsBundle.message(\"settings.showOnlyHighestPerLine\"));\n private final JBCheckBox enableHtmlStripping = new JBCheckBox(SettingsBundle.message(\"settings.enableHtmlStripping\"));\n private final JBCheckBox enableXmlUnescaping = new JBCheckBox(SettingsBundle.message(\"settings.enableXmlUnescaping\"));\n private final JFormattedTextField inlayFontSizeDeltaText;\n private final JFormattedTextField manualScannerDelay;\n private final JBCheckBox fillProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.fillProblemLabels\"));\n private final JBCheckBox boldProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.boldProblemLabels\"));\n private final JBCheckBox italicProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.italicProblemLabels\"));\n private final JBCheckBox clickableContext = new JBCheckBox(SettingsBundle.message(\"settings.enableClickableContext\"));\n\n private final JBTextField problemFilterList = new JBTextField();\n private final JBTextField fileExtensionBlacklist = new JBTextField();\n\n private final String[] availableListeners = {HighlightProblemListener.NAME, MarkupModelProblemListener.NAME, DocumentMarkupModelScanner.NAME};\n private final JComboBox enabledListener = new ComboBox<>(availableListeners);\n\n private final JBTextField additionalInfoSeverities = new JBTextField();\n private final JBTextField additionalWarningSeverities = new JBTextField();\n private final JBTextField additionalWeakWarningSeverities = new JBTextField();\n private final JBTextField additionalErrorSeverities = new JBTextField();\n\n @Getter\n private final JPanel settingsPanel;\n\n public SettingsComponent() {\n SettingsState settingsState = SettingsState.getInstance();\n\n showErrors.setSelected(settingsState.isShowErrors());\n highlightErrors.setSelected(settingsState.isHighlightErrors());\n showErrorsInGutter.setSelected(settingsState.isShowErrorsInGutter());\n errorTextColor.setSelectedColor(settingsState.getErrorTextColor());\n errorLabelBackgroundColor.setSelectedColor(settingsState.getErrorBackgroundColor());\n errorHighlightColor.setSelectedColor(settingsState.getErrorHighlightColor());\n\n showWarnings.setSelected(settingsState.isShowWarnings());\n highlightWarnings.setSelected(settingsState.isHighlightWarnings());\n showWarningsInGutter.setSelected(settingsState.isShowWarningsInGutter());\n warningTextColor.setSelectedColor(settingsState.getWarningTextColor());\n warningLabelBackgroundColor.setSelectedColor(settingsState.getWarningBackgroundColor());\n warningHighlightColor.setSelectedColor(settingsState.getWarningHighlightColor());\n\n showWeakWarnings.setSelected(settingsState.isShowWeakWarnings());\n highlightWeakWarnings.setSelected(settingsState.isHighlightWeakWarnings());\n showWeakWarningsInGutter.setSelected(settingsState.isShowWeakWarningsInGutter());\n weakWarningTextColor.setSelectedColor(settingsState.getWeakWarningTextColor());\n weakWarningLabelBackgroundColor.setSelectedColor(settingsState.getWeakWarningBackgroundColor());\n weakWarningHighlightColor.setSelectedColor(settingsState.getWeakWarningHighlightColor());\n\n showInfos.setSelected(settingsState.isShowInfos());\n highlightInfo.setSelected(settingsState.isHighlightInfos());\n showInfosInGutter.setSelected(settingsState.isShowInfosInGutter());\n infoTextColor.setSelectedColor(settingsState.getInfoTextColor());\n infoLabelBackgroundColor.setSelectedColor(settingsState.getInfoBackgroundColor());\n infoHighlightColor.setSelectedColor(settingsState.getInfoHighlightColor());\n\n forceErrorsInSameLine.setSelected(settingsState.isForceProblemsInSameLine());\n drawBoxesAroundProblemLabels.setSelected(settingsState.isDrawBoxesAroundErrorLabels());\n roundedCornerBoxes.setSelected(settingsState.isRoundedCornerBoxes());\n\n useEditorFont.setSelected(settingsState.isUseEditorFont());\n\n NumberFormat intFormat = NumberFormat.getIntegerInstance();\n intFormat.setGroupingUsed(false);\n NumberFormatter numberFormatter = new NumberFormatter(intFormat);\n numberFormatter.setValueClass(Integer.class); // Optional, ensures we always get a int value\n\n inlayFontSizeDeltaText = new JFormattedTextField(numberFormatter);\n inlayFontSizeDeltaText.setText(Integer.toString(settingsState.getInlayFontSizeDelta()));\n\n manualScannerDelay = new JFormattedTextField(numberFormatter);\n manualScannerDelay.setText(Integer.toString(settingsState.getManualScannerDelay()));\n\n fillProblemLabels.setSelected(settingsState.isFillProblemLabels());\n boldProblemLabels.setSelected(settingsState.isBoldProblemLabels());\n italicProblemLabels.setSelected(settingsState.isItalicProblemLabels());\n clickableContext.setSelected(settingsState.isClickableContext());\n\n additionalInfoSeverities.setText(settingsState.getAdditionalInfoSeveritiesAsString());\n additionalWeakWarningSeverities.setText(settingsState.getAdditionalWeakWarningSeveritiesAsString());\n additionalWarningSeverities.setText(settingsState.getAdditionalWarningSeveritiesAsString());\n additionalErrorSeverities.setText(settingsState.getAdditionalErrorSeveritiesAsString());\n\n problemFilterList.setText(settingsState.getProblemFilterList());\n fileExtensionBlacklist.setText(settingsState.getFileExtensionBlacklist());\n enabledListener.setSelectedItem(Optional.of(settingsState.getEnabledListener()));\n\n Dimension enabledListenerDimension = enabledListener.getPreferredSize();\n enabledListenerDimension.width += 100;\n enabledListener.setPreferredSize(enabledListenerDimension);\n\n settingsPanel = FormBuilder.createFormBuilder()\n .addComponent(new JBLabel(SettingsBundle.message(\"settings.submenu.label\")))\n .addComponent(drawBoxesAroundProblemLabels, 0)\n .addComponent(roundedCornerBoxes, 0)\n .addComponent(fillProblemLabels, 0)\n .addComponent(boldProblemLabels, 0)\n .addComponent(italicProblemLabels, 0)\n .addComponent(clickableContext, 0)\n .addSeparator()\n .addComponent(new JBLabel(SettingsBundle.message(\"settings.submenu.general\")))\n .addLabeledComponent(new JBLabel(SettingsBundle.message(\"settings.activeProblemListener\")), enabledListener)\n .addTooltip(SettingsBundle.message(\"settings.markupModelListenerDescription\"))\n .addTooltip(SettingsBundle.message(\"settings.highlightProblemListenerDescription\"))\n .addTooltip(SettingsBundle.message(\"settings.manualScannerDescription\"))\n .addTooltip(SettingsBundle.message(\"settings.manualScannerDescriptionSupplement\"))\n .addLabeledComponent(new JBLabel(SettingsBundle.message(\"settings.manualScannerDelayLabel\")), manualScannerDelay)\n .addTooltip(SettingsBundle.message(\"settings.manualScannerDelayTooltip\"))\n .addComponent(forceErrorsInSameLine, 0)\n .addComponent(useEditorFont, 0)\n .addComponent(showOnlyHighestSeverityPerLine, 0)\n .addComponent(enableHtmlStripping, 0)\n .addComponent(enableXmlUnescaping, 0)\n .addLabeledComponent(new JBLabel(SettingsBundle.message(\"settings.inlaySizeDelta\")), inlayFontSizeDeltaText)\n .addTooltip(SettingsBundle.message(\"settings.inlaySizeDeltaTooltip\"))\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.problemFilterListLabel\")), problemFilterList)\n .addTooltip(SettingsBundle.message(\"settings.problemFilterListTooltip\"))\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.fileExtensionBlacklistLabel\")), fileExtensionBlacklist)\n .addTooltip(SettingsBundle.message(\"settings.fileExtensionBlaclistTooltip\"))\n .addSeparator()\n .addComponent(new JBLabel(SettingsBundle.message(\"settings.submenu.colors\")))\n .addComponent(showErrors)\n .addComponent(highlightErrors)\n .addComponent(showErrorsInGutter)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.errorTextColor\")), errorTextColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.errorLabelBorderColor\")), errorLabelBackgroundColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.errorLineHighlightColor\")), errorHighlightColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.additionalSeverities\")), additionalErrorSeverities)\n .addTooltip(SettingsBundle.message(\"settings.additionalSeveritiesErrorDesc\"))\n .addSeparator()\n .addComponent(showWarnings)\n .addComponent(highlightWarnings)\n .addComponent(showWarningsInGutter)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.warningTextColor\")), warningTextColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.warningLabelBorderColor\")), warningLabelBackgroundColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.warningLineHighlightColor\")), warningHighlightColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.additionalSeverities\")), additionalWarningSeverities)\n .addTooltip(SettingsBundle.message(\"settings.additionalSeveritiesWarningDesc\"))\n .addSeparator()\n .addComponent(showWeakWarnings)\n .addComponent(highlightWeakWarnings)\n .addComponent(showWeakWarningsInGutter)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.weakWarningTextColor\")), weakWarningTextColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.weakWarningLabelBorderColor\")), weakWarningLabelBackgroundColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.weakWarningLineHighlightColor\")), weakWarningHighlightColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.additionalSeverities\")), additionalWeakWarningSeverities)\n .addTooltip(SettingsBundle.message(\"settings.additionalSeveritiesWeakWarningDesc\"))\n .addSeparator()\n .addComponent(showInfos)\n .addComponent(highlightInfo)\n .addComponent(showInfosInGutter)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.infoTextColor\")), infoTextColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.infoLabelBorderColor\")), infoLabelBackgroundColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.infoLineHighlightColor\")), infoHighlightColor)\n .addLabeledComponent(new JLabel(SettingsBundle.message(\"settings.additionalSeverities\")), additionalInfoSeverities)\n .addTooltip(SettingsBundle.message(\"settings.additionalSeveritiesInfoDesc\"))\n .addComponentFillVertically(new JPanel(), 0)\n .getPanel();\n }\n\n public JComponent getPreferredFocusedComponent() {\n return settingsPanel;\n }\n\n public boolean isForceErrorsInSameLine() {\n return forceErrorsInSameLine.isSelected();\n }\n\n public void setForceErrorsInSameLine(final boolean isSelected) {\n forceErrorsInSameLine.setSelected(isSelected);\n }\n\n public boolean getDrawBoxesAroundProblemLabels() {\n return drawBoxesAroundProblemLabels.isSelected();\n }\n\n public void setDrawBoxesAroundProblemLabels(final boolean isSelected) {\n drawBoxesAroundProblemLabels.setSelected(isSelected);\n }\n\n public boolean isRoundedCornerBoxes() {\n return roundedCornerBoxes.isSelected();\n }\n\n public void setRoundedCornerBoxes(boolean isSelected) {\n roundedCornerBoxes.setSelected(isSelected);\n }\n\n public boolean isUseEditorFont() {\n return useEditorFont.isSelected();\n }\n\n public boolean isShowOnlyHighestSeverityPerLine() {\n return showOnlyHighestSeverityPerLine.isSelected();\n }\n\n public boolean isEnableHtmlStripping() {\n return enableHtmlStripping.isSelected();\n }\n\n public boolean isEnableXmlUnescaping() {\n return enableXmlUnescaping.isSelected();\n }\n\n public int getInlayFontSizeDelta() {\n int val = 0;\n // Convert the String\n try {\n val = Integer.parseInt(inlayFontSizeDeltaText.getText());\n } catch (NumberFormatException ignored) {\n }\n\n if (val < 0)\n val = 0;\n\n return val;\n }\n\n public void setInlayFontSizeDelta(int val) {\n inlayFontSizeDeltaText.setText(String.valueOf(Math.max(0, val)));\n }\n\n public void setUseEditorFont(boolean isSelected) {\n useEditorFont.setSelected(isSelected);\n }\n\n public void setShowOnlyHighestSeverityPerLine(boolean isSelected) {\n showOnlyHighestSeverityPerLine.setSelected(isSelected);\n }\n\n public void setEnableHtmlStripping(boolean isSelected) {\n enableHtmlStripping.setSelected(isSelected);\n }\n\n public void setEnableXmlUnescaping(boolean isSelected) {\n enableXmlUnescaping.setSelected(isSelected);\n }\n\n public boolean isFillProblemLabels() {\n return fillProblemLabels.isSelected();\n }\n\n public void setFillProblemLabels(boolean isSelected) {\n fillProblemLabels.setSelected(isSelected);\n }\n\n public boolean isBoldProblemLabels() {\n return boldProblemLabels.isSelected();\n }\n\n public void setBoldProblemLabels(boolean isSelected) {\n boldProblemLabels.setSelected(isSelected);\n }\n\n public boolean isItalicProblemLabels() {\n return italicProblemLabels.isSelected();\n }\n\n public void setItalicProblemLabels(boolean isSelected) {\n italicProblemLabels.setSelected(isSelected);\n }\n\n public boolean isClickableContext() {\n return clickableContext.isSelected();\n }\n\n public void setClickableContext(boolean isSelected) {\n clickableContext.setSelected(isSelected);\n }\n\n public boolean isShowErrors() {\n return showErrors.isSelected();\n }\n\n public void setShowErrors(final boolean isSelected) {\n showErrors.setSelected(isSelected);\n }\n\n public boolean isHighlightErrors() {\n return highlightErrors.isSelected();\n }\n\n public void setHighlightErrors(boolean isSelected) {\n highlightErrors.setSelected(isSelected);\n }\n\n public boolean isShowErrorsInGutter() {\n return showErrorsInGutter.isSelected();\n }\n\n public void setShowErrorsInGutter(boolean isSelected) {\n showErrorsInGutter.setSelected(isSelected);\n }\n\n public boolean isShowWarnings() {\n return showWarnings.isSelected();\n }\n\n public void setShowWarnings(final boolean isSelected) {\n showWarnings.setSelected(isSelected);\n }\n\n public boolean isHighlightWarnings() {\n return highlightWarnings.isSelected();\n }\n\n public void setHighlightWarnings(final boolean isSelected) {\n highlightWarnings.setSelected(isSelected);\n }\n\n public boolean isShowWarningsInGutter() {\n return showWarningsInGutter.isSelected();\n }\n\n public void setShowWarningsInGutter(final boolean isSelected) {\n showWarningsInGutter.setSelected(isSelected);\n }\n\n public boolean isShowWeakWarnings() {\n return showWeakWarnings.isSelected();\n }\n\n public void setShowWeakWarnings(final boolean isSelected) {\n showWeakWarnings.setSelected(isSelected);\n }\n\n public boolean isHighlightWeakWarnings() {\n return highlightWeakWarnings.isSelected();\n }\n\n public void setHighlightWeakWarnings(final boolean isSelected) {\n highlightWeakWarnings.setSelected(isSelected);\n }\n\n public boolean isShowWeakWarningsInGutter() {\n return showWeakWarningsInGutter.isSelected();\n }\n\n public void setShowWeakWarningsInGutter(boolean isSelected) {\n showWeakWarningsInGutter.setSelected(isSelected);\n }\n\n public boolean isShowInfos() {\n return showInfos.isSelected();\n }\n\n public void setShowInfos(final boolean isSelected) {\n showInfos.setSelected(isSelected);\n }\n\n public boolean isHighlightInfo() {\n return highlightInfo.isSelected();\n }\n\n public void setHighlightInfo(final boolean isSelected) {\n highlightInfo.setSelected(isSelected);\n }\n\n public boolean isShowInfosInGutter() {\n return showInfosInGutter.isSelected();\n }\n\n public void setShowInfosInGutter(boolean isSelected) {\n showInfosInGutter.setSelected(isSelected);\n }\n\n public Color getErrorTextColor() {\n return errorTextColor.getSelectedColor();\n }\n\n public void setErrorTextColor(final Color color) {\n errorTextColor.setSelectedColor(color);\n }\n\n public Color getErrorLabelBackgroundColor() {\n return errorLabelBackgroundColor.getSelectedColor();\n }\n\n public void setErrorLabelBackgroundColor(final Color color) {\n errorLabelBackgroundColor.setSelectedColor(color);\n }\n\n public Color getWarningTextColor() {\n return warningTextColor.getSelectedColor();\n }\n\n public void setWarningTextColor(final Color color) {\n warningTextColor.setSelectedColor(color);\n }\n\n public Color getWarningLabelBackgroundColor() {\n return warningLabelBackgroundColor.getSelectedColor();\n }\n\n public void setWarningLabelBackgroundColor(final Color color) {\n warningLabelBackgroundColor.setSelectedColor(color);\n }\n\n public Color getWeakWarningTextColor() {\n return weakWarningTextColor.getSelectedColor();\n }\n\n public void setWeakWarningTextColor(final Color color) {\n weakWarningTextColor.setSelectedColor(color);\n }\n\n public Color getWeakWarningLabelBackgroundColor() {\n return weakWarningLabelBackgroundColor.getSelectedColor();\n }\n\n public void setWeakWarningLabelBackgroundColor(final Color color) {\n weakWarningLabelBackgroundColor.setSelectedColor(color);\n }\n\n public Color getInfoTextColor() {\n return infoTextColor.getSelectedColor();\n }\n\n public void setInfoTextColor(final Color color) {\n infoTextColor.setSelectedColor(color);\n }\n\n public Color getInfoLabelBackgroundColor() {\n return infoLabelBackgroundColor.getSelectedColor();\n }\n\n public void setInfoLabelBackgroundColor(final Color color) {\n infoLabelBackgroundColor.setSelectedColor(color);\n }\n\n public Color getErrorHighlightColor() {\n return errorHighlightColor.getSelectedColor();\n }\n\n public void setErrorHighlightColor(final Color color) {\n errorHighlightColor.setSelectedColor(color);\n }\n\n public Color getWarningHighlightColor() {\n return warningHighlightColor.getSelectedColor();\n }\n\n public void setWarningHighlightColor(final Color color) {\n warningHighlightColor.setSelectedColor(color);\n }\n\n public Color getWeakWarningHighlightColor() {\n return weakWarningHighlightColor.getSelectedColor();\n }\n\n public void setWeakWarningHighlightColor(final Color color) {\n weakWarningHighlightColor.setSelectedColor(color);\n }\n\n public Color getInfoHighlightColor() {\n return infoHighlightColor.getSelectedColor();\n }\n\n public void setInfoHighlightColor(final Color color) {\n infoHighlightColor.setSelectedColor(color);\n }\n\n public String getProblemFilterList() {\n return problemFilterList.getText();\n }\n\n public void setProblemFilterList(final String newText) {\n problemFilterList.setText(newText);\n }\n\n public String getFileExtensionBlacklist() {\n return fileExtensionBlacklist.getText();\n }\n\n public void setFileExtensionBlacklist(final String newText) {\n fileExtensionBlacklist.setText(newText);\n }\n\n public String getAdditionalInfoSeverities() {\n return additionalInfoSeverities.getText();\n }\n\n public List getAdditionalInfoSeveritiesList() {\n return getSeverityIntegerList(additionalInfoSeverities.getText());\n }\n\n public void setAdditionalInfoSeverities(final String newText) {\n additionalInfoSeverities.setText(newText);\n }\n\n public String getAdditionalWarningSeverities() {\n return additionalWarningSeverities.getText();\n }\n\n public List getAdditionalWarningSeveritiesList() {\n return getSeverityIntegerList(additionalWarningSeverities.getText());\n }\n\n public void setAdditionalWarningSeverities(final String newText) {\n additionalWarningSeverities.setText(newText);\n }\n\n public String getAdditionalErrorSeverities() {\n return additionalErrorSeverities.getText();\n }\n\n public List getAdditionalErrorSeveritiesList() {\n return getSeverityIntegerList(additionalErrorSeverities.getText());\n }\n\n public void setAdditionalErrorSeverities(final String newText) {\n additionalErrorSeverities.setText(newText);\n }\n\n public String getAdditionalWeakWarningSeverities() {\n return additionalWeakWarningSeverities.getText();\n }\n\n public List getAdditionalWeakWarningSeveritiesList() {\n return getSeverityIntegerList(additionalWeakWarningSeverities.getText());\n }\n\n public void setAdditionalWeakWarningSeverities(final String newText) {\n additionalWeakWarningSeverities.setText(newText);\n }\n\n public int getEnabledListener() {\n return enabledListener.getSelectedIndex();\n }\n\n public void setEnabledListener(int index) {\n enabledListener.setSelectedIndex(index);\n }\n\n private List getSeverityIntegerList(String text) {\n return Arrays.stream(text.split(\";\"))\n .map(String::trim)\n .filter(s -> !s.isEmpty())\n .filter(s -> {\n try {\n Integer.parseInt(s);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n })\n .map(Integer::parseInt)\n .collect(Collectors.toList());\n }\n\n public int getManualScannerDelay() {\n try {\n return Math.max(Integer.parseInt(manualScannerDelay.getText()), 10);\n } catch (NumberFormatException e) {\n return 100;\n }\n }\n\n public void setManualScannerDelay(int delay) {\n manualScannerDelay.setText(Integer.toString(Math.max(10, delay)));\n }\n}\n", "patch": "--- a/src/main/java/org/overengineer/inlineproblems/settings/SettingsComponent.java\n+++ b/src/main/java/org/overengineer/inlineproblems/settings/SettingsComponent.java\n@@ -68,6 +68,8 @@\n private final JBCheckBox fillProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.fillProblemLabels\"));\n private final JBCheckBox boldProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.boldProblemLabels\"));\n private final JBCheckBox italicProblemLabels = new JBCheckBox(SettingsBundle.message(\"settings.italicProblemLabels\"));\n+ private final JBCheckBox clickableContext = new JBCheckBox(SettingsBundle.message(\"settings.enableClickableContext\"));\n+\n private final JBTextField problemFilterList = new JBTextField();\n private final JBTextField fileExtensionBlacklist = new JBTextField();\n \n@@ -77,7 +79,7 @@\n private final JBTextField additionalInfoSeverities = new JBTextField();\n private final JBTextField additionalWarningSeverities = new JBTextField();\n private final JBTextField additionalWeakWarningSeverities = new JBTextField();\n- private final JBTextField additionalErrorSeverities = new JBTextField();\n+ private final JBTextField additionalErrorSeverities = new JBTextField();\n \n @Getter\n private final JPanel settingsPanel;\n@@ -133,6 +135,7 @@\n fillProblemLabels.setSelected(settingsState.isFillProblemLabels());\n boldProblemLabels.setSelected(settingsState.isBoldProblemLabels());\n italicProblemLabels.setSelected(settingsState.isItalicProblemLabels());\n+ clickableContext.setSelected(settingsState.isClickableContext());\n \n additionalInfoSeverities.setText(settingsState.getAdditionalInfoSeveritiesAsString());\n additionalWeakWarningSeverities.setText(settingsState.getAdditionalWeakWarningSeveritiesAsString());\n@@ -154,6 +157,7 @@\n .addComponent(fillProblemLabels, 0)\n .addComponent(boldProblemLabels, 0)\n .addComponent(italicProblemLabels, 0)\n+ .addComponent(clickableContext, 0)\n .addSeparator()\n .addComponent(new JBLabel(SettingsBundle.message(\"settings.submenu.general\")))\n .addLabeledComponent(new JBLabel(SettingsBundle.message(\"settings.activeProblemListener\")), enabledListener)\n@@ -264,8 +268,8 @@\n // Convert the String\n try {\n val = Integer.parseInt(inlayFontSizeDeltaText.getText());\n+ } catch (NumberFormatException ignored) {\n }\n- catch (NumberFormatException ignored) {}\n \n if (val < 0)\n val = 0;\n@@ -315,6 +319,14 @@\n \n public void setItalicProblemLabels(boolean isSelected) {\n italicProblemLabels.setSelected(isSelected);\n+ }\n+\n+ public boolean isClickableContext() {\n+ return clickableContext.isSelected();\n+ }\n+\n+ public void setClickableContext(boolean isSelected) {\n+ clickableContext.setSelected(isSelected);\n }\n \n public boolean isShowErrors() {\n@@ -600,8 +612,7 @@\n public int getManualScannerDelay() {\n try {\n return Math.max(Integer.parseInt(manualScannerDelay.getText()), 10);\n- }\n- catch (NumberFormatException e) {\n+ } catch (NumberFormatException e) {\n return 100;\n }\n }\n"}, {"path": "src/main/java/org/overengineer/inlineproblems/settings/SettingsConfigurable.java", "additions": 3, "deletions": 0, "changeType": "MODIFIED", "base_content": "package org.overengineer.inlineproblems.settings;\n\nimport com.intellij.openapi.options.Configurable;\nimport com.intellij.openapi.util.NlsContexts;\nimport org.jetbrains.annotations.Nullable;\nimport org.overengineer.inlineproblems.DocumentMarkupModelScanner;\nimport org.overengineer.inlineproblems.ListenerManager;\nimport org.overengineer.inlineproblems.entities.enums.Listener;\n\nimport javax.swing.*;\nimport java.util.Objects;\n\n\npublic class SettingsConfigurable implements Configurable {\n\n private SettingsComponent settingsComponent;\n\n private final ListenerManager listenerManager = ListenerManager.getInstance();\n\n SettingsConfigurable() {}\n\n @Override\n @NlsContexts.ConfigurableName\n public String getDisplayName() {\n return \"InlineProblems\";\n }\n\n @Override\n public JComponent getPreferredFocusedComponent() {\n return settingsComponent.getPreferredFocusedComponent();\n }\n\n @Override\n @Nullable\n public JComponent createComponent() {\n settingsComponent = new SettingsComponent();\n return settingsComponent.getSettingsPanel();\n }\n\n @Override\n public boolean isModified() {\n SettingsState state = SettingsState.getInstance();\n\n boolean oldStateEqualsNewState = state.isForceProblemsInSameLine() == settingsComponent.isForceErrorsInSameLine() &&\n state.isDrawBoxesAroundErrorLabels() == settingsComponent.getDrawBoxesAroundProblemLabels() &&\n state.isRoundedCornerBoxes() == settingsComponent.isRoundedCornerBoxes() &&\n state.isUseEditorFont() == settingsComponent.isUseEditorFont() &&\n state.isShowOnlyHighestSeverityPerLine() == settingsComponent.isShowOnlyHighestSeverityPerLine() &&\n state.isEnableHtmlStripping() == settingsComponent.isEnableHtmlStripping() &&\n state.isEnableXmlUnescaping() == settingsComponent.isEnableXmlUnescaping() &&\n state.getInlayFontSizeDelta() == settingsComponent.getInlayFontSizeDelta() &&\n state.isFillProblemLabels() == settingsComponent.isFillProblemLabels() &&\n state.isBoldProblemLabels() == settingsComponent.isBoldProblemLabels() &&\n state.isItalicProblemLabels() == settingsComponent.isItalicProblemLabels() &&\n\n state.getErrorTextColor().equals(settingsComponent.getErrorTextColor()) &&\n state.getErrorBackgroundColor().equals(settingsComponent.getErrorLabelBackgroundColor()) &&\n state.getErrorHighlightColor().equals(settingsComponent.getErrorHighlightColor()) &&\n state.isShowErrors() == settingsComponent.isShowErrors() &&\n state.isHighlightErrors() == settingsComponent.isHighlightErrors() &&\n state.isShowErrorsInGutter() == settingsComponent.isShowErrorsInGutter() &&\n\n state.getWarningTextColor().equals(settingsComponent.getWarningTextColor()) &&\n state.getWarningBackgroundColor().equals(settingsComponent.getWarningLabelBackgroundColor()) &&\n state.getWarningHighlightColor().equals(settingsComponent.getWarningHighlightColor()) &&\n state.isShowWarnings() == settingsComponent.isShowWarnings() &&\n state.isHighlightWarnings() == settingsComponent.isHighlightWarnings() &&\n state.isShowWarningsInGutter() == settingsComponent.isShowWarningsInGutter() &&\n\n state.getWeakWarningTextColor().equals(settingsComponent.getWeakWarningTextColor()) &&\n state.getWeakWarningBackgroundColor().equals(settingsComponent.getWeakWarningLabelBackgroundColor()) &&\n state.getWeakWarningHighlightColor().equals(settingsComponent.getWeakWarningHighlightColor()) &&\n state.isShowWeakWarnings() == settingsComponent.isShowWeakWarnings() &&\n state.isHighlightWeakWarnings() == settingsComponent.isHighlightWeakWarnings() &&\n state.isShowWeakWarningsInGutter() == settingsComponent.isShowWeakWarningsInGutter() &&\n\n state.getInfoTextColor().equals(settingsComponent.getInfoTextColor()) &&\n state.getInfoBackgroundColor().equals(settingsComponent.getInfoLabelBackgroundColor()) &&\n state.getInfoHighlightColor().equals(settingsComponent.getInfoHighlightColor()) &&\n state.isShowInfos() == settingsComponent.isShowInfos() &&\n state.isHighlightInfos() == settingsComponent.isHighlightInfo() &&\n state.isShowInfosInGutter() == settingsComponent.isShowInfosInGutter() &&\n\n state.getEnabledListener() == settingsComponent.getEnabledListener() &&\n state.getManualScannerDelay() == settingsComponent.getManualScannerDelay() &&\n\n state.getProblemFilterList().equals(settingsComponent.getProblemFilterList()) &&\n state.getFileExtensionBlacklist().equals(settingsComponent.getFileExtensionBlacklist()) &&\n\n state.getAdditionalInfoSeveritiesAsString().equals(settingsComponent.getAdditionalInfoSeverities()) &&\n state.getAdditionalWarningSeveritiesAsString().equals(settingsComponent.getAdditionalWarningSeverities()) &&\n state.getAdditionalWeakWarningSeveritiesAsString().equals(settingsComponent.getAdditionalWeakWarningSeverities()) &&\n state.getAdditionalErrorSeveritiesAsString().equals(settingsComponent.getAdditionalErrorSeverities()\n );\n\n return !oldStateEqualsNewState;\n }\n\n @Override\n public void apply() {\n SettingsState state = SettingsState.getInstance();\n\n boolean listenerChanged = state.getEnabledListener() != settingsComponent.getEnabledListener();\n boolean fileExtensionBlacklistChanged = !Objects.equals(state.getFileExtensionBlacklist(), settingsComponent.getFileExtensionBlacklist());\n boolean manualScannerDelayChanged = state.getManualScannerDelay() != settingsComponent.getManualScannerDelay();\n\n state.setShowErrors(settingsComponent.isShowErrors());\n state.setHighlightErrors(settingsComponent.isHighlightErrors());\n state.setShowErrorsInGutter(settingsComponent.isShowErrorsInGutter());\n state.setErrorTextColor(settingsComponent.getErrorTextColor());\n state.setErrorBackgroundColor(settingsComponent.getErrorLabelBackgroundColor());\n state.setErrorHighlightColor(settingsComponent.getErrorHighlightColor());\n\n state.setShowWarnings(settingsComponent.isShowWarnings());\n state.setHighlightWarnings(settingsComponent.isHighlightWarnings());\n state.setShowWarningsInGutter(settingsComponent.isShowWarningsInGutter());\n state.setWarningTextColor(settingsComponent.getWarningTextColor());\n state.setWarningBackgroundColor(settingsComponent.getWarningLabelBackgroundColor());\n state.setWarningHighlightColor(settingsComponent.getWarningHighlightColor());\n\n state.setShowWeakWarnings(settingsComponent.isShowWeakWarnings());\n state.setHighlightWeakWarnings(settingsComponent.isHighlightWeakWarnings());\n state.setShowWeakWarningsInGutter(settingsComponent.isShowWeakWarningsInGutter());\n state.setWeakWarningTextColor(settingsComponent.getWeakWarningTextColor());\n state.setWeakWarningBackgroundColor(settingsComponent.getWeakWarningLabelBackgroundColor());\n state.setWeakWarningHighlightColor(settingsComponent.getWeakWarningHighlightColor());\n\n state.setShowInfos(settingsComponent.isShowInfos());\n state.setHighlightInfos(settingsComponent.isHighlightInfo());\n state.setShowInfosInGutter(settingsComponent.isShowInfosInGutter());\n state.setInfoTextColor(settingsComponent.getInfoTextColor());\n state.setInfoBackgroundColor(settingsComponent.getInfoLabelBackgroundColor());\n state.setInfoHighlightColor(settingsComponent.getInfoHighlightColor());\n\n state.setForceProblemsInSameLine(settingsComponent.isForceErrorsInSameLine());\n state.setDrawBoxesAroundErrorLabels(settingsComponent.getDrawBoxesAroundProblemLabels());\n state.setRoundedCornerBoxes(settingsComponent.isRoundedCornerBoxes());\n state.setUseEditorFont(settingsComponent.isUseEditorFont());\n state.setShowOnlyHighestSeverityPerLine(settingsComponent.isShowOnlyHighestSeverityPerLine());\n state.setEnableHtmlStripping(settingsComponent.isEnableHtmlStripping());\n state.setEnableXmlUnescaping(settingsComponent.isEnableXmlUnescaping());\n state.setInlayFontSizeDelta(settingsComponent.getInlayFontSizeDelta());\n state.setFillProblemLabels(settingsComponent.isFillProblemLabels());\n state.setBoldProblemLabels(settingsComponent.isBoldProblemLabels());\n state.setItalicProblemLabels(settingsComponent.isItalicProblemLabels());\n\n state.setEnabledListener(settingsComponent.getEnabledListener());\n state.setManualScannerDelay(settingsComponent.getManualScannerDelay());\n state.setProblemFilterList(settingsComponent.getProblemFilterList());\n state.setFileExtensionBlacklist(settingsComponent.getFileExtensionBlacklist());\n\n state.setAdditionalInfoSeverities(settingsComponent.getAdditionalInfoSeveritiesList());\n state.setAdditionalWarningSeverities(settingsComponent.getAdditionalWarningSeveritiesList());\n state.setAdditionalWeakWarningSeverities(settingsComponent.getAdditionalWeakWarningSeveritiesList());\n state.setAdditionalErrorSeverities(settingsComponent.getAdditionalErrorSeveritiesList());\n\n if (manualScannerDelayChanged && state.getEnabledListener() == Listener.MANUAL_SCANNING) {\n DocumentMarkupModelScanner.getInstance().setDelayMilliseconds(state.getManualScannerDelay());\n }\n\n listenerManager.resetAndRescan();\n\n // When the blacklist changes we need to re-apply all MarkupModelProblemListeners\n if (fileExtensionBlacklistChanged && state.getEnabledListener() == Listener.MARKUP_MODEL_LISTENER) {\n listenerManager.resetMarkupModelProblemListeners();\n }\n\n if (listenerChanged) {\n listenerManager.changeListener();\n }\n }\n\n @Override\n public void reset() {\n SettingsState state = SettingsState.getInstance();\n\n settingsComponent.setShowErrors(state.isShowErrors());\n settingsComponent.setHighlightErrors(state.isHighlightErrors());\n settingsComponent.setShowErrorsInGutter(state.isShowErrorsInGutter());\n settingsComponent.setErrorTextColor(state.getErrorTextColor());\n settingsComponent.setErrorLabelBackgroundColor(state.getErrorBackgroundColor());\n settingsComponent.setErrorHighlightColor(state.getErrorHighlightColor());\n\n settingsComponent.setShowWarnings(state.isShowWarnings());\n settingsComponent.setHighlightWarnings(state.isHighlightWarnings());\n settingsComponent.setShowWarningsInGutter(state.isShowWarningsInGutter());\n settingsComponent.setWarningTextColor(state.getWarningTextColor());\n settingsComponent.setWarningLabelBackgroundColor(state.getWarningBackgroundColor());\n settingsComponent.setWarningHighlightColor(state.getWarningHighlightColor());\n\n settingsComponent.setShowWeakWarnings(state.isShowWeakWarnings());\n settingsComponent.setHighlightWeakWarnings(state.isHighlightWeakWarnings());\n settingsComponent.setShowWeakWarningsInGutter(state.isShowWeakWarningsInGutter());\n settingsComponent.setWeakWarningTextColor(state.getWeakWarningTextColor());\n settingsComponent.setWeakWarningLabelBackgroundColor(state.getWeakWarningBackgroundColor());\n settingsComponent.setWeakWarningHighlightColor(state.getWeakWarningHighlightColor());\n\n settingsComponent.setShowInfos(state.isShowInfos());\n settingsComponent.setHighlightInfo(state.isHighlightInfos());\n settingsComponent.setShowInfosInGutter(state.isShowInfosInGutter());\n settingsComponent.setInfoTextColor(state.getInfoTextColor());\n settingsComponent.setInfoLabelBackgroundColor(state.getInfoBackgroundColor());\n settingsComponent.setInfoHighlightColor(state.getInfoHighlightColor());\n\n settingsComponent.setForceErrorsInSameLine(state.isForceProblemsInSameLine());\n settingsComponent.setDrawBoxesAroundProblemLabels(state.isDrawBoxesAroundErrorLabels());\n settingsComponent.setRoundedCornerBoxes(state.isRoundedCornerBoxes());\n settingsComponent.setUseEditorFont(state.isUseEditorFont());\n settingsComponent.setShowOnlyHighestSeverityPerLine(state.isShowOnlyHighestSeverityPerLine());\n settingsComponent.setEnableHtmlStripping(state.isEnableHtmlStripping());\n settingsComponent.setEnableXmlUnescaping(state.isEnableXmlUnescaping());\n settingsComponent.setInlayFontSizeDelta(state.getInlayFontSizeDelta());\n settingsComponent.setFillProblemLabels(state.isFillProblemLabels());\n settingsComponent.setBoldProblemLabels(state.isBoldProblemLabels());\n settingsComponent.setItalicProblemLabels(state.isItalicProblemLabels());\n\n settingsComponent.setEnabledListener(state.getEnabledListener());\n settingsComponent.setManualScannerDelay(state.getManualScannerDelay());\n settingsComponent.setProblemFilterList(state.getProblemFilterList());\n settingsComponent.setFileExtensionBlacklist(state.getFileExtensionBlacklist());\n\n settingsComponent.setAdditionalInfoSeverities(state.getAdditionalInfoSeveritiesAsString());\n settingsComponent.setAdditionalWarningSeverities(state.getAdditionalWarningSeveritiesAsString());\n settingsComponent.setAdditionalWeakWarningSeverities(state.getAdditionalWeakWarningSeveritiesAsString());\n settingsComponent.setAdditionalErrorSeverities(state.getAdditionalErrorSeveritiesAsString());\n }\n\n @Override\n public void disposeUIResources() {\n settingsComponent = null;\n }\n}\n", "head_content": "package org.overengineer.inlineproblems.settings;\n\nimport com.intellij.openapi.options.Configurable;\nimport com.intellij.openapi.util.NlsContexts;\nimport org.jetbrains.annotations.Nullable;\nimport org.overengineer.inlineproblems.DocumentMarkupModelScanner;\nimport org.overengineer.inlineproblems.ListenerManager;\nimport org.overengineer.inlineproblems.entities.enums.Listener;\n\nimport javax.swing.*;\nimport java.util.Objects;\n\n\npublic class SettingsConfigurable implements Configurable {\n\n private SettingsComponent settingsComponent;\n\n private final ListenerManager listenerManager = ListenerManager.getInstance();\n\n SettingsConfigurable() {}\n\n @Override\n @NlsContexts.ConfigurableName\n public String getDisplayName() {\n return \"InlineProblems\";\n }\n\n @Override\n public JComponent getPreferredFocusedComponent() {\n return settingsComponent.getPreferredFocusedComponent();\n }\n\n @Override\n @Nullable\n public JComponent createComponent() {\n settingsComponent = new SettingsComponent();\n return settingsComponent.getSettingsPanel();\n }\n\n @Override\n public boolean isModified() {\n SettingsState state = SettingsState.getInstance();\n\n boolean oldStateEqualsNewState = state.isForceProblemsInSameLine() == settingsComponent.isForceErrorsInSameLine() &&\n state.isDrawBoxesAroundErrorLabels() == settingsComponent.getDrawBoxesAroundProblemLabels() &&\n state.isRoundedCornerBoxes() == settingsComponent.isRoundedCornerBoxes() &&\n state.isUseEditorFont() == settingsComponent.isUseEditorFont() &&\n state.isShowOnlyHighestSeverityPerLine() == settingsComponent.isShowOnlyHighestSeverityPerLine() &&\n state.isEnableHtmlStripping() == settingsComponent.isEnableHtmlStripping() &&\n state.isEnableXmlUnescaping() == settingsComponent.isEnableXmlUnescaping() &&\n state.getInlayFontSizeDelta() == settingsComponent.getInlayFontSizeDelta() &&\n state.isFillProblemLabels() == settingsComponent.isFillProblemLabels() &&\n state.isBoldProblemLabels() == settingsComponent.isBoldProblemLabels() &&\n state.isItalicProblemLabels() == settingsComponent.isItalicProblemLabels() &&\n state.isClickableContext() == settingsComponent.isClickableContext() &&\n\n state.getErrorTextColor().equals(settingsComponent.getErrorTextColor()) &&\n state.getErrorBackgroundColor().equals(settingsComponent.getErrorLabelBackgroundColor()) &&\n state.getErrorHighlightColor().equals(settingsComponent.getErrorHighlightColor()) &&\n state.isShowErrors() == settingsComponent.isShowErrors() &&\n state.isHighlightErrors() == settingsComponent.isHighlightErrors() &&\n state.isShowErrorsInGutter() == settingsComponent.isShowErrorsInGutter() &&\n\n state.getWarningTextColor().equals(settingsComponent.getWarningTextColor()) &&\n state.getWarningBackgroundColor().equals(settingsComponent.getWarningLabelBackgroundColor()) &&\n state.getWarningHighlightColor().equals(settingsComponent.getWarningHighlightColor()) &&\n state.isShowWarnings() == settingsComponent.isShowWarnings() &&\n state.isHighlightWarnings() == settingsComponent.isHighlightWarnings() &&\n state.isShowWarningsInGutter() == settingsComponent.isShowWarningsInGutter() &&\n\n state.getWeakWarningTextColor().equals(settingsComponent.getWeakWarningTextColor()) &&\n state.getWeakWarningBackgroundColor().equals(settingsComponent.getWeakWarningLabelBackgroundColor()) &&\n state.getWeakWarningHighlightColor().equals(settingsComponent.getWeakWarningHighlightColor()) &&\n state.isShowWeakWarnings() == settingsComponent.isShowWeakWarnings() &&\n state.isHighlightWeakWarnings() == settingsComponent.isHighlightWeakWarnings() &&\n state.isShowWeakWarningsInGutter() == settingsComponent.isShowWeakWarningsInGutter() &&\n\n state.getInfoTextColor().equals(settingsComponent.getInfoTextColor()) &&\n state.getInfoBackgroundColor().equals(settingsComponent.getInfoLabelBackgroundColor()) &&\n state.getInfoHighlightColor().equals(settingsComponent.getInfoHighlightColor()) &&\n state.isShowInfos() == settingsComponent.isShowInfos() &&\n state.isHighlightInfos() == settingsComponent.isHighlightInfo() &&\n state.isShowInfosInGutter() == settingsComponent.isShowInfosInGutter() &&\n\n state.getEnabledListener() == settingsComponent.getEnabledListener() &&\n state.getManualScannerDelay() == settingsComponent.getManualScannerDelay() &&\n\n state.getProblemFilterList().equals(settingsComponent.getProblemFilterList()) &&\n state.getFileExtensionBlacklist().equals(settingsComponent.getFileExtensionBlacklist()) &&\n\n state.getAdditionalInfoSeveritiesAsString().equals(settingsComponent.getAdditionalInfoSeverities()) &&\n state.getAdditionalWarningSeveritiesAsString().equals(settingsComponent.getAdditionalWarningSeverities()) &&\n state.getAdditionalWeakWarningSeveritiesAsString().equals(settingsComponent.getAdditionalWeakWarningSeverities()) &&\n state.getAdditionalErrorSeveritiesAsString().equals(settingsComponent.getAdditionalErrorSeverities()\n );\n\n return !oldStateEqualsNewState;\n }\n\n @Override\n public void apply() {\n SettingsState state = SettingsState.getInstance();\n\n boolean listenerChanged = state.getEnabledListener() != settingsComponent.getEnabledListener();\n boolean fileExtensionBlacklistChanged = !Objects.equals(state.getFileExtensionBlacklist(), settingsComponent.getFileExtensionBlacklist());\n boolean manualScannerDelayChanged = state.getManualScannerDelay() != settingsComponent.getManualScannerDelay();\n\n state.setShowErrors(settingsComponent.isShowErrors());\n state.setHighlightErrors(settingsComponent.isHighlightErrors());\n state.setShowErrorsInGutter(settingsComponent.isShowErrorsInGutter());\n state.setErrorTextColor(settingsComponent.getErrorTextColor());\n state.setErrorBackgroundColor(settingsComponent.getErrorLabelBackgroundColor());\n state.setErrorHighlightColor(settingsComponent.getErrorHighlightColor());\n\n state.setShowWarnings(settingsComponent.isShowWarnings());\n state.setHighlightWarnings(settingsComponent.isHighlightWarnings());\n state.setShowWarningsInGutter(settingsComponent.isShowWarningsInGutter());\n state.setWarningTextColor(settingsComponent.getWarningTextColor());\n state.setWarningBackgroundColor(settingsComponent.getWarningLabelBackgroundColor());\n state.setWarningHighlightColor(settingsComponent.getWarningHighlightColor());\n\n state.setShowWeakWarnings(settingsComponent.isShowWeakWarnings());\n state.setHighlightWeakWarnings(settingsComponent.isHighlightWeakWarnings());\n state.setShowWeakWarningsInGutter(settingsComponent.isShowWeakWarningsInGutter());\n state.setWeakWarningTextColor(settingsComponent.getWeakWarningTextColor());\n state.setWeakWarningBackgroundColor(settingsComponent.getWeakWarningLabelBackgroundColor());\n state.setWeakWarningHighlightColor(settingsComponent.getWeakWarningHighlightColor());\n\n state.setShowInfos(settingsComponent.isShowInfos());\n state.setHighlightInfos(settingsComponent.isHighlightInfo());\n state.setShowInfosInGutter(settingsComponent.isShowInfosInGutter());\n state.setInfoTextColor(settingsComponent.getInfoTextColor());\n state.setInfoBackgroundColor(settingsComponent.getInfoLabelBackgroundColor());\n state.setInfoHighlightColor(settingsComponent.getInfoHighlightColor());\n\n state.setForceProblemsInSameLine(settingsComponent.isForceErrorsInSameLine());\n state.setDrawBoxesAroundErrorLabels(settingsComponent.getDrawBoxesAroundProblemLabels());\n state.setRoundedCornerBoxes(settingsComponent.isRoundedCornerBoxes());\n state.setUseEditorFont(settingsComponent.isUseEditorFont());\n state.setShowOnlyHighestSeverityPerLine(settingsComponent.isShowOnlyHighestSeverityPerLine());\n state.setEnableHtmlStripping(settingsComponent.isEnableHtmlStripping());\n state.setEnableXmlUnescaping(settingsComponent.isEnableXmlUnescaping());\n state.setInlayFontSizeDelta(settingsComponent.getInlayFontSizeDelta());\n state.setFillProblemLabels(settingsComponent.isFillProblemLabels());\n state.setBoldProblemLabels(settingsComponent.isBoldProblemLabels());\n state.setItalicProblemLabels(settingsComponent.isItalicProblemLabels());\n state.setClickableContext(settingsComponent.isClickableContext());\n\n state.setEnabledListener(settingsComponent.getEnabledListener());\n state.setManualScannerDelay(settingsComponent.getManualScannerDelay());\n state.setProblemFilterList(settingsComponent.getProblemFilterList());\n state.setFileExtensionBlacklist(settingsComponent.getFileExtensionBlacklist());\n\n state.setAdditionalInfoSeverities(settingsComponent.getAdditionalInfoSeveritiesList());\n state.setAdditionalWarningSeverities(settingsComponent.getAdditionalWarningSeveritiesList());\n state.setAdditionalWeakWarningSeverities(settingsComponent.getAdditionalWeakWarningSeveritiesList());\n state.setAdditionalErrorSeverities(settingsComponent.getAdditionalErrorSeveritiesList());\n\n if (manualScannerDelayChanged && state.getEnabledListener() == Listener.MANUAL_SCANNING) {\n DocumentMarkupModelScanner.getInstance().setDelayMilliseconds(state.getManualScannerDelay());\n }\n\n listenerManager.resetAndRescan();\n\n // When the blacklist changes we need to re-apply all MarkupModelProblemListeners\n if (fileExtensionBlacklistChanged && state.getEnabledListener() == Listener.MARKUP_MODEL_LISTENER) {\n listenerManager.resetMarkupModelProblemListeners();\n }\n\n if (listenerChanged) {\n listenerManager.changeListener();\n }\n }\n\n @Override\n public void reset() {\n SettingsState state = SettingsState.getInstance();\n\n settingsComponent.setShowErrors(state.isShowErrors());\n settingsComponent.setHighlightErrors(state.isHighlightErrors());\n settingsComponent.setShowErrorsInGutter(state.isShowErrorsInGutter());\n settingsComponent.setErrorTextColor(state.getErrorTextColor());\n settingsComponent.setErrorLabelBackgroundColor(state.getErrorBackgroundColor());\n settingsComponent.setErrorHighlightColor(state.getErrorHighlightColor());\n\n settingsComponent.setShowWarnings(state.isShowWarnings());\n settingsComponent.setHighlightWarnings(state.isHighlightWarnings());\n settingsComponent.setShowWarningsInGutter(state.isShowWarningsInGutter());\n settingsComponent.setWarningTextColor(state.getWarningTextColor());\n settingsComponent.setWarningLabelBackgroundColor(state.getWarningBackgroundColor());\n settingsComponent.setWarningHighlightColor(state.getWarningHighlightColor());\n\n settingsComponent.setShowWeakWarnings(state.isShowWeakWarnings());\n settingsComponent.setHighlightWeakWarnings(state.isHighlightWeakWarnings());\n settingsComponent.setShowWeakWarningsInGutter(state.isShowWeakWarningsInGutter());\n settingsComponent.setWeakWarningTextColor(state.getWeakWarningTextColor());\n settingsComponent.setWeakWarningLabelBackgroundColor(state.getWeakWarningBackgroundColor());\n settingsComponent.setWeakWarningHighlightColor(state.getWeakWarningHighlightColor());\n\n settingsComponent.setShowInfos(state.isShowInfos());\n settingsComponent.setHighlightInfo(state.isHighlightInfos());\n settingsComponent.setShowInfosInGutter(state.isShowInfosInGutter());\n settingsComponent.setInfoTextColor(state.getInfoTextColor());\n settingsComponent.setInfoLabelBackgroundColor(state.getInfoBackgroundColor());\n settingsComponent.setInfoHighlightColor(state.getInfoHighlightColor());\n\n settingsComponent.setForceErrorsInSameLine(state.isForceProblemsInSameLine());\n settingsComponent.setDrawBoxesAroundProblemLabels(state.isDrawBoxesAroundErrorLabels());\n settingsComponent.setRoundedCornerBoxes(state.isRoundedCornerBoxes());\n settingsComponent.setUseEditorFont(state.isUseEditorFont());\n settingsComponent.setShowOnlyHighestSeverityPerLine(state.isShowOnlyHighestSeverityPerLine());\n settingsComponent.setEnableHtmlStripping(state.isEnableHtmlStripping());\n settingsComponent.setEnableXmlUnescaping(state.isEnableXmlUnescaping());\n settingsComponent.setInlayFontSizeDelta(state.getInlayFontSizeDelta());\n settingsComponent.setFillProblemLabels(state.isFillProblemLabels());\n settingsComponent.setBoldProblemLabels(state.isBoldProblemLabels());\n settingsComponent.setItalicProblemLabels(state.isItalicProblemLabels());\n settingsComponent.setClickableContext(state.isClickableContext());\n\n settingsComponent.setEnabledListener(state.getEnabledListener());\n settingsComponent.setManualScannerDelay(state.getManualScannerDelay());\n settingsComponent.setProblemFilterList(state.getProblemFilterList());\n settingsComponent.setFileExtensionBlacklist(state.getFileExtensionBlacklist());\n\n settingsComponent.setAdditionalInfoSeverities(state.getAdditionalInfoSeveritiesAsString());\n settingsComponent.setAdditionalWarningSeverities(state.getAdditionalWarningSeveritiesAsString());\n settingsComponent.setAdditionalWeakWarningSeverities(state.getAdditionalWeakWarningSeveritiesAsString());\n settingsComponent.setAdditionalErrorSeverities(state.getAdditionalErrorSeveritiesAsString());\n }\n\n @Override\n public void disposeUIResources() {\n settingsComponent = null;\n }\n}\n", "patch": "--- a/src/main/java/org/overengineer/inlineproblems/settings/SettingsConfigurable.java\n+++ b/src/main/java/org/overengineer/inlineproblems/settings/SettingsConfigurable.java\n@@ -52,6 +52,7 @@\n state.isFillProblemLabels() == settingsComponent.isFillProblemLabels() &&\n state.isBoldProblemLabels() == settingsComponent.isBoldProblemLabels() &&\n state.isItalicProblemLabels() == settingsComponent.isItalicProblemLabels() &&\n+ state.isClickableContext() == settingsComponent.isClickableContext() &&\n \n state.getErrorTextColor().equals(settingsComponent.getErrorTextColor()) &&\n state.getErrorBackgroundColor().equals(settingsComponent.getErrorLabelBackgroundColor()) &&\n@@ -143,6 +144,7 @@\n state.setFillProblemLabels(settingsComponent.isFillProblemLabels());\n state.setBoldProblemLabels(settingsComponent.isBoldProblemLabels());\n state.setItalicProblemLabels(settingsComponent.isItalicProblemLabels());\n+ state.setClickableContext(settingsComponent.isClickableContext());\n \n state.setEnabledListener(settingsComponent.getEnabledListener());\n state.setManualScannerDelay(settingsComponent.getManualScannerDelay());\n@@ -213,6 +215,7 @@\n settingsComponent.setFillProblemLabels(state.isFillProblemLabels());\n settingsComponent.setBoldProblemLabels(state.isBoldProblemLabels());\n settingsComponent.setItalicProblemLabels(state.isItalicProblemLabels());\n+ settingsComponent.setClickableContext(state.isClickableContext());\n \n settingsComponent.setEnabledListener(state.getEnabledListener());\n settingsComponent.setManualScannerDelay(state.getManualScannerDelay());\n"}, {"path": "src/main/java/org/overengineer/inlineproblems/settings/SettingsState.java", "additions": 1, "deletions": 0, "changeType": "MODIFIED", "base_content": "package org.overengineer.inlineproblems.settings;\n\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.components.PersistentStateComponent;\nimport com.intellij.openapi.components.State;\nimport com.intellij.openapi.components.Storage;\nimport com.intellij.util.xmlb.XmlSerializerUtil;\nimport com.intellij.util.xmlb.annotations.OptionTag;\nimport com.intellij.util.xmlb.annotations.Transient;\nimport lombok.Getter;\nimport lombok.Setter;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.overengineer.inlineproblems.entities.enums.Listener;\nimport org.overengineer.inlineproblems.utils.ColorConverter;\n\nimport java.awt.*;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.stream.Collectors;\n\n\n@Getter\n@Setter\n@State(\n name = \"org.overengineer.inlineproblems.settings.SettingsState\",\n storages = @Storage(\"OverEngineer_InlineProblems.xml\")\n)\npublic class SettingsState implements PersistentStateComponent {\n\n private boolean showErrors = true;\n private boolean highlightErrors = false;\n private boolean showErrorsInGutter = false;\n private boolean showWarnings = true;\n private boolean highlightWarnings = false;\n private boolean showWarningsInGutter = false;\n private boolean showWeakWarnings = false;\n private boolean highlightWeakWarnings = false;\n private boolean showWeakWarningsInGutter = false;\n private boolean showInfos = false;\n private boolean highlightInfos = false;\n private boolean showInfosInGutter = false;\n\n /**\n * Colors renamed from 'Color' to 'Col' to solve\n * the compatibility issue with old version persisted xml setting file.\n *\n * @see Github discussion\n */\n\n @OptionTag(converter = ColorConverter.class)\n private Color errorBackgroundCol = new Color(0x654243);\n\n @OptionTag(converter = ColorConverter.class)\n private Color errorTextCol = new Color(0xEC5151);\n\n @OptionTag(converter = ColorConverter.class)\n private Color errorHighlightCol = errorBackgroundCol;\n\n @OptionTag(converter = ColorConverter.class)\n private Color warningTextCol = new Color(0xEC821F);\n\n @OptionTag(converter = ColorConverter.class)\n private Color warningBackgroundCol = new Color(0x815125);\n\n @OptionTag(converter = ColorConverter.class)\n private Color warningHighlightCol = warningBackgroundCol;\n\n @OptionTag(converter = ColorConverter.class)\n private Color weakWarningTextCol= new Color(0xC07937);\n\n @OptionTag(converter = ColorConverter.class)\n private Color weakWarningBackgroundCol = new Color(0xA47956);\n\n @OptionTag(converter = ColorConverter.class)\n private Color weakWarningHighlightCol = weakWarningBackgroundCol;\n\n @OptionTag(converter = ColorConverter.class)\n private Color infoTextCol = new Color(0x3BB1CE);\n\n @OptionTag(converter = ColorConverter.class)\n private Color infoBackgroundCol = new Color(0x1E5664);\n\n @OptionTag(converter = ColorConverter.class)\n private Color infoHighlightCol = infoBackgroundCol;\n\n private int manualScannerDelay = 200;\n private boolean drawBoxesAroundErrorLabels = true;\n private boolean roundedCornerBoxes = true;\n private boolean forceProblemsInSameLine = true;\n private boolean useEditorFont = false;\n private int inlayFontSizeDelta = 0;\n private boolean fillProblemLabels = false;\n private boolean boldProblemLabels = false;\n private boolean italicProblemLabels = false;\n private int problemLineLengthOffsetPixels = 50;\n private int enabledListener = Listener.MARKUP_MODEL_LISTENER;\n private String problemFilterList = \"todo;fixme;open in browser\";\n private String fileExtensionBlacklist = \"\";\n\n private List additionalErrorSeverities = new ArrayList<>();\n private List additionalWarningSeverities = new ArrayList<>();\n private List additionalWeakWarningSeverities = new ArrayList<>();\n private List additionalInfoSeverities = new ArrayList<>();\n\n private boolean showOnlyHighestSeverityPerLine = false;\n private boolean enableHtmlStripping = true;\n private boolean enableXmlUnescaping = true;\n\n // migration booleans\n private boolean highlightProblemListenerDeprecateMigrationDone = false;\n private boolean filterListMigrationDone01 = false;\n\n public static SettingsState getInstance() {\n return ApplicationManager.getApplication().getService(SettingsState.class);\n }\n\n @Override\n public @Nullable SettingsState getState() {\n return this;\n }\n\n @Override\n public void loadState(@NotNull SettingsState state) {\n XmlSerializerUtil.copyBean(state, this);\n\n migrateState();\n }\n\n @Override\n public void noStateLoaded() {\n migrateState();\n }\n\n private void migrateState() {\n // filter list\n if (!filterListMigrationDone01) {\n List newFilterListEntries = List.of(\"Consider unknown contexts non-blocking\");\n for (String entry : newFilterListEntries) {\n if (!problemFilterList.contains(entry)) {\n problemFilterList += \";\" + entry;\n }\n }\n\n filterListMigrationDone01 = true;\n }\n\n // listener\n if (!highlightProblemListenerDeprecateMigrationDone) {\n if (enabledListener == Listener.HIGHLIGHT_PROBLEMS_LISTENER) {\n enabledListener = Listener.MARKUP_MODEL_LISTENER;\n }\n\n highlightProblemListenerDeprecateMigrationDone = true;\n }\n }\n\n public String getAdditionalInfoSeveritiesAsString() {\n return getSeverityListAsString(additionalInfoSeverities);\n }\n\n public String getAdditionalErrorSeveritiesAsString() {\n return getSeverityListAsString(additionalErrorSeverities);\n }\n\n public String getAdditionalWarningSeveritiesAsString() {\n return getSeverityListAsString(additionalWarningSeverities);\n }\n\n public String getAdditionalWeakWarningSeveritiesAsString() {\n return getSeverityListAsString(additionalWeakWarningSeverities);\n }\n\n private String getSeverityListAsString(List severityList) {\n return severityList.stream().map(String::valueOf).collect(Collectors.joining(\"; \"));\n }\n\n //\n @Transient\n public Color getErrorTextColor() {\n return errorTextCol;\n }\n\n @Transient\n public void setErrorTextColor(Color color) {\n this.errorTextCol = color;\n }\n\n @Transient\n public Color getErrorBackgroundColor() {\n return errorBackgroundCol;\n }\n\n @Transient\n public void setErrorBackgroundColor(Color color) {\n this.errorBackgroundCol = color;\n }\n\n @Transient\n public Color getErrorHighlightColor() {\n return errorHighlightCol;\n }\n\n @Transient\n public void setErrorHighlightColor(Color color) {\n this.errorHighlightCol = color;\n }\n\n @Transient\n public Color getWarningTextColor() {\n return warningTextCol;\n }\n\n @Transient\n public void setWarningTextColor(Color color) {\n this.warningTextCol = color;\n }\n\n @Transient\n public Color getWarningBackgroundColor() {\n return warningBackgroundCol;\n }\n\n @Transient\n public void setWarningBackgroundColor(Color color) {\n this.warningBackgroundCol = color;\n }\n\n @Transient\n public Color getWarningHighlightColor() {\n return warningHighlightCol;\n }\n\n @Transient\n public void setWarningHighlightColor(Color color) {\n this.warningHighlightCol = color;\n }\n\n @Transient\n public Color getWeakWarningTextColor() {\n return weakWarningTextCol;\n }\n\n @Transient\n public void setWeakWarningTextColor(Color color) {\n this.weakWarningTextCol = color;\n }\n\n @Transient\n public Color getWeakWarningBackgroundColor() {\n return weakWarningBackgroundCol;\n }\n\n @Transient\n public void setWeakWarningBackgroundColor(Color color) {\n this.weakWarningBackgroundCol = color;\n }\n\n @Transient\n public Color getWeakWarningHighlightColor() {\n return weakWarningHighlightCol;\n }\n\n @Transient\n public void setWeakWarningHighlightColor(Color color) {\n this.weakWarningHighlightCol = color;\n }\n\n @Transient\n public Color getInfoTextColor() {\n return infoTextCol;\n }\n\n @Transient\n public void setInfoTextColor(Color color) {\n this.infoTextCol = color;\n }\n\n @Transient\n public Color getInfoBackgroundColor() {\n return infoBackgroundCol;\n }\n\n @Transient\n public void setInfoBackgroundColor(Color color) {\n this.infoBackgroundCol = color;\n }\n\n @Transient\n public Color getInfoHighlightColor() {\n return infoHighlightCol;\n }\n\n @Transient\n public void setInfoHighlightColor(Color color) {\n this.infoHighlightCol = color;\n }\n //\n\n @Transient\n public boolean isShowAnyGutterIcons() {\n return showErrorsInGutter || showWarningsInGutter || showWeakWarningsInGutter || showInfosInGutter;\n }\n}\n", "head_content": "package org.overengineer.inlineproblems.settings;\n\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.components.PersistentStateComponent;\nimport com.intellij.openapi.components.State;\nimport com.intellij.openapi.components.Storage;\nimport com.intellij.util.xmlb.XmlSerializerUtil;\nimport com.intellij.util.xmlb.annotations.OptionTag;\nimport com.intellij.util.xmlb.annotations.Transient;\nimport lombok.Getter;\nimport lombok.Setter;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.overengineer.inlineproblems.entities.enums.Listener;\nimport org.overengineer.inlineproblems.utils.ColorConverter;\n\nimport java.awt.*;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.stream.Collectors;\n\n\n@Getter\n@Setter\n@State(\n name = \"org.overengineer.inlineproblems.settings.SettingsState\",\n storages = @Storage(\"OverEngineer_InlineProblems.xml\")\n)\npublic class SettingsState implements PersistentStateComponent {\n\n private boolean showErrors = true;\n private boolean highlightErrors = false;\n private boolean showErrorsInGutter = false;\n private boolean showWarnings = true;\n private boolean highlightWarnings = false;\n private boolean showWarningsInGutter = false;\n private boolean showWeakWarnings = false;\n private boolean highlightWeakWarnings = false;\n private boolean showWeakWarningsInGutter = false;\n private boolean showInfos = false;\n private boolean highlightInfos = false;\n private boolean showInfosInGutter = false;\n private boolean clickableContext = false;\n\n /**\n * Colors renamed from 'Color' to 'Col' to solve\n * the compatibility issue with old version persisted xml setting file.\n *\n * @see Github discussion\n */\n\n @OptionTag(converter = ColorConverter.class)\n private Color errorBackgroundCol = new Color(0x654243);\n\n @OptionTag(converter = ColorConverter.class)\n private Color errorTextCol = new Color(0xEC5151);\n\n @OptionTag(converter = ColorConverter.class)\n private Color errorHighlightCol = errorBackgroundCol;\n\n @OptionTag(converter = ColorConverter.class)\n private Color warningTextCol = new Color(0xEC821F);\n\n @OptionTag(converter = ColorConverter.class)\n private Color warningBackgroundCol = new Color(0x815125);\n\n @OptionTag(converter = ColorConverter.class)\n private Color warningHighlightCol = warningBackgroundCol;\n\n @OptionTag(converter = ColorConverter.class)\n private Color weakWarningTextCol= new Color(0xC07937);\n\n @OptionTag(converter = ColorConverter.class)\n private Color weakWarningBackgroundCol = new Color(0xA47956);\n\n @OptionTag(converter = ColorConverter.class)\n private Color weakWarningHighlightCol = weakWarningBackgroundCol;\n\n @OptionTag(converter = ColorConverter.class)\n private Color infoTextCol = new Color(0x3BB1CE);\n\n @OptionTag(converter = ColorConverter.class)\n private Color infoBackgroundCol = new Color(0x1E5664);\n\n @OptionTag(converter = ColorConverter.class)\n private Color infoHighlightCol = infoBackgroundCol;\n\n private int manualScannerDelay = 200;\n private boolean drawBoxesAroundErrorLabels = true;\n private boolean roundedCornerBoxes = true;\n private boolean forceProblemsInSameLine = true;\n private boolean useEditorFont = false;\n private int inlayFontSizeDelta = 0;\n private boolean fillProblemLabels = false;\n private boolean boldProblemLabels = false;\n private boolean italicProblemLabels = false;\n private int problemLineLengthOffsetPixels = 50;\n private int enabledListener = Listener.MARKUP_MODEL_LISTENER;\n private String problemFilterList = \"todo;fixme;open in browser\";\n private String fileExtensionBlacklist = \"\";\n\n private List additionalErrorSeverities = new ArrayList<>();\n private List additionalWarningSeverities = new ArrayList<>();\n private List additionalWeakWarningSeverities = new ArrayList<>();\n private List additionalInfoSeverities = new ArrayList<>();\n\n private boolean showOnlyHighestSeverityPerLine = false;\n private boolean enableHtmlStripping = true;\n private boolean enableXmlUnescaping = true;\n\n // migration booleans\n private boolean highlightProblemListenerDeprecateMigrationDone = false;\n private boolean filterListMigrationDone01 = false;\n\n public static SettingsState getInstance() {\n return ApplicationManager.getApplication().getService(SettingsState.class);\n }\n\n @Override\n public @Nullable SettingsState getState() {\n return this;\n }\n\n @Override\n public void loadState(@NotNull SettingsState state) {\n XmlSerializerUtil.copyBean(state, this);\n\n migrateState();\n }\n\n @Override\n public void noStateLoaded() {\n migrateState();\n }\n\n private void migrateState() {\n // filter list\n if (!filterListMigrationDone01) {\n List newFilterListEntries = List.of(\"Consider unknown contexts non-blocking\");\n for (String entry : newFilterListEntries) {\n if (!problemFilterList.contains(entry)) {\n problemFilterList += \";\" + entry;\n }\n }\n\n filterListMigrationDone01 = true;\n }\n\n // listener\n if (!highlightProblemListenerDeprecateMigrationDone) {\n if (enabledListener == Listener.HIGHLIGHT_PROBLEMS_LISTENER) {\n enabledListener = Listener.MARKUP_MODEL_LISTENER;\n }\n\n highlightProblemListenerDeprecateMigrationDone = true;\n }\n }\n\n public String getAdditionalInfoSeveritiesAsString() {\n return getSeverityListAsString(additionalInfoSeverities);\n }\n\n public String getAdditionalErrorSeveritiesAsString() {\n return getSeverityListAsString(additionalErrorSeverities);\n }\n\n public String getAdditionalWarningSeveritiesAsString() {\n return getSeverityListAsString(additionalWarningSeverities);\n }\n\n public String getAdditionalWeakWarningSeveritiesAsString() {\n return getSeverityListAsString(additionalWeakWarningSeverities);\n }\n\n private String getSeverityListAsString(List severityList) {\n return severityList.stream().map(String::valueOf).collect(Collectors.joining(\"; \"));\n }\n\n //\n @Transient\n public Color getErrorTextColor() {\n return errorTextCol;\n }\n\n @Transient\n public void setErrorTextColor(Color color) {\n this.errorTextCol = color;\n }\n\n @Transient\n public Color getErrorBackgroundColor() {\n return errorBackgroundCol;\n }\n\n @Transient\n public void setErrorBackgroundColor(Color color) {\n this.errorBackgroundCol = color;\n }\n\n @Transient\n public Color getErrorHighlightColor() {\n return errorHighlightCol;\n }\n\n @Transient\n public void setErrorHighlightColor(Color color) {\n this.errorHighlightCol = color;\n }\n\n @Transient\n public Color getWarningTextColor() {\n return warningTextCol;\n }\n\n @Transient\n public void setWarningTextColor(Color color) {\n this.warningTextCol = color;\n }\n\n @Transient\n public Color getWarningBackgroundColor() {\n return warningBackgroundCol;\n }\n\n @Transient\n public void setWarningBackgroundColor(Color color) {\n this.warningBackgroundCol = color;\n }\n\n @Transient\n public Color getWarningHighlightColor() {\n return warningHighlightCol;\n }\n\n @Transient\n public void setWarningHighlightColor(Color color) {\n this.warningHighlightCol = color;\n }\n\n @Transient\n public Color getWeakWarningTextColor() {\n return weakWarningTextCol;\n }\n\n @Transient\n public void setWeakWarningTextColor(Color color) {\n this.weakWarningTextCol = color;\n }\n\n @Transient\n public Color getWeakWarningBackgroundColor() {\n return weakWarningBackgroundCol;\n }\n\n @Transient\n public void setWeakWarningBackgroundColor(Color color) {\n this.weakWarningBackgroundCol = color;\n }\n\n @Transient\n public Color getWeakWarningHighlightColor() {\n return weakWarningHighlightCol;\n }\n\n @Transient\n public void setWeakWarningHighlightColor(Color color) {\n this.weakWarningHighlightCol = color;\n }\n\n @Transient\n public Color getInfoTextColor() {\n return infoTextCol;\n }\n\n @Transient\n public void setInfoTextColor(Color color) {\n this.infoTextCol = color;\n }\n\n @Transient\n public Color getInfoBackgroundColor() {\n return infoBackgroundCol;\n }\n\n @Transient\n public void setInfoBackgroundColor(Color color) {\n this.infoBackgroundCol = color;\n }\n\n @Transient\n public Color getInfoHighlightColor() {\n return infoHighlightCol;\n }\n\n @Transient\n public void setInfoHighlightColor(Color color) {\n this.infoHighlightCol = color;\n }\n //\n\n @Transient\n public boolean isShowAnyGutterIcons() {\n return showErrorsInGutter || showWarningsInGutter || showWeakWarningsInGutter || showInfosInGutter;\n }\n}\n", "patch": "--- a/src/main/java/org/overengineer/inlineproblems/settings/SettingsState.java\n+++ b/src/main/java/org/overengineer/inlineproblems/settings/SettingsState.java\n@@ -40,6 +40,7 @@\n private boolean showInfos = false;\n private boolean highlightInfos = false;\n private boolean showInfosInGutter = false;\n+ private boolean clickableContext = false;\n \n /**\n * Colors renamed from 'Color' to 'Col' to solve\n"}, {"path": "src/main/resources/messages/SettingsBundle_en.properties", "additions": 2, "deletions": 1, "changeType": "MODIFIED", "base_content": "settings.showErrors=Show errors\nsettings.highlightErrors=Highlight errors\nsettings.showErrorsInGutter=Show error icons in gutter\nsettings.showWarnings=Show warnings\nsettings.highlightWarnings=Highlight warnings\nsettings.showWarningsInGutter=Show warning icons in gutter\nsettings.showWeakWarnings=Show weak warnings\nsettings.highlightWeakWarnings=Highlight weak warnings\nsettings.showWeakWarningsInGutter=Show weak warning icons in gutter\nsettings.showInfos=Show infos\nsettings.highlightInfos=Highlight infos\nsettings.showInfosInGutter=Show info icons in gutter\nsettings.submenu.label=Box / Label\nsettings.drawBoxesAroundProblemLabels=Draw boxes around problem labels\nsettings.roundedCornerBoxes=Rounded corners\nsettings.fillProblemLabels=Fill problem label background\nsettings.boldProblemLabels=Bold problem labels\nsettings.italicProblemLabels=Italic problem labels\nsettings.submenu.general=General\nsettings.activeProblemListener=Enabled problem listener\nsettings.markupModelListenerDescription=- MarkupModelListener (default): Called after addition of a RangeHighlighter to a file. Faster on large files, slower on small ones.\nsettings.highlightProblemListenerDescription=- HighlightProblemListener: Faster on small to medium sized files, slower on large ones. Called very often and can cause slowdowns.\nsettings.manualScannerDescription=- ManualScanner: Scans the DocumentMarkupModel for all highlighters at a fixed delay, uses the same logic\nsettings.manualScannerDescriptionSupplement= as HighlightProblemListener but can help with slowdowns on big files.\nsettings.manualScannerDelayLabel=ManualScanner delay in milliseconds\nsettings.manualScannerDelayTooltip=Delay between manual scans, only used when ManualScanner is enabled\nsettings.inlaySizeDelta=Inlay size delta\nsettings.inlaySizeDeltaTooltip=Used to have smaller font size for the inlays, should be smaller than editor font size\nsettings.problemFilterListLabel=Problem filter list\nsettings.problemFilterListTooltip=Semicolon separated list of problem text beginnings that will not be handled\nsettings.fileExtensionBlacklistLabel=File extension blacklist\nsettings.fileExtensionBlaclistTooltip=Semicolon separated list of file extensions to ignore (like \".java;.md\")\nsettings.submenu.colors=Colors\nsettings.errorTextColor=Error text color:\nsettings.errorLabelBorderColor=Error label border color:\nsettings.errorLineHighlightColor=Error line highlight color:\nsettings.additionalSeverities=Additional severities:\nsettings.additionalSeveritiesErrorDesc=Semicolon separated list of additional error severities e.g. '10, 100'\nsettings.warningTextColor=Warning text color:\nsettings.warningLabelBorderColor=Warning label border color:\nsettings.warningLineHighlightColor=Warning line highlight color:\nsettings.additionalSeveritiesWarningDesc=Semicolon separated list of additional warning severities e.g. '10, 100'\nsettings.weakWarningTextColor=Weak warning text color:\nsettings.weakWarningLabelBorderColor=Weak warning label border color:\nsettings.weakWarningLineHighlightColor=Weak warning line highlight color:\nsettings.additionalSeveritiesWeakWarningDesc=Semicolon separated list of additional weak-warning severities e.g. '10, 100'\nsettings.infoTextColor=Info text color:\nsettings.infoLabelBorderColor=Info label border color:\nsettings.infoLineHighlightColor=Info line highlight color:\nsettings.additionalSeveritiesInfoDesc=Semicolon separated list of additional info severities e.g. '10, 100'\nsettings.forceProblemsInOneLine=Force problems in the same line even if they are too long to fit\nsettings.useEditorFont=Use editor font instead of tooltip font\nsettings.showOnlyHighestPerLine=Show only the problem with the highest severity per line\nsettings.enableHtmlStripping=Enable stripping of HTML in the messages\nsettings.enableXmlUnescaping=Enable unescaping of XML in the messages", "head_content": "settings.showErrors=Show errors\nsettings.highlightErrors=Highlight errors\nsettings.showErrorsInGutter=Show error icons in gutter\nsettings.showWarnings=Show warnings\nsettings.highlightWarnings=Highlight warnings\nsettings.showWarningsInGutter=Show warning icons in gutter\nsettings.showWeakWarnings=Show weak warnings\nsettings.highlightWeakWarnings=Highlight weak warnings\nsettings.showWeakWarningsInGutter=Show weak warning icons in gutter\nsettings.showInfos=Show infos\nsettings.highlightInfos=Highlight infos\nsettings.showInfosInGutter=Show info icons in gutter\nsettings.submenu.label=Box / Label\nsettings.drawBoxesAroundProblemLabels=Draw boxes around problem labels\nsettings.roundedCornerBoxes=Rounded corners\nsettings.fillProblemLabels=Fill problem label background\nsettings.boldProblemLabels=Bold problem labels\nsettings.italicProblemLabels=Italic problem labels\nsettings.submenu.general=General\nsettings.activeProblemListener=Enabled problem listener\nsettings.markupModelListenerDescription=- MarkupModelListener (default): Called after addition of a RangeHighlighter to a file. Faster on large files, slower on small ones.\nsettings.highlightProblemListenerDescription=- HighlightProblemListener: Faster on small to medium sized files, slower on large ones. Called very often and can cause slowdowns.\nsettings.manualScannerDescription=- ManualScanner: Scans the DocumentMarkupModel for all highlighters at a fixed delay, uses the same logic\nsettings.manualScannerDescriptionSupplement= as HighlightProblemListener but can help with slowdowns on big files.\nsettings.manualScannerDelayLabel=ManualScanner delay in milliseconds\nsettings.manualScannerDelayTooltip=Delay between manual scans, only used when ManualScanner is enabled\nsettings.inlaySizeDelta=Inlay size delta\nsettings.inlaySizeDeltaTooltip=Used to have smaller font size for the inlays, should be smaller than editor font size\nsettings.problemFilterListLabel=Problem filter list\nsettings.problemFilterListTooltip=Semicolon separated list of problem text beginnings that will not be handled\nsettings.fileExtensionBlacklistLabel=File extension blacklist\nsettings.fileExtensionBlaclistTooltip=Semicolon separated list of file extensions to ignore (like \".java;.md\")\nsettings.submenu.colors=Colors\nsettings.errorTextColor=Error text color:\nsettings.errorLabelBorderColor=Error label border color:\nsettings.errorLineHighlightColor=Error line highlight color:\nsettings.additionalSeverities=Additional severities:\nsettings.additionalSeveritiesErrorDesc=Semicolon separated list of additional error severities e.g. '10, 100'\nsettings.warningTextColor=Warning text color:\nsettings.warningLabelBorderColor=Warning label border color:\nsettings.warningLineHighlightColor=Warning line highlight color:\nsettings.additionalSeveritiesWarningDesc=Semicolon separated list of additional warning severities e.g. '10, 100'\nsettings.weakWarningTextColor=Weak warning text color:\nsettings.weakWarningLabelBorderColor=Weak warning label border color:\nsettings.weakWarningLineHighlightColor=Weak warning line highlight color:\nsettings.additionalSeveritiesWeakWarningDesc=Semicolon separated list of additional weak-warning severities e.g. '10, 100'\nsettings.infoTextColor=Info text color:\nsettings.infoLabelBorderColor=Info label border color:\nsettings.infoLineHighlightColor=Info line highlight color:\nsettings.additionalSeveritiesInfoDesc=Semicolon separated list of additional info severities e.g. '10, 100'\nsettings.forceProblemsInOneLine=Force problems in the same line even if they are too long to fit\nsettings.useEditorFont=Use editor font instead of tooltip font\nsettings.showOnlyHighestPerLine=Show only the problem with the highest severity per line\nsettings.enableHtmlStripping=Enable stripping of HTML in the messages\nsettings.enableXmlUnescaping=Enable unescaping of XML in the messages\nsettings.enableClickableContext=Enable clickable inline problems for IDE context actions", "patch": "--- a/src/main/resources/messages/SettingsBundle_en.properties\n+++ b/src/main/resources/messages/SettingsBundle_en.properties\n@@ -52,4 +52,5 @@\n settings.useEditorFont=Use editor font instead of tooltip font\n settings.showOnlyHighestPerLine=Show only the problem with the highest severity per line\n settings.enableHtmlStripping=Enable stripping of HTML in the messages\n-settings.enableXmlUnescaping=Enable unescaping of XML in the messages+settings.enableXmlUnescaping=Enable unescaping of XML in the messages\n+settings.enableClickableContext=Enable clickable inline problems for IDE context actions"}, {"path": "src/main/resources/messages/SettingsBundle_zh_CN.properties", "additions": 1, "deletions": 0, "changeType": "MODIFIED", "base_content": "settings.showErrors=\\u663E\\u793A\\u9519\\u8BEF\nsettings.highlightErrors=\\u7A81\\u51FA\\u663E\\u793A\\u9519\\u8BEF\nsettings.showErrorsInGutter=\\u5728\\u88c5\\u8ba2\\u533a\\u57df\\u663e\\u793a\\u9519\\u8bef\\u56fe\\u6807\nsettings.showWarnings=\\u663E\\u793A\\u8B66\\u544A\nsettings.highlightWarnings=\\u7A81\\u51FA\\u663E\\u793A\\u8B66\\u544A\nsettings.showWarningsInGutter=\\u5728\\u88c5\\u8ba2\\u533a\\u57df\\u663e\\u793a\\u8b66\\u544a\\u56fe\\u6807\nsettings.showWeakWarnings=\\u663E\\u793A\\u8F7B\\u5F31\\u8B66\\u544A\nsettings.highlightWeakWarnings=\\u7A81\\u51FA\\u663E\\u793A\\u8F7B\\u5F31\\u8B66\\u544A\nsettings.showWeakWarningsInGutter=\\u5728\\u88c5\\u8ba2\\u533a\\u57df\\u663e\\u793a\\u5f31\\u8b66\\u544a\\u56fe\\u6807\nsettings.showInfos=\\u663E\\u793A\\u4FE1\\u606F\nsettings.highlightInfos=\\u7A81\\u51FA\\u663E\\u793A\\u4FE1\\u606F\nsettings.showInfosInGutter=\\u5728\\u88c5\\u8ba2\\u533a\\u57df\\u663e\\u793a\\u4fe1\\u606f\\u56fe\\u6807\nsettings.submenu.label=\\u8fb9\\u6846 / \\u6807\\u7B7E\nsettings.drawBoxesAroundProblemLabels=\\u5728\\u95ee\\u9898\\u6807\\u7b7e\\u5468\\u56f4\\u7ed8\\u5236\\u8fb9\\u6846\nsettings.roundedCornerBoxes=\\u5706\\u89d2\\u8fb9\\u6846\nsettings.fillProblemLabels=\\u586B\\u5145\\u95EE\\u9898\\u6807\\u7B7E\\u80CC\\u666F\nsettings.boldProblemLabels=\\u52a0\\u7c97\\u95ee\\u9898\\u6807\\u7b7e\nsettings.italicProblemLabels=\\u659C\\u4F53\\u95EE\\u9898\\u6807\\u7B7E\nsettings.submenu.general=\\u901A\\u7528\nsettings.activeProblemListener=\\u542F\\u7528\\u7684\\u95EE\\u9898\\u76D1\\u542C\\u5668\nsettings.markupModelListenerDescription=- MarkupModelListener\\uFF08\\u9ED8\\u8BA4\\uFF09\\uFF1A\\u5728\\u6587\\u4EF6\\u6DFB\\u52A0 RangeHighlighter \\u540E\\u8C03\\u7528\\u3002\\u5927\\u6587\\u4EF6\\u4E2D\\u66F4\\u5FEB\\uFF0C\\u5C0F\\u6587\\u4EF6\\u4E2D\\u66F4\\u6162\\u3002\nsettings.highlightProblemListenerDescription=- HighlightProblemListener\\uFF1A\\u5C0F\\u5230\\u4E2D\\u7B49\\u5927\\u5C0F\\u7684\\u6587\\u4EF6\\u66F4\\u5FEB\\uFF0C\\u5927\\u6587\\u4EF6\\u66F4\\u6162\\u3002\\u8C03\\u7528\\u975E\\u5E38\\u9891\\u7E41\\uFF0C\\u53EF\\u80FD\\u5BFC\\u81F4\\u901F\\u5EA6\\u653E\\u6162\\u3002\nsettings.manualScannerDescription=- ManualScanner\\uFF1A\\u4EE5\\u56FA\\u5B9A\\u7684\\u5EF6\\u8FDF\\u626B\\u63CF DocumentMarkupModel \\u4E2D\\u7684\\u6240\\u6709\\u9AD8\\u4EAE\\u6807\\u8BB0\\uFF0C\\u4F7F\\u7528\\u76F8\\u540C\\u7684\\u903B\\u8F91\\u3002\nsettings.manualScannerDescriptionSupplement= \\u540C HighlightProblemListener\\uFF0C\\u4F46\\u53EF\\u4EE5\\u5E2E\\u52A9\\u5904\\u7406\\u5927\\u6587\\u4EF6\\u4E2D\\u7684\\u653E\\u6162\\u901F\\u5EA6\\u3002\nsettings.manualScannerDelayLabel=ManualScanner \\u4EE5\\u6BEB\\u79D2\\u4E3A\\u5355\\u4F4D\\u7684\\u5EF6\\u8FDF\nsettings.manualScannerDelayTooltip=\\u624B\\u52A8\\u626B\\u63CF\\u95F4\\u7684\\u5EF6\\u8FDF\\uFF0C\\u4EC5\\u5728\\u542F\\u7528 ManualScanner \\u65F6\\u4F7F\\u7528\nsettings.inlaySizeDelta=\\u5b57\\u4f53\\u5927\\u5c0f\\u5dee\\u5f02\nsettings.inlaySizeDeltaTooltip=\\u7528\\u4e8e\\u4e3a\\u6807\\u7b7e\\u8bbe\\u7f6e\\u8f83\\u5c0f\\u7684\\u5b57\\u4f53\\uff0c\\u5fc5\\u987b\\u5c0f\\u4e8e\\u7f16\\u8f91\\u5668\\u5b57\\u4f53\\u5927\\u5c0f\nsettings.problemFilterListLabel=\\u95ee\\u9898\\u8fc7\\u6ee4\\u5217\\u8868\nsettings.problemFilterListTooltip=\\u4e0d\\u5904\\u7406\\u7684\\u95ee\\u9898\\u6587\\u672c\\u5f00\\u5934\\u7684\\u7528\\u5206\\u53f7\\u5206\\u9694\\u7684\\u5217\\u8868\nsettings.submenu.colors=\\u989C\\u8272\nsettings.errorTextColor=\\u9519\\u8BEF\\u6587\\u672C\\u989C\\u8272\\uFF1A\nsettings.errorLabelBorderColor=\\u9519\\u8BEF\\u6807\\u7B7E\\u8FB9\\u6846\\u989C\\u8272\\uFF1A\nsettings.errorLineHighlightColor=\\u9519\\u8BEF\\u884C\\u7A81\\u51FA\\u663E\\u793A\\u989C\\u8272\\uFF1A\nsettings.additionalSeverities=\\u9644\\u52A0\\u4E25\\u91CD\\u6027\\uFF1A\nsettings.additionalSeveritiesErrorDesc=\\u9644\\u52A0\\u9519\\u8BEF\\u4E25\\u91CD\\u6027\\u7684\\u7528\\u5206\\u53F7\\u5206\\u9694\\u7684\\u5217\\u8868\\uFF0C\\u4F8B\\u5982 '10, 100'\nsettings.warningTextColor=\\u8B66\\u544A\\u6587\\u672C\\u989C\\u8272\\uFF1A\nsettings.warningLabelBorderColor=\\u8B66\\u544A\\u6807\\u7B7E\\u8FB9\\u6846\\u989C\\u8272\\uFF1A\nsettings.warningLineHighlightColor=\\u8B66\\u544A\\u884C\\u7A81\\u51FA\\u663E\\u793A\\u989C\\u8272\\uFF1A\nsettings.additionalSeveritiesWarningDesc=\\u9644\\u52A0\\u8B66\\u544A\\u4E25\\u91CD\\u6027\\u7684\\u7528\\u5206\\u53F7\\u5206\\u9694\\u7684\\u5217\\u8868\\uFF0C\\u4F8B\\u5982 '10, 100'\nsettings.weakWarningTextColor=\\u8F7B\\u5F31\\u8B66\\u544A\\u6587\\u672C\\u989C\\u8272\\uFF1A\nsettings.weakWarningLabelBorderColor=\\u8F7B\\u5F31\\u8B66\\u544A\\u6807\\u7B7E\\u8FB9\\u6846\\u989C\\u8272\\uFF1A\nsettings.weakWarningLineHighlightColor=\\u8F7B\\u5F31\\u8B66\\u544A\\u884C\\u7A81\\u51FA\\u663E\\u793A\\u989C\\u8272\\uFF1A\nsettings.additionalSeveritiesWeakWarningDesc=\\u9644\\u52A0\\u8F7B\\u5F31\\u8B66\\u544A\\u4E25\\u91CD\\u6027\\u7684\\u7528\\u5206\\u53F7\\u5206\\u9694\\u7684\\u5217\\u8868\\uFF0C\\u4F8B\\u5982 '10, 100'\nsettings.infoTextColor=\\u4FE1\\u606F\\u6587\\u672C\\u989C\\u8272\\uFF1A\nsettings.infoLabelBorderColor=\\u4FE1\\u606F\\u6807\\u7B7E\\u8FB9\\u6846\\u989C\\u8272\\uFF1A\nsettings.infoLineHighlightColor=\\u4FE1\\u606F\\u884C\\u7A81\\u51FA\\u663E\\u793A\\u989C\\u8272\\uFF1A\nsettings.additionalSeveritiesInfoDesc=\\u9644\\u52A0\\u4FE1\\u606F\\u4E25\\u91CD\\u6027\\u7684\\u7528\\u5206\\u53F7\\u5206\\u9694\\u7684\\u5217\\u8868\\uFF0C\\u4F8B\\u5982 '10, 100'\nsettings.forceProblemsInOneLine=\\u5F3A\\u5236\\u5728\\u540C\\u4E00\\u884C\\u663E\\u793A\\u95EE\\u9898\\uFF0C\\u5373\\u4F7F\\u5B83\\u4EEC\\u592A\\u957F\\u800C\\u65E0\\u6CD5\\u9002\\u5E94\nsettings.useEditorFont=\\u4F7F\\u7528\\u7F16\\u8F91\\u5668\\u5B57\\u4F53\\u800C\\u4E0D\\u662F\\u63D0\\u793A\\u5B57\\u4F53\nsettings.showOnlyHighestPerLine=\\u4ec5\\u663e\\u793a\\u6bcf\\u884c\\u4e2d\\u6700\\u4e25\\u91cd\\u7684\\u95ee\\u9898\nsettings.enableHtmlStripping=Enable stripping of HTML in the messages\nsettings.enableXmlUnescaping=Enable unescaping of XML in the messages\n", "head_content": "settings.showErrors=\\u663E\\u793A\\u9519\\u8BEF\nsettings.highlightErrors=\\u7A81\\u51FA\\u663E\\u793A\\u9519\\u8BEF\nsettings.showErrorsInGutter=\\u5728\\u88c5\\u8ba2\\u533a\\u57df\\u663e\\u793a\\u9519\\u8bef\\u56fe\\u6807\nsettings.showWarnings=\\u663E\\u793A\\u8B66\\u544A\nsettings.highlightWarnings=\\u7A81\\u51FA\\u663E\\u793A\\u8B66\\u544A\nsettings.showWarningsInGutter=\\u5728\\u88c5\\u8ba2\\u533a\\u57df\\u663e\\u793a\\u8b66\\u544a\\u56fe\\u6807\nsettings.showWeakWarnings=\\u663E\\u793A\\u8F7B\\u5F31\\u8B66\\u544A\nsettings.highlightWeakWarnings=\\u7A81\\u51FA\\u663E\\u793A\\u8F7B\\u5F31\\u8B66\\u544A\nsettings.showWeakWarningsInGutter=\\u5728\\u88c5\\u8ba2\\u533a\\u57df\\u663e\\u793a\\u5f31\\u8b66\\u544a\\u56fe\\u6807\nsettings.showInfos=\\u663E\\u793A\\u4FE1\\u606F\nsettings.highlightInfos=\\u7A81\\u51FA\\u663E\\u793A\\u4FE1\\u606F\nsettings.showInfosInGutter=\\u5728\\u88c5\\u8ba2\\u533a\\u57df\\u663e\\u793a\\u4fe1\\u606f\\u56fe\\u6807\nsettings.submenu.label=\\u8fb9\\u6846 / \\u6807\\u7B7E\nsettings.drawBoxesAroundProblemLabels=\\u5728\\u95ee\\u9898\\u6807\\u7b7e\\u5468\\u56f4\\u7ed8\\u5236\\u8fb9\\u6846\nsettings.roundedCornerBoxes=\\u5706\\u89d2\\u8fb9\\u6846\nsettings.fillProblemLabels=\\u586B\\u5145\\u95EE\\u9898\\u6807\\u7B7E\\u80CC\\u666F\nsettings.boldProblemLabels=\\u52a0\\u7c97\\u95ee\\u9898\\u6807\\u7b7e\nsettings.italicProblemLabels=\\u659C\\u4F53\\u95EE\\u9898\\u6807\\u7B7E\nsettings.submenu.general=\\u901A\\u7528\nsettings.activeProblemListener=\\u542F\\u7528\\u7684\\u95EE\\u9898\\u76D1\\u542C\\u5668\nsettings.markupModelListenerDescription=- MarkupModelListener\\uFF08\\u9ED8\\u8BA4\\uFF09\\uFF1A\\u5728\\u6587\\u4EF6\\u6DFB\\u52A0 RangeHighlighter \\u540E\\u8C03\\u7528\\u3002\\u5927\\u6587\\u4EF6\\u4E2D\\u66F4\\u5FEB\\uFF0C\\u5C0F\\u6587\\u4EF6\\u4E2D\\u66F4\\u6162\\u3002\nsettings.highlightProblemListenerDescription=- HighlightProblemListener\\uFF1A\\u5C0F\\u5230\\u4E2D\\u7B49\\u5927\\u5C0F\\u7684\\u6587\\u4EF6\\u66F4\\u5FEB\\uFF0C\\u5927\\u6587\\u4EF6\\u66F4\\u6162\\u3002\\u8C03\\u7528\\u975E\\u5E38\\u9891\\u7E41\\uFF0C\\u53EF\\u80FD\\u5BFC\\u81F4\\u901F\\u5EA6\\u653E\\u6162\\u3002\nsettings.manualScannerDescription=- ManualScanner\\uFF1A\\u4EE5\\u56FA\\u5B9A\\u7684\\u5EF6\\u8FDF\\u626B\\u63CF DocumentMarkupModel \\u4E2D\\u7684\\u6240\\u6709\\u9AD8\\u4EAE\\u6807\\u8BB0\\uFF0C\\u4F7F\\u7528\\u76F8\\u540C\\u7684\\u903B\\u8F91\\u3002\nsettings.manualScannerDescriptionSupplement= \\u540C HighlightProblemListener\\uFF0C\\u4F46\\u53EF\\u4EE5\\u5E2E\\u52A9\\u5904\\u7406\\u5927\\u6587\\u4EF6\\u4E2D\\u7684\\u653E\\u6162\\u901F\\u5EA6\\u3002\nsettings.manualScannerDelayLabel=ManualScanner \\u4EE5\\u6BEB\\u79D2\\u4E3A\\u5355\\u4F4D\\u7684\\u5EF6\\u8FDF\nsettings.manualScannerDelayTooltip=\\u624B\\u52A8\\u626B\\u63CF\\u95F4\\u7684\\u5EF6\\u8FDF\\uFF0C\\u4EC5\\u5728\\u542F\\u7528 ManualScanner \\u65F6\\u4F7F\\u7528\nsettings.inlaySizeDelta=\\u5b57\\u4f53\\u5927\\u5c0f\\u5dee\\u5f02\nsettings.inlaySizeDeltaTooltip=\\u7528\\u4e8e\\u4e3a\\u6807\\u7b7e\\u8bbe\\u7f6e\\u8f83\\u5c0f\\u7684\\u5b57\\u4f53\\uff0c\\u5fc5\\u987b\\u5c0f\\u4e8e\\u7f16\\u8f91\\u5668\\u5b57\\u4f53\\u5927\\u5c0f\nsettings.problemFilterListLabel=\\u95ee\\u9898\\u8fc7\\u6ee4\\u5217\\u8868\nsettings.problemFilterListTooltip=\\u4e0d\\u5904\\u7406\\u7684\\u95ee\\u9898\\u6587\\u672c\\u5f00\\u5934\\u7684\\u7528\\u5206\\u53f7\\u5206\\u9694\\u7684\\u5217\\u8868\nsettings.submenu.colors=\\u989C\\u8272\nsettings.errorTextColor=\\u9519\\u8BEF\\u6587\\u672C\\u989C\\u8272\\uFF1A\nsettings.errorLabelBorderColor=\\u9519\\u8BEF\\u6807\\u7B7E\\u8FB9\\u6846\\u989C\\u8272\\uFF1A\nsettings.errorLineHighlightColor=\\u9519\\u8BEF\\u884C\\u7A81\\u51FA\\u663E\\u793A\\u989C\\u8272\\uFF1A\nsettings.additionalSeverities=\\u9644\\u52A0\\u4E25\\u91CD\\u6027\\uFF1A\nsettings.additionalSeveritiesErrorDesc=\\u9644\\u52A0\\u9519\\u8BEF\\u4E25\\u91CD\\u6027\\u7684\\u7528\\u5206\\u53F7\\u5206\\u9694\\u7684\\u5217\\u8868\\uFF0C\\u4F8B\\u5982 '10, 100'\nsettings.warningTextColor=\\u8B66\\u544A\\u6587\\u672C\\u989C\\u8272\\uFF1A\nsettings.warningLabelBorderColor=\\u8B66\\u544A\\u6807\\u7B7E\\u8FB9\\u6846\\u989C\\u8272\\uFF1A\nsettings.warningLineHighlightColor=\\u8B66\\u544A\\u884C\\u7A81\\u51FA\\u663E\\u793A\\u989C\\u8272\\uFF1A\nsettings.additionalSeveritiesWarningDesc=\\u9644\\u52A0\\u8B66\\u544A\\u4E25\\u91CD\\u6027\\u7684\\u7528\\u5206\\u53F7\\u5206\\u9694\\u7684\\u5217\\u8868\\uFF0C\\u4F8B\\u5982 '10, 100'\nsettings.weakWarningTextColor=\\u8F7B\\u5F31\\u8B66\\u544A\\u6587\\u672C\\u989C\\u8272\\uFF1A\nsettings.weakWarningLabelBorderColor=\\u8F7B\\u5F31\\u8B66\\u544A\\u6807\\u7B7E\\u8FB9\\u6846\\u989C\\u8272\\uFF1A\nsettings.weakWarningLineHighlightColor=\\u8F7B\\u5F31\\u8B66\\u544A\\u884C\\u7A81\\u51FA\\u663E\\u793A\\u989C\\u8272\\uFF1A\nsettings.additionalSeveritiesWeakWarningDesc=\\u9644\\u52A0\\u8F7B\\u5F31\\u8B66\\u544A\\u4E25\\u91CD\\u6027\\u7684\\u7528\\u5206\\u53F7\\u5206\\u9694\\u7684\\u5217\\u8868\\uFF0C\\u4F8B\\u5982 '10, 100'\nsettings.infoTextColor=\\u4FE1\\u606F\\u6587\\u672C\\u989C\\u8272\\uFF1A\nsettings.infoLabelBorderColor=\\u4FE1\\u606F\\u6807\\u7B7E\\u8FB9\\u6846\\u989C\\u8272\\uFF1A\nsettings.infoLineHighlightColor=\\u4FE1\\u606F\\u884C\\u7A81\\u51FA\\u663E\\u793A\\u989C\\u8272\\uFF1A\nsettings.additionalSeveritiesInfoDesc=\\u9644\\u52A0\\u4FE1\\u606F\\u4E25\\u91CD\\u6027\\u7684\\u7528\\u5206\\u53F7\\u5206\\u9694\\u7684\\u5217\\u8868\\uFF0C\\u4F8B\\u5982 '10, 100'\nsettings.forceProblemsInOneLine=\\u5F3A\\u5236\\u5728\\u540C\\u4E00\\u884C\\u663E\\u793A\\u95EE\\u9898\\uFF0C\\u5373\\u4F7F\\u5B83\\u4EEC\\u592A\\u957F\\u800C\\u65E0\\u6CD5\\u9002\\u5E94\nsettings.useEditorFont=\\u4F7F\\u7528\\u7F16\\u8F91\\u5668\\u5B57\\u4F53\\u800C\\u4E0D\\u662F\\u63D0\\u793A\\u5B57\\u4F53\nsettings.showOnlyHighestPerLine=\\u4ec5\\u663e\\u793a\\u6bcf\\u884c\\u4e2d\\u6700\\u4e25\\u91cd\\u7684\\u95ee\\u9898\nsettings.enableHtmlStripping=Enable stripping of HTML in the messages\nsettings.enableXmlUnescaping=Enable unescaping of XML in the messages\nsettings.enableClickableContext=Enable clickable inline problems for IDE context actions", "patch": "--- a/src/main/resources/messages/SettingsBundle_zh_CN.properties\n+++ b/src/main/resources/messages/SettingsBundle_zh_CN.properties\n@@ -51,3 +51,4 @@\n settings.showOnlyHighestPerLine=\\u4ec5\\u663e\\u793a\\u6bcf\\u884c\\u4e2d\\u6700\\u4e25\\u91cd\\u7684\\u95ee\\u9898\n settings.enableHtmlStripping=Enable stripping of HTML in the messages\n settings.enableXmlUnescaping=Enable unescaping of XML in the messages\n+settings.enableClickableContext=Enable clickable inline problems for IDE context actions"}], "agent_initiated": false, "agent_signals": null, "author_type": "human", "reviewer_types": ["human", "human"], "interaction_type": "human_human", "takeover_events": [], "first_human_takeover_ts": null, "merged_with_unresolved": false, "candidate_issues": [], "link_confidence": "explicit", "thread_chains": [{"thread_id": "PRRT_kwDOImWGlc5O50JD", "root_comment_id": "PRRC_kwDOImWGlc56_tKN", "spans_rounds": [1], "comment_sequence": ["PRRC_kwDOImWGlc56_tKN"], "escalated": false}], "author_self_reviewed": false, "fully_agent_authored": false, "requested_reviewers": [{"login_or_team": "0verEngineer", "kind": "user", "created_at": "2025-04-29T16:52:04Z"}], "review_request_removed": [], "reviewer_was_requested": true, "merged_by": "0verEngineer", "merge_commit_oid": "86fbdd78f2ca8d1b85d0b22803233e17ef712d91", "merged_by_is_author": false, "maintainer_override": false, "referenced_file_contents": {}, "repo_is_fork": null, "repo_parent": null, "repo_collaborator_count": null, "hours_to_first_review": 19.724444444444444, "median_response_latency_hours": 20.112222222222222, "reviewer_count": 1, "merged_by_association": null, "n_commits": 2, "n_human_commits": 2, "n_agent_commits": 0, "n_bot_commits": 0, "agent_commit_ratio": 0.0, "repo_metadata": {"full_name": "0verEngineer/InlineProblems", "owner": "0verEngineer", "name": "InlineProblems", "stars": 76, "language": "Java", "license": "gpl-3.0", "topics": [], "description": "Plugin to show problems inside the text editor for IDEs based on the IntelliJ Platform", "url": "https://github.com/0verEngineer/InlineProblems", "default_branch": "main", "open_issues": 10, "forks": 8, "discovered_via": "license:gpl-3.0 language:Java stars:51..200 created:2017-01-16..2026-02-01 archived:false", "created_at": "2022-12-11T22:31:25Z", "pr_total_count": 56, "issue_total_count": 40, "primary_language": "Java", "language_bytes": {}}, "conversation_comments": []}