diff --git a/README.md b/README.md index beb717cc8b..189ccda52a 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ -SonarLint IntelliJ Plugin +SonarQube for IntelliJ Plugin ========================= [![Build Status](https://api.cirrus-ci.com/github/SonarSource/sonarlint-intellij.svg?branch=master)](https://cirrus-ci.com/github/SonarSource/sonarlint-intellij) [![Quality Gate](https://next.sonarqube.com/sonarqube/api/project_badges/measure?project=org.sonarsource.sonarlint.intellij%3Asonarlint-intellij&metric=alert_status)](https://next.sonarqube.com/sonarqube/dashboard?id=org.sonarsource.sonarlint.intellij%3Asonarlint-intellij) -SonarLint is an IDE extension that supports you in writing [Clean Code](https://www.sonarsource.com/solutions/clean-code/), by detecting and helping you fix quality issues as you type. See documentation details for [Clean Code](https://docs.sonarsource.com/sonarlint/intellij/concepts/clean-code/). -Like a spell checker, SonarLint squiggles flaws so they can be fixed before committing code. +SonarQube for IntelliJ is an IDE extension that supports you in writing [Clean Code](https://www.sonarsource.com/solutions/clean-code/), by +detecting and helping you fix quality issues as you type. See documentation details +for [Clean Code](https://docs.sonarsource.com/sonarlint/intellij/concepts/clean-code/). +Like a spell checker, SonarQube for IntelliJ squiggles flaws so they can be fixed before committing code. Useful links ------------ @@ -18,14 +20,18 @@ Useful links How to install -------------- -You can install SonarLint from the [JetBrains Plugin Repository](https://plugins.jetbrains.com/plugin/7973-sonarlint), directly available in the IDE preferences. +You can install SonarQube for IntelliJ from the [JetBrains Plugin Repository](https://plugins.jetbrains.com/plugin/7973-sonarlint), directly +available in the IDE preferences. Full up-to-date details are available on the [Requirements](https://docs.sonarsource.com/sonarlint/intellij/getting-started/requirements/) and [Installation](https://docs.sonarsource.com/sonarlint/intellij/getting-started/installation/) pages. Questions and Feedback? -------------------------- -For SonarLint support questions ("How do I?", "I got this error, why?", ...), please first read the [FAQ](https://community.sonarsource.com/t/frequently-asked-questions/7204) to learn how to get your logs, and then head to the [SonarSource forum](https://community.sonarsource.com/c/help/sl). Before creating a new topic, please check if your question has already been answered because there is a chance that someone has already had the same issue. +For SonarQube for IntelliJ support questions ("How do I?", "I got this error, why?", ...), please first read +the [FAQ](https://community.sonarsource.com/t/frequently-asked-questions/7204) to learn how to get your logs, and then head to +the [Sonar forum](https://community.sonarsource.com/c/help/sl). Before creating a new topic, please check if your question has already been +answered because there is a chance that someone has already had the same issue. Be aware that this forum is a community, and the standard pleasantries are expected (_Hello, Thank you, I appreciate the reply, etc._). If you don't get an answer to your thread, you should sit on your hands for at least three days before bumping it. Operators are not standing by, but the Teams and Community Managers know that your questions are important. :-) @@ -61,7 +67,7 @@ How to run UI tests ./gradlew :its:runIdeForUiTests & -The above will start an IDE instance with the SonarLint plugin. Wait for the UI robot server to start, then run the ITs: +The above will start an IDE instance with the SonarQube for IntelliJ plugin. Wait for the UI robot server to start, then run the ITs: ./gradlew :its:check @@ -85,7 +91,8 @@ How to debug UI tests If you want to debug what happens on the test side, you can simply launch the test in debug mode from the IDE. -If you want to debug what happens in the SonarLint plugin, you can open the project in IntelliJ, and run the `its:runIdeForUiTests` task in debug mode (for example from the Gradle panel on the right). +If you want to debug what happens in the SonarQube for IntelliJ plugin, you can open the project in IntelliJ, and run the +`its:runIdeForUiTests` task in debug mode (for example from the Gradle panel on the right). How to debug SLOOP diff --git a/docs/contributing.md b/docs/contributing.md index 5de9588064..cbd579b13e 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -3,10 +3,11 @@ Contributing If you would like to see a new feature, please create a new thread in the forum ["Suggest new features"](https://community.sonarsource.com/c/suggestions/features). -Please be aware that we are not actively looking for feature contributions. The truth is that it's extremely difficult for someone outside SonarSource to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes. +Please be aware that we are not actively looking for feature contributions. The truth is that it's extremely difficult for someone outside +Sonar to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes. With that in mind, if you would like to submit a code contribution, please create a pull request for this repository. Please explain your motives to contribute this change: what problem you are trying to fix, what improvement you are trying to make. Make sure that you follow our [code style](https://github.com/SonarSource/sonar-developer-toolset#code-style) and all tests are passing. -Thank You! The SonarSource Team +Thank You! The Sonar Team diff --git a/its/build.gradle.kts b/its/build.gradle.kts index a6da18305c..522b1b0f2b 100644 --- a/its/build.gradle.kts +++ b/its/build.gradle.kts @@ -39,8 +39,8 @@ tasks.test { useJUnitPlatform { val tag = System.getenv("TEST_SUITE") - if (tag != null && (tag.equals("OpenInIdeTests") || tag.equals("ConnectedAnalysisTests") - || tag.equals("ConfigurationTests") || tag.equals("Standalone")) + if (tag != null && (tag == "OpenInIdeTests" || tag == "ConnectedAnalysisTests" + || tag == "ConfigurationTests" || tag == "Standalone") ) { includeTags(tag) } @@ -58,7 +58,6 @@ tasks.downloadRobotServerPlugin { } val ijVersion: String by project -val intellijBuildVersion: String by project intellij { if (project.hasProperty("ijVersion")) { diff --git a/its/src/main/resources/META-INF/plugin.xml b/its/src/main/resources/META-INF/plugin.xml index 080c1f861f..65af10aeda 100644 --- a/its/src/main/resources/META-INF/plugin.xml +++ b/its/src/main/resources/META-INF/plugin.xml @@ -24,7 +24,7 @@ SonarLint-ITs 1.0 SonarSource - Fake Plugin To Run SonarLint UI tests with multiple flavors + Fake Plugin To Run SonarQube for IntelliJ UI tests with multiple flavors diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/BaseUiTest.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/BaseUiTest.kt index d9da3a927c..146d0f8408 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/BaseUiTest.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/BaseUiTest.kt @@ -111,9 +111,9 @@ open class BaseUiTest { closeAllDialogs() optionalStep { sonarlintLogPanel { - println("SonarLint log outputs:") + println("SonarQube for IntelliJ log outputs:") println(console().text) - toolBarButton("Clear SonarLint Console").click() + toolBarButton("Clear SonarQube for IntelliJ Console").click() } } if (remoteRobot.isCLion()) { @@ -157,7 +157,7 @@ open class BaseUiTest { private fun sonarlintLogPanel(function: TabContentFixture.() -> Unit = {}) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Log") { select() } content("SonarLintLogPanel") { diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/fixtures/IdeaFrame.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/fixtures/IdeaFrame.kt index d1c0b1bf75..54437cb473 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/fixtures/IdeaFrame.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/fixtures/IdeaFrame.kt @@ -109,7 +109,7 @@ class IdeaFrame(remoteRobot: RemoteRobot, remoteComponent: RemoteComponent) : Co fun IdeaFrame.analyzeFile() { editorComponent().rightClick() - actionMenuItem("Analyze with SonarLint") { + actionMenuItem("Analyze with SonarQube for IntelliJ") { click() } } diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/ConnectedAnalysisTests.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/ConnectedAnalysisTests.kt index 7a9ccd408f..424c11298c 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/ConnectedAnalysisTests.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/ConnectedAnalysisTests.kt @@ -203,7 +203,7 @@ class ConnectedAnalysisTests : BaseUiTest() { "Change this code to not construct SQL queries directly from user-controlled data." ) enableConnectedModeFromTaintPanel(TAINT_VULNERABILITY_PROJECT_KEY, false, "Orchestrator") - verifyTaintTabContainsMessages("The project is not bound to SonarCloud/SonarQube") + verifyTaintTabContainsMessages("The project is not bound to SonarQube (Server, Cloud)") } @Test diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/CurrentFileTabTests.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/CurrentFileTabTests.kt index a837568bbb..38afc3f4be 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/CurrentFileTabTests.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/CurrentFileTabTests.kt @@ -37,7 +37,7 @@ class CurrentFileTabTests { fun verifyCurrentFileShowsCard(expectedClass: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() assertThat(findCard(expectedClass)).isNotNull } @@ -46,11 +46,11 @@ class CurrentFileTabTests { } fun changeStatusOnSonarQubeAndPressChange(status: String) { - changeStatusAndPressChange("Mark Issue as Resolved on SonarQube", status) + changeStatusAndPressChange("Mark Issue as Resolved on SonarQube Server", status) } fun changeStatusOnSonarCloudAndPressChange(status: String) { - changeStatusAndPressChange("Mark Issue as Resolved on SonarCloud", status) + changeStatusAndPressChange("Mark Issue as Resolved on SonarQube Cloud", status) } private fun changeStatusAndPressChange(windowTitle: String, status: String) { @@ -81,7 +81,7 @@ class CurrentFileTabTests { with(remoteRobot) { idea { notification("The issue was successfully marked as resolved") - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { content("CurrentFilePanel") { hasText("No issues found in the current opened file") } @@ -93,7 +93,7 @@ class CurrentFileTabTests { fun openIssueReviewDialogFromList(issueMessage: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } findText(issueMessage).rightClick() @@ -108,7 +108,7 @@ class CurrentFileTabTests { fun verifyCurrentFileTabContainsMessages(vararg expectedMessages: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } content("CurrentFilePanel") { @@ -127,7 +127,7 @@ class CurrentFileTabTests { fun clickCurrentFileIssue(issueMessage: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } content("CurrentFilePanel") { @@ -140,11 +140,11 @@ class CurrentFileTabTests { fun enableConnectedModeFromCurrentFilePanel(projectKey: String?, enabled: Boolean, connectionName: String) { optionalIdeaFrame()?.apply { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } content("CurrentFilePanel") { - toolBarButton("Configure SonarLint").click() + toolBarButton("Configure SonarQube for IntelliJ").click() } } if (enabled) { @@ -158,7 +158,7 @@ class CurrentFileTabTests { fun verifyCurrentFileRuleDescriptionTabContains(expectedMessage: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() content("CurrentFilePanel") { waitFor(Duration.ofMinutes(1), errorMessage = "Unable to find '$expectedMessage' in: ${findAllText()}") { diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/OpenInIdeTests.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/OpenInIdeTests.kt index cf27f84513..35be2ff2ee 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/OpenInIdeTests.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/OpenInIdeTests.kt @@ -39,8 +39,8 @@ class OpenInIdeTests { fun createConnection(token: String) { with(remoteRobot) { idea { - dialog("Trust This SonarQube Server?") { - button("Connect to This SonarQube Server").click() + dialog("Trust This SonarQube Server Instance?") { + button("Connect to This SonarQube Server Instance").click() } dialog("New Connection: Server Details") { keyboard { enterText("Orchestrator") } @@ -63,9 +63,9 @@ class OpenInIdeTests { fun acceptNewAutomatedConnection() { with(remoteRobot) { idea { - dialog("Trust This SonarQube Server?") { + dialog("Trust This SonarQube Server Instance?") { jbTextFields()[1].text = "Orchestrator" - buttonContainsText("Connect to This SonarQube").click() + buttonContainsText("Connect to This SonarQube Server Instance").click() } } } @@ -74,9 +74,9 @@ class OpenInIdeTests { fun acceptNewSCAutomatedConnection() { with(remoteRobot) { idea { - dialog("Trust This SonarCloud Organization?") { + dialog("Trust This SonarQube Cloud Organization?") { jbTextFields()[1].text = "sonarlint-it" - buttonContainsText("Connect to This SonarCloud Organization").click() + buttonContainsText("Connect to This SonarQube Cloud Organization").click() } } } diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/ReportTabTests.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/ReportTabTests.kt index d7d129c372..3951bf75a9 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/ReportTabTests.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/ReportTabTests.kt @@ -31,7 +31,7 @@ class ReportTabTests { with(remoteRobot) { idea { analyzeFile() - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() content("ReportPanel") { expectedMessages.forEach { assertThat(hasText(it)).isTrue() } diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SecurityHotspotTabTests.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SecurityHotspotTabTests.kt index 7609a10f8a..3340ea92b9 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SecurityHotspotTabTests.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SecurityHotspotTabTests.kt @@ -36,7 +36,7 @@ class SecurityHotspotTabTests { fun openSecurityHotspotReviewDialogFromList(securityHotspotMessage: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Security Hotspots") { select() } content("SecurityHotspotTree") { @@ -53,7 +53,7 @@ class SecurityHotspotTabTests { fun changeSecurityHotspotStatusAndPressChange(status: String) { with(remoteRobot) { idea { - dialog("Change Security Hotspot Status on SonarQube") { + dialog("Change Security Hotspot Status on SonarQube Server") { content(status) { click() } @@ -67,7 +67,7 @@ class SecurityHotspotTabTests { with(remoteRobot) { idea { notification("The Security Hotspot status was successfully updated") - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { content("SecurityHotspotsPanel") { hasText("No Security Hotspots shown due to the current filtering") } @@ -79,7 +79,7 @@ class SecurityHotspotTabTests { fun verifySecurityHotspotTabContainsMessages(vararg expectedMessages: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Security Hotspots") { select() } content("SecurityHotspotsPanel") { @@ -93,7 +93,7 @@ class SecurityHotspotTabTests { fun verifySecurityHotspotTreeContainsMessages(vararg expectedMessages: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Security Hotspots") { select() } content("SecurityHotspotTree") { @@ -107,11 +107,11 @@ class SecurityHotspotTabTests { fun enableConnectedModeFromSecurityHotspotPanel(projectKey: String, enabled: Boolean, connectionName: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Security Hotspots") { select() } content("SecurityHotspotsPanel") { - toolBarButton("Configure SonarLint").click() + toolBarButton("Configure SonarQube for IntelliJ").click() } } if (enabled) { @@ -126,7 +126,7 @@ class SecurityHotspotTabTests { fun verifySecurityHotspotRuleDescriptionTabContains(expectedMessage: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() content("SecurityHotspotsPanel") { waitFor(Duration.ofMinutes(1), errorMessage = "Unable to find '$expectedMessage' in: ${findAllText()}") { diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SharedConfigurationTests.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SharedConfigurationTests.kt index e1b456015e..e3e9f923d4 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SharedConfigurationTests.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SharedConfigurationTests.kt @@ -45,9 +45,9 @@ class SharedConfigurationTests { with(remoteRobot) { idea { notificationByActionName("Use configuration").click() - dialog("Connect to This SonarQube Server?") { + dialog("Connect to This SonarQube Server Instance?") { jBPasswordField().text = token - buttonContainsText("Connect to This SonarQube").click() + buttonContainsText("Connect to This SonarQube Server Instance").click() } } } diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/TaintVulnerabilityTests.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/TaintVulnerabilityTests.kt index 1c375bc929..f40d0ad055 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/TaintVulnerabilityTests.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/TaintVulnerabilityTests.kt @@ -32,7 +32,7 @@ class TaintVulnerabilityTests { fun verifyTaintTabContainsMessages(vararg expectedMessages: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Taint Vulnerabilities") { select() } content("TaintVulnerabilitiesPanel") { @@ -48,11 +48,11 @@ class TaintVulnerabilityTests { fun enableConnectedModeFromTaintPanel(projectKey: String, enabled: Boolean, connectionName: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Taint Vulnerabilities") { select() } content("TaintVulnerabilitiesPanel") { - toolBarButton("Configure SonarLint").click() + toolBarButton("Configure SonarQube for IntelliJ").click() } } if (enabled) { diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/flavor/PLSLQTest.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/flavor/PLSLQTest.kt index ed0036f178..bd85063b93 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/flavor/PLSLQTest.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/flavor/PLSLQTest.kt @@ -64,7 +64,7 @@ class PLSQLTest : BaseUiTest() { private fun verifyIssueTreeContainsMessages() { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } // the synchronization can take a while to happen diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ExclusionUtils.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ExclusionUtils.kt index ba384b613a..af820a5cc2 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ExclusionUtils.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ExclusionUtils.kt @@ -47,11 +47,11 @@ class ExclusionUtils { private fun openExclusionsTab() { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } content("CurrentFilePanel") { - toolBarButton("Configure SonarLint").click() + toolBarButton("Configure SonarQube for IntelliJ").click() } selectExclusionTab() } @@ -88,7 +88,7 @@ class ExclusionUtils { dialog("Project Settings") { findText("File Exclusions").click() actionButtons(ActionButtonFixture.byType())[0].clickWhenEnabled() - dialog("Add SonarLint File Exclusion") { + dialog("Add SonarQube for IntelliJ File Exclusion") { jbTextFieldsWithBrowseButton()[0].click() keyboard { enterText(fileName) } waitFor(Duration.ofSeconds(1)) { diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/FiltersUtils.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/FiltersUtils.kt index 71dd84801c..2039978900 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/FiltersUtils.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/FiltersUtils.kt @@ -38,7 +38,7 @@ class FiltersUtils { fun setFocusOnNewCode(focusOnNewCode: Boolean) { optionalIdeaFrame()?.apply { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } content("CurrentFilePanel") { @@ -56,7 +56,7 @@ class FiltersUtils { fun showResolvedIssues() { with(BaseUiTest.remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } content("CurrentFilePanel") { diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ProjectBindingUtils.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ProjectBindingUtils.kt index 2070cd1df1..3b5964d452 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ProjectBindingUtils.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ProjectBindingUtils.kt @@ -42,7 +42,7 @@ class ProjectBindingUtils { with(remoteRobot) { idea { dialog("Project Settings") { - checkBox("Bind project to SonarCloud / SonarQube").unselect() + checkBox("Bind project to SonarQube (Server, Cloud)").unselect() if (isRider()) { button("Save").click() } else { @@ -57,7 +57,7 @@ class ProjectBindingUtils { with(remoteRobot) { idea { dialog("Project Settings") { - checkBox("Bind project to SonarCloud / SonarQube").select() + checkBox("Bind project to SonarQube (Server, Cloud)").select() comboBox("Connection:").click() remoteRobot.find(byXpath("//div[@class='CustomComboPopup']")).apply { waitFor(Duration.ofSeconds(5)) { hasText(connectionName) } @@ -75,9 +75,9 @@ class ProjectBindingUtils { fun bindProjectAndModuleInFileSettings() { sonarLintGlobalSettings { tree { - clickPath("Tools", "SonarLint", "Project Settings") + clickPath("Tools", "SonarQube for IntelliJ", "Project Settings") } - checkBox("Bind project to SonarCloud / SonarQube").select() + checkBox("Bind project to SonarQube (Server, Cloud)").select() pressOk() errorMessage("Connection should not be empty") @@ -100,7 +100,7 @@ class ProjectBindingUtils { pressOk() errorMessage("Project key for module 'sample-scala-module' should not be empty") buttons(JButtonFixture.byText("Search in list\u2026"))[1].click() - dialog("Select SonarQube Project To Bind") { + dialog("Select SonarQube Server Project To Bind") { jList { clickItem(MODULE_PROJECT_KEY, false) } diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/SettingsUtils.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/SettingsUtils.kt index 35e139e974..1bee351899 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/SettingsUtils.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/SettingsUtils.kt @@ -46,14 +46,14 @@ class SettingsUtils { Pause.pause(3000) // Search for SonarLint because sometimes it is off the screen - search("SonarLint") + search("SonarQube for IntelliJ") tree { waitUntilLoaded() // little trick to check if the search has been applied waitFor(Duration.ofSeconds(10), Duration.ofSeconds(1)) { collectRows().size in 1..10 } Pause.pause(1000) - clickPath("Tools", "SonarLint") + clickPath("Tools", "SonarQube for IntelliJ") } // let the SonarLint view settle (sometimes the UI thread blocks for a few seconds) diff --git a/src/main/java/org/sonarlint/intellij/SonarLintIcons.kt b/src/main/java/org/sonarlint/intellij/SonarLintIcons.kt index 9494651c1a..22d2b703e2 100644 --- a/src/main/java/org/sonarlint/intellij/SonarLintIcons.kt +++ b/src/main/java/org/sonarlint/intellij/SonarLintIcons.kt @@ -31,30 +31,31 @@ import org.sonarsource.sonarlint.core.rpc.protocol.common.RuleType object SonarLintIcons { @JvmField - val ICON_SONARQUBE = getIcon("/images/SonarQube.png") + val ICON_SONARQUBE_SERVER = getIcon("/images/sonarqube_server.png") @JvmField - val ICON_SONARCLOUD = getIcon("/images/SonarCloud.png") + val ICON_SONARQUBE_CLOUD = getIcon("/images/sonarqube_cloud.png") @JvmField - val ICON_SONARQUBE_16 = getIcon("/images/onde-sonar-16.png") + val ICON_SONARQUBE_SERVER_16 = getIcon("/images/sonarqube_server_16px.svg") @JvmField - val ICON_SONARCLOUD_16 = getIcon("/images/sonarcloud-16.png") + val ICON_SONARQUBE_CLOUD_16 = getIcon("/images/sonarqube_cloud_16px.svg") @JvmField - val SONARLINT_TOOLWINDOW = getIcon("/images/sonarlintToolWindow.svg") + val SONARQUBE_FOR_INTELLIJ_13PX = getIcon("/images/sonarqube_for_intellij_13px.svg") @JvmField - val SONARLINT_ACTION = getIcon("/images/sonarlintAction.svg") + val SONARQUBE_FOR_INTELLIJ_RED_13PX = getIcon("/images/sonarqube_for_intellij_red_13px.svg") @JvmField - val SONARLINT_ACTION_12PX = getIcon("/images/sonarlintAction_12px.svg") + val SONARQUBE_FOR_INTELLIJ_GREEN_13PX = getIcon("/images/sonarqube_for_intellij_green_13px.svg") @JvmField - val SONARLINT_ACTION_GREEN_12PX = getIcon("/images/sonarlintAction_green_12px.svg") + val SONARQUBE_FOR_INTELLIJ_ORANGE_13PX = getIcon("/images/sonarqube_for_intellij_orange_13px.svg") @JvmField - val SONARLINT_ACTION_ORANGE_12PX = getIcon("/images/sonarlintAction_orange_12px.svg") + val SONARQUBE_FOR_INTELLIJ_TOOLWINDOW = getIcon("/images/sonarqube_for_intellij_toolwindow.svg") + @JvmField - val SONARLINT_TOOLWINDOW_EMPTY = getIcon("/images/sonarlintToolWindowEmpty.svg") + val SONARQUBE_FOR_INTELLIJ_EMPTY_TOOLWINDOW = getIcon("/images/sonarqube_for_intellij_empty_toolwindow.svg") @JvmField - val SONARLINT = getIcon("/images/sonarlint.png") + val SONARQUBE_FOR_INTELLIJ = getIcon("/images/sonarqube_for_intellij.svg") @JvmField - val SONARLINT_32 = getIcon("/images/sonarlint@2x.png") + val SONARQUBE_FOR_INTELLIJ_32PX = getIcon("/images/sonarqube_for_intellij_32px.svg") @JvmField val PLAY = getIcon("/images/execute.png") @JvmField diff --git a/src/main/java/org/sonarlint/intellij/SonarLintIntelliJClient.kt b/src/main/java/org/sonarlint/intellij/SonarLintIntelliJClient.kt index 04e48cad3f..1fb562d435 100644 --- a/src/main/java/org/sonarlint/intellij/SonarLintIntelliJClient.kt +++ b/src/main/java/org/sonarlint/intellij/SonarLintIntelliJClient.kt @@ -193,10 +193,12 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate { private fun getAutoShareConfigParams(uniqueSuggestion: ConnectionSuggestionDto): Triple { return if (uniqueSuggestion.connectionSuggestion.isRight) { - Triple("SonarCloud organization", uniqueSuggestion.connectionSuggestion.right.projectKey, + Triple( + "SonarQube Cloud organization", uniqueSuggestion.connectionSuggestion.right.projectKey, uniqueSuggestion.connectionSuggestion.right.organization) } else { - Triple("SonarQube server", uniqueSuggestion.connectionSuggestion.left.projectKey, + Triple( + "SonarQube Server instance", uniqueSuggestion.connectionSuggestion.left.projectKey, uniqueSuggestion.connectionSuggestion.left.serverUrl) } } @@ -415,13 +417,13 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate { if (isSQ) { setUpManualConnection(serverOrOrg) } else { - throw CancellationException("SonarLint cannot assist with manual connection to SonarCloud organization") + throw CancellationException("SonarQube for IntelliJ cannot assist with manual connection to SonarQube Cloud organization") } } projectLessNotification( "", - "You have successfully established a connection to the ${if (isSQ) "SonarQube server" else "SonarCloud organization"}", + "You have successfully established a connection to the ${if (isSQ) "SonarQube Server instance" else "SonarQube Cloud organization"}", NotificationType.INFORMATION ) @@ -438,13 +440,13 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate { } private fun setUpManualConnection(serverUrl: String): AssistCreatingConnectionResponse { - val warningTitle = "Trust This SonarQube Server?" + val warningTitle = "Trust This SonarQube Server Instance?" val message = """ - The server ${StringEscapeUtils.escapeHtml4(serverUrl)} is attempting to set up a connection with SonarLint. Letting SonarLint connect to an untrusted SonarQube server is potentially dangerous. + The server ${StringEscapeUtils.escapeHtml4(serverUrl)} is attempting to set up a connection with SonarQube for IntelliJ. Letting SonarQube for IntelliJ connect to an untrusted SonarQube Server instance is potentially dangerous. If you don’t trust this server, we recommend canceling this action and manually setting up Connected Mode. """.trimIndent() - val connectButtonText = "Connect to This SonarQube Server" + val connectButtonText = "Connect to This SonarQube Server Instance" val dontTrustButtonText = "I Don't Trust This Server" val choice = ApplicationManager.getApplication().computeInEDT { @@ -480,8 +482,8 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate { getService(project, ProjectBindingManager::class.java).bindTo(connection, projectKey, emptyMap(), mode) get(project).simpleNotification( "Project successfully bound", - "Local project bound to project '$projectKey' of SonarQube server '${connection.name}'. " - + "You can now enjoy all capabilities of SonarLint Connected Mode. The binding of this project can be updated in the SonarLint Settings.", + "Local project bound to project '$projectKey' of SonarQube Server instance '${connection.name}'. " + + "You can now enjoy all capabilities of SonarQube for IntelliJ Connected Mode. The binding of this project can be updated in the SonarQube for IntelliJ Settings.", NotificationType.INFORMATION, OpenInBrowserAction("Learn More in Documentation", null, CONNECTED_MODE_BENEFITS_LINK) ) @@ -577,10 +579,10 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate { } override fun noBindingSuggestionFound(params: NoBindingSuggestionFoundParams) { - val serverType = if (params.isSonarCloud) "SonarCloud" else "SonarQube" + val serverType = if (params.isSonarCloud) "SonarQube Cloud" else "SonarQube Server" projectLessNotification( "No matching open project found", - "IntelliJ cannot match $serverType project '${params.projectKey}' to any of the currently open projects. Please open your project and try again.", + "SonarQube for IntelliJ cannot match $serverType project '${params.projectKey}' to any of the currently open projects. Please open your project and try again.", NotificationType.WARNING, OpenInBrowserAction("Open Troubleshooting Documentation", null, TROUBLESHOOTING_CONNECTED_MODE_SETUP_LINK) ) @@ -655,7 +657,7 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate { getService( module.project, SonarLintConsole::class.java - ).debug("Several candidate Vcs repositories detected for module $module, choosing first") + ).debug("Several candidate VCS repositories detected for module $module, choosing first") } return repositories } @@ -671,7 +673,7 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate { getService( project, SonarLintConsole::class.java - ).debug("Several candidate Vcs repositories detected for project $project, choosing first") + ).debug("Several candidate VCS repositories detected for project $project, choosing first") } return repositories } diff --git a/src/main/java/org/sonarlint/intellij/actions/DisableRuleAction.java b/src/main/java/org/sonarlint/intellij/actions/DisableRuleAction.java index 1ef9b2a813..600c73c290 100644 --- a/src/main/java/org/sonarlint/intellij/actions/DisableRuleAction.java +++ b/src/main/java/org/sonarlint/intellij/actions/DisableRuleAction.java @@ -36,7 +36,7 @@ public class DisableRuleAction extends AbstractSonarAction { public DisableRuleAction() { - super("Disable Rule", "Disable the SonarLint rule that activated this rule", AllIcons.Actions.Cancel); + super("Disable Rule", "Disable the SonarQube for IntelliJ rule that activated this rule", AllIcons.Actions.Cancel); } @Override diff --git a/src/main/java/org/sonarlint/intellij/actions/MarkAsResolvedAction.kt b/src/main/java/org/sonarlint/intellij/actions/MarkAsResolvedAction.kt index 0752dcd7b3..3a05cce552 100644 --- a/src/main/java/org/sonarlint/intellij/actions/MarkAsResolvedAction.kt +++ b/src/main/java/org/sonarlint/intellij/actions/MarkAsResolvedAction.kt @@ -63,8 +63,8 @@ class MarkAsResolvedAction( ), IntentionAction, PriorityAction, Iconable { companion object { - const val REVIEW_ISSUE_GROUP = "SonarLint: Mark Issue as Resolved" - private const val ERROR_TITLE = "SonarLint - Unable to mark the issue as resolved" + const val REVIEW_ISSUE_GROUP = "SonarQube for IntelliJ: Mark Issue as Resolved" + private const val ERROR_TITLE = "SonarQube for IntelliJ - Unable to mark the issue as resolved" private const val CONTENT = "The issue was successfully marked as resolved" fun canBeMarkedAsResolved(project: Project, issue: Issue): Boolean { @@ -194,7 +194,7 @@ class MarkAsResolvedAction( private fun confirm(project: Project, productName: String, issueStatus: IssueResolutionStatus): Boolean { return shouldSkipConfirmationDialog() || MessageDialogBuilder.okCancel( "Confirm marking issue as resolved", - "Are you sure you want to mark this issue as \"${issueStatus.title}\"? The status will be updated on $productName and synchronized with any contributor using SonarLint in connected mode" + "Are you sure you want to mark this issue as \"${issueStatus.title}\"? The status will be updated on $productName and synchronized with any contributor using SonarQube for IntelliJ in Connected Mode" ).yesText("Confirm").noText("Cancel").doNotAsk(DoNotShowAgain()).ask(project) } @@ -250,10 +250,10 @@ class MarkAsResolvedAction( override fun startInWriteAction() = false - override fun getText() = "SonarLint: Mark issue as\u2026" + override fun getText() = "SonarQube: Mark issue as\u2026" override fun getFamilyName(): String { - return "SonarLint mark issue as\u2026" + return "SonarQube mark issue as\u2026" } override fun isVisible(e: AnActionEvent): Boolean { diff --git a/src/main/java/org/sonarlint/intellij/actions/OpenIssueInBrowserAction.kt b/src/main/java/org/sonarlint/intellij/actions/OpenIssueInBrowserAction.kt index fdc25d4221..f88c448d27 100644 --- a/src/main/java/org/sonarlint/intellij/actions/OpenIssueInBrowserAction.kt +++ b/src/main/java/org/sonarlint/intellij/actions/OpenIssueInBrowserAction.kt @@ -34,7 +34,7 @@ import org.sonarlint.intellij.util.SonarLintAppUtils.findModuleForFile class OpenIssueInBrowserAction : AbstractSonarAction( "Open In Browser", - "Open issue in browser interface of SonarCloud or SonarQube", + "Open issue in browser interface of SonarQube (Server, Cloud)", null ) { diff --git a/src/main/java/org/sonarlint/intellij/actions/ReopenIssueAction.kt b/src/main/java/org/sonarlint/intellij/actions/ReopenIssueAction.kt index 5d20f4a6d4..6c8e06dcb4 100644 --- a/src/main/java/org/sonarlint/intellij/actions/ReopenIssueAction.kt +++ b/src/main/java/org/sonarlint/intellij/actions/ReopenIssueAction.kt @@ -53,7 +53,7 @@ class ReopenIssueAction(private var issue: LiveIssue? = null) : AbstractSonarAct PriorityAction, Iconable { companion object { - private const val ERROR_TITLE = "SonarLint - Unable to reopen the issue" + private const val ERROR_TITLE = "SonarQube for IntelliJ - Unable to reopen the issue" private const val CONTENT = "The issue was successfully reopened" fun canBeReopened(project: Project, issue: Issue): Boolean { @@ -114,7 +114,7 @@ class ReopenIssueAction(private var issue: LiveIssue? = null) : AbstractSonarAct private fun confirm(project: Project, productName: String): Boolean { return shouldSkipConfirmationDialogForReopening() || MessageDialogBuilder.okCancel( "Confirm reopening the issue", - "Are you sure you want to reopen this issue? The status will be updated on $productName and synchronized with any contributor using SonarLint in connected mode" + "Are you sure you want to reopen this issue? The status will be updated on $productName and synchronized with any contributor using SonarQube for IntelliJ in Connected Mode" ).yesText("Confirm").noText("Cancel").doNotAsk(DoNotShowAgain()).ask(project) } @@ -164,10 +164,10 @@ class ReopenIssueAction(private var issue: LiveIssue? = null) : AbstractSonarAct override fun startInWriteAction() = false - override fun getText() = "SonarLint: Reopen issue" + override fun getText() = "SonarQube: Reopen issue" override fun getFamilyName(): String { - return "SonarLint reopen issue" + return "SonarQube reopen issue" } override fun isVisible(e: AnActionEvent): Boolean { @@ -177,7 +177,7 @@ class ReopenIssueAction(private var issue: LiveIssue? = null) : AbstractSonarAct } override fun isAvailable(project: Project, editor: Editor?, file: PsiFile?): Boolean { - return issue?.let { canBeReopened(project, it) } ?: false + return issue?.let { canBeReopened(project, it) } == true } override fun invoke(project: Project, editor: Editor?, file: PsiFile?) { diff --git a/src/main/java/org/sonarlint/intellij/actions/RestartBackendAction.kt b/src/main/java/org/sonarlint/intellij/actions/RestartBackendAction.kt index 577fc7f902..15e3e189d5 100644 --- a/src/main/java/org/sonarlint/intellij/actions/RestartBackendAction.kt +++ b/src/main/java/org/sonarlint/intellij/actions/RestartBackendAction.kt @@ -23,10 +23,10 @@ import com.intellij.openapi.actionSystem.AnActionEvent import org.sonarlint.intellij.common.util.SonarLintUtils import org.sonarlint.intellij.core.BackendService -class RestartBackendAction : AbstractSonarAction("Restart SonarLint Service") { +class RestartBackendAction : AbstractSonarAction("Restart SonarQube for IntelliJ Service") { companion object { - const val SONARLINT_ERROR_MSG = "SonarLint service encountered an issue and has stopped working" + const val SONARLINT_ERROR_MSG = "SonarQube for IntelliJ service encountered an issue and has stopped working" } override fun actionPerformed(e: AnActionEvent) { diff --git a/src/main/java/org/sonarlint/intellij/actions/RestartBackendNotificationAction.kt b/src/main/java/org/sonarlint/intellij/actions/RestartBackendNotificationAction.kt index 0295cb3a25..b5a2ba1a1c 100644 --- a/src/main/java/org/sonarlint/intellij/actions/RestartBackendNotificationAction.kt +++ b/src/main/java/org/sonarlint/intellij/actions/RestartBackendNotificationAction.kt @@ -25,7 +25,7 @@ import com.intellij.openapi.actionSystem.AnActionEvent import org.sonarlint.intellij.common.util.SonarLintUtils import org.sonarlint.intellij.core.BackendService -class RestartBackendNotificationAction : NotificationAction("Restart SonarLint Service") { +class RestartBackendNotificationAction : NotificationAction("Restart SonarQube for IntelliJ Service") { override fun actionPerformed(e: AnActionEvent, notification: Notification) { notification.expire() diff --git a/src/main/java/org/sonarlint/intellij/actions/ReviewSecurityHotspotAction.kt b/src/main/java/org/sonarlint/intellij/actions/ReviewSecurityHotspotAction.kt index a0bb616549..dcd06008ca 100644 --- a/src/main/java/org/sonarlint/intellij/actions/ReviewSecurityHotspotAction.kt +++ b/src/main/java/org/sonarlint/intellij/actions/ReviewSecurityHotspotAction.kt @@ -55,8 +55,8 @@ class ReviewSecurityHotspotAction(private var serverFindingKey: String? = null, companion object { val SECURITY_HOTSPOT_KEY = DataKey.create("sonarlint_security_hotspot") - const val REVIEW_HOTSPOT_GROUP = "SonarLint: Security Hotspot Review" - private const val ERROR_TITLE = "SonarLint - Unable to review the Security Hotspot" + const val REVIEW_HOTSPOT_GROUP = "SonarQube for IntelliJ: Security Hotspot Review" + private const val ERROR_TITLE = "SonarQube for IntelliJ - Unable to review the Security Hotspot" private const val CONTENT = "The Security Hotspot status was successfully updated" } @@ -134,9 +134,9 @@ class ReviewSecurityHotspotAction(private var serverFindingKey: String? = null, override fun startInWriteAction() = false - override fun getText() = "SonarLint: Change Security Hotspot status" + override fun getText() = "SonarQube: Change Security Hotspot status" - override fun getFamilyName() = "SonarLint review" + override fun getFamilyName() = "SonarQube review" override fun isAvailable(project: Project, editor: Editor?, file: PsiFile?) = serverFindingKey != null diff --git a/src/main/java/org/sonarlint/intellij/actions/SonarAnalyzeAllFilesAction.java b/src/main/java/org/sonarlint/intellij/actions/SonarAnalyzeAllFilesAction.java index 72492f4cd8..9985e9f109 100644 --- a/src/main/java/org/sonarlint/intellij/actions/SonarAnalyzeAllFilesAction.java +++ b/src/main/java/org/sonarlint/intellij/actions/SonarAnalyzeAllFilesAction.java @@ -41,7 +41,7 @@ public class SonarAnalyzeAllFilesAction extends AbstractSonarAction { private static final String HIDE_WARNING_PROPERTY = "SonarLint.analyzeAllFiles.hideWarning"; public static final String WARNING_MESSAGE = "Analysing all files may take a considerable amount of time to complete.\n" - + "To get the best from SonarLint, you should preferably use the automatic analysis of the file you're working on."; + + "To get the best from SonarQube for IntelliJ, you should preferably use the automatic analysis of the file you're working on."; public SonarAnalyzeAllFilesAction() { super(); @@ -76,7 +76,7 @@ public void actionPerformed(AnActionEvent e) { static boolean userConfirmed(Project project) { if (!ApplicationManager.getApplication().isUnitTestMode() && !PropertiesComponent.getInstance().getBoolean(HIDE_WARNING_PROPERTY, false)) { - return MessageDialogBuilder.yesNo("SonarLint - Analyze All Files", WARNING_MESSAGE) + return MessageDialogBuilder.yesNo("SonarQube for IntelliJ - Analyze All Files", WARNING_MESSAGE) .yesText("Proceed") .noText("Cancel") .icon(Messages.getWarningIcon()) diff --git a/src/main/java/org/sonarlint/intellij/actions/ToolWindowLogAnalysisAction.java b/src/main/java/org/sonarlint/intellij/actions/ToolWindowLogAnalysisAction.java index 2444c4a01f..7639c6ccc4 100644 --- a/src/main/java/org/sonarlint/intellij/actions/ToolWindowLogAnalysisAction.java +++ b/src/main/java/org/sonarlint/intellij/actions/ToolWindowLogAnalysisAction.java @@ -25,7 +25,7 @@ public class ToolWindowLogAnalysisAction extends AbstractSonarToggleAction { public ToolWindowLogAnalysisAction() { - super("Analysis logs", "Enable logging of SonarLint analysis", null); + super("Analysis logs", "Enable logging of SonarQube for IntelliJ analysis", null); } @Override diff --git a/src/main/java/org/sonarlint/intellij/actions/ToolWindowVerboseModeAction.java b/src/main/java/org/sonarlint/intellij/actions/ToolWindowVerboseModeAction.java index 0cfd226a93..563a42ec12 100644 --- a/src/main/java/org/sonarlint/intellij/actions/ToolWindowVerboseModeAction.java +++ b/src/main/java/org/sonarlint/intellij/actions/ToolWindowVerboseModeAction.java @@ -26,7 +26,7 @@ public class ToolWindowVerboseModeAction extends AbstractSonarToggleAction { public ToolWindowVerboseModeAction() { - super("Verbose output", "Enable verbose output for SonarLint analysis", + super("Verbose output", "Enable verbose output for SonarQube for IntelliJ analysis", AllIcons.Actions.StartDebugger); } diff --git a/src/main/java/org/sonarlint/intellij/analysis/Analysis.java b/src/main/java/org/sonarlint/intellij/analysis/Analysis.java index 375579bb21..f98662d499 100644 --- a/src/main/java/org/sonarlint/intellij/analysis/Analysis.java +++ b/src/main/java/org/sonarlint/intellij/analysis/Analysis.java @@ -101,7 +101,7 @@ private List doRun(ProgressIndicator indicator) { console.debug("Trigger: " + trigger); console.debug(String.format("[%s] %d file(s) submitted", trigger, files.size())); if (!getService(BackendService.class).isAlive()) { - console.info("Analysis skipped as SonarLint is not alive"); + console.info("Analysis skipped as SonarQube for IntelliJ is not alive"); return Collections.emptyList(); } if (!getService(project, AnalysisReadinessCache.class).isReady()) { @@ -150,13 +150,13 @@ private List doRun(ProgressIndicator indicator) { private void handleError(Throwable e, ProgressIndicator indicator) { // if cancelled, ignore any errors since they were most likely caused by the interrupt if (!isCancelled(indicator)) { - var message = "Error running SonarLint analysis"; + var message = "Error running SonarQube for IntelliJ analysis"; var console = SonarLintConsole.get(project); console.error(message, e); if (indicator.isShowing()) { - var dialogMsg = "SonarLint analysis failed: " + e.getMessage(); - runOnUiThreadAndWait(project, indicator.getModalityState(), () -> Messages.showErrorDialog(dialogMsg, "Error Running SonarLint Analysis")); + var dialogMsg = "SonarQube for IntelliJ analysis failed: " + e.getMessage(); + runOnUiThreadAndWait(project, indicator.getModalityState(), () -> Messages.showErrorDialog(dialogMsg, "Error Running SonarQube for IntelliJ Analysis")); } callback.onError(e); @@ -175,7 +175,7 @@ private boolean isCancelled(ProgressIndicator indicator) { private Summary analyzePerModule(AnalysisScope scope, ProgressIndicator indicator, TriggerType trigger) { indicator.setIndeterminate(true); - indicator.setText("Running SonarLint Analysis for " + scope.getDescription()); + indicator.setText("Running SonarQube for IntelliJ Analysis for " + scope.getDescription()); var analyzer = getService(project, SonarLintAnalyzer.class); var results = new LinkedHashMap(); diff --git a/src/main/java/org/sonarlint/intellij/analysis/AnalysisScope.java b/src/main/java/org/sonarlint/intellij/analysis/AnalysisScope.java index bd58e87605..3fb1ba1100 100644 --- a/src/main/java/org/sonarlint/intellij/analysis/AnalysisScope.java +++ b/src/main/java/org/sonarlint/intellij/analysis/AnalysisScope.java @@ -65,7 +65,7 @@ public boolean shouldFetchServerIssues() { } private int modulesCount() { - return filesByModule.keySet().size(); + return filesByModule.size(); } public String getDescription() { diff --git a/src/main/java/org/sonarlint/intellij/analysis/AnalysisSubmitter.java b/src/main/java/org/sonarlint/intellij/analysis/AnalysisSubmitter.java index 17c9001ce9..06d6171cc7 100644 --- a/src/main/java/org/sonarlint/intellij/analysis/AnalysisSubmitter.java +++ b/src/main/java/org/sonarlint/intellij/analysis/AnalysisSubmitter.java @@ -58,7 +58,7 @@ @Service(Service.Level.PROJECT) public final class AnalysisSubmitter { - public static final String ANALYSIS_TASK_TITLE = "SonarLint Analysis"; + public static final String ANALYSIS_TASK_TITLE = "SonarQube for IntelliJ Analysis"; private final Project project; private final OnTheFlyFindingsHolder onTheFlyFindingsHolder; private Cancelable currentManualAnalysis; diff --git a/src/main/java/org/sonarlint/intellij/analysis/LocalFileExclusions.java b/src/main/java/org/sonarlint/intellij/analysis/LocalFileExclusions.java index 495341e018..2b0ecc650b 100644 --- a/src/main/java/org/sonarlint/intellij/analysis/LocalFileExclusions.java +++ b/src/main/java/org/sonarlint/intellij/analysis/LocalFileExclusions.java @@ -113,10 +113,10 @@ private ExcludeResult checkExclusionsFromSonarLintSettings(VirtualFile file, Mod return ExcludeResult.excluded("Could not create a relative path"); } if (globalExclusions.test(relativePath)) { - return ExcludeResult.excluded("file matches exclusions defined in the SonarLint Global Settings"); + return ExcludeResult.excluded("file matches exclusions defined in the SonarQube for IntelliJ Global Settings"); } if (projectExclusions.test(relativePath)) { - return ExcludeResult.excluded("file matches exclusions defined in the SonarLint Project Settings"); + return ExcludeResult.excluded("file matches exclusions defined in the SonarQube for IntelliJ Project Settings"); } return ExcludeResult.notExcluded(); diff --git a/src/main/java/org/sonarlint/intellij/callable/ShowFindingCallable.kt b/src/main/java/org/sonarlint/intellij/callable/ShowFindingCallable.kt index 9717757538..f57a09d9ab 100644 --- a/src/main/java/org/sonarlint/intellij/callable/ShowFindingCallable.kt +++ b/src/main/java/org/sonarlint/intellij/callable/ShowFindingCallable.kt @@ -61,7 +61,7 @@ class ShowFindingCallable(private val project: Project, onTheFlyFind LiveIssue::class.java -> showIssue(toolWindow) LocalTaintVulnerability::class.java -> showTaintVulnerability(toolWindow) else -> SonarLintProjectNotifications.get(project) - .notifyUnableToOpenFinding("The finding could not be detected by SonarLint in the current code") + .notifyUnableToOpenFinding("The finding could not be detected by SonarQube for IntelliJ in the current code") } } } @@ -73,14 +73,14 @@ class ShowFindingCallable(private val project: Project, onTheFlyFind val found = getService(project, SonarLintToolWindow::class.java).doesSecurityHotspotExist(showFinding.findingKey) if (!found) { SonarLintProjectNotifications.get(project) - .notifyUnableToOpenFinding("The Security Hotspot could not be detected by SonarLint in the current code") + .notifyUnableToOpenFinding("The Security Hotspot could not be detected by SonarQube for IntelliJ in the current code") } else { val selected = getService(project, SonarLintToolWindow::class.java).trySelectSecurityHotspot(showFinding.findingKey) if (!selected) { SonarLintProjectNotifications.get(project) .notifyUnableToOpenFinding( - "The Security Hotspot could not be opened by SonarLint due to the applied filters", + "The Security Hotspot could not be opened by SonarQube for IntelliJ due to the applied filters", ClearSecurityHotspotsFiltersAction(showFinding.findingKey) ) } diff --git a/src/main/java/org/sonarlint/intellij/config/SonarLintColorSettingsPage.java b/src/main/java/org/sonarlint/intellij/config/SonarLintColorSettingsPage.java index 6796ec9f10..88952ad8ab 100644 --- a/src/main/java/org/sonarlint/intellij/config/SonarLintColorSettingsPage.java +++ b/src/main/java/org/sonarlint/intellij/config/SonarLintColorSettingsPage.java @@ -54,7 +54,7 @@ private static class DescriptorComparator implements Comparator ADDITIONAL_HIGHLIGHT_DESCRIPTORS = new TreeMap<>(); @Nullable @Override public Icon getIcon() { - return SonarLintIcons.SONARLINT; + return SonarLintIcons.SONARQUBE_FOR_INTELLIJ; } @NotNull @Override public SyntaxHighlighter getHighlighter() { @@ -103,7 +103,7 @@ private static class DescriptorComparator implements Comparatorfeatures and benefits." + "Connecting SonarQube for IntelliJ to ${if (isSQ) "SonarQube Server" else "SonarQube Cloud"} will enable issues " + + "to be opened directly in your IDE and enable other features and benefits." connectedModeDescriptionLabel.addHyperlinkListener(object : HyperlinkAdapter() { override fun hyperlinkActivated(e: HyperlinkEvent) { BrowserUtil.browse(e.url) @@ -147,9 +148,10 @@ class AutomaticServerConnectionCreator(private val serverOrOrg: String, private val warningPanel = JBPanel>(BorderLayout()) redWarningIcon.icon = AllIcons.Ide.FatalError warningLabel.text = if (isSQ) { - "Always ensure that your Server URL matches your SonarQube instance. " + "Letting SonarLint connect to an untrusted SonarQube server is potentially dangerous." + "Always ensure that your Server URL matches your SonarQube Server instance. " + + "Letting SonarQube for IntelliJ connect to an untrusted SonarQube Server instance is potentially dangerous." } else { - "Ensure that the organization matches your SonarCloud organization." + "Ensure that the organization matches your SonarQube Cloud organization." } warningPanel.add(redWarningIcon, BorderLayout.WEST) warningPanel.add(warningLabel, BorderLayout.CENTER) @@ -173,7 +175,7 @@ class AutomaticServerConnectionCreator(private val serverOrOrg: String, private ) tokenLabel.text = - "A token will be automatically generated to allow access to your ${if (isSQ) "SonarQube instance" else "SonarCloud organization"}." + "A token will be automatically generated to allow access to your ${if (isSQ) "SonarQube Server instance" else "SonarQube Cloud organization"}." centerPanel.add( tokenLabel, GridBagConstraints( 1, 6, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, JBUI.emptyInsets(), 0, 0 diff --git a/src/main/java/org/sonarlint/intellij/config/global/GlobalExclusionsPanel.java b/src/main/java/org/sonarlint/intellij/config/global/GlobalExclusionsPanel.java index 467c3160af..71615b5b80 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/GlobalExclusionsPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/global/GlobalExclusionsPanel.java @@ -58,7 +58,7 @@ public GlobalExclusionsPanel() { panel.setBorder(b); initHtmlPane(editorPane1); - SwingHelper.setHtml(editorPane1, "When a project is connected to SonarQube or SonarCloud, exclusions defined in the " + + SwingHelper.setHtml(editorPane1, "When a project is connected to SonarQube (Server, Cloud), exclusions defined in the " + "server's General Settings override your locally " + "defined exclusions.", UIUtil.getLabelForeground()); editorPane1.addHyperlinkListener(new HyperlinkAdapter() { diff --git a/src/main/java/org/sonarlint/intellij/config/global/ServerConnection.java b/src/main/java/org/sonarlint/intellij/config/global/ServerConnection.java index 3fbcbeaa78..25dcc64476 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/ServerConnection.java +++ b/src/main/java/org/sonarlint/intellij/config/global/ServerConnection.java @@ -139,11 +139,11 @@ public boolean isSonarQube() { } public String getProductName() { - return isSonarCloud() ? "SonarCloud" : "SonarQube"; + return isSonarCloud() ? "SonarQube Cloud" : "SonarQube Server"; } public Icon getProductIcon() { - return isSonarCloud() ? SonarLintIcons.ICON_SONARCLOUD_16 : SonarLintIcons.ICON_SONARQUBE_16; + return isSonarCloud() ? SonarLintIcons.ICON_SONARQUBE_CLOUD_16 : SonarLintIcons.ICON_SONARQUBE_SERVER_16; } public boolean enableProxy() { diff --git a/src/main/java/org/sonarlint/intellij/config/global/ServerConnectionMgmtPanel.java b/src/main/java/org/sonarlint/intellij/config/global/ServerConnectionMgmtPanel.java index 915f0f44e1..60def07c83 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/ServerConnectionMgmtPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/global/ServerConnectionMgmtPanel.java @@ -82,7 +82,7 @@ private void create() { var app = ApplicationManager.getApplication(); connectionChangeListener = app.getMessageBus().syncPublisher(GlobalConfigurationListener.TOPIC); connectionList = new JBList<>(); - connectionList.getEmptyText().appendLine("Add a connection to SonarCloud or SonarQube"); + connectionList.getEmptyText().appendLine("Add a connection to SonarQube (Server, Cloud)"); connectionList.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent evt) { @@ -127,9 +127,9 @@ public void mouseClicked(MouseEvent evt) { @Override protected void customizeCellRenderer(JList list, ServerConnection server, int index, boolean selected, boolean hasFocus) { if (server.isSonarCloud()) { - setIcon(SonarLintIcons.ICON_SONARCLOUD_16); + setIcon(SonarLintIcons.ICON_SONARQUBE_CLOUD_16); } else { - setIcon(SonarLintIcons.ICON_SONARQUBE_16); + setIcon(SonarLintIcons.ICON_SONARQUBE_SERVER_16); } append(server.getName(), SimpleTextAttributes.REGULAR_ATTRIBUTES); if (!server.isSonarCloud()) { @@ -141,19 +141,19 @@ protected void customizeCellRenderer(JList list, ServerConnection server, int in private static JPanel initConnectionTitle() { var titlePanel = new JPanel(new HorizontalLayout(5)); - var connectionLabel = new JBLabel("Connections to"); + var connectionLabel = new JBLabel("Connections to SonarQube ("); connectionLabel.setFont(connectionLabel.getFont().deriveFont(Font.BOLD, 16f)); - var sonarCloudIcon = new JBLabel(SonarLintIcons.ICON_SONARCLOUD_16); - var sonarCloudLabel = new JBLabel("SonarCloud or"); - sonarCloudLabel.setFont(sonarCloudLabel.getFont().deriveFont(Font.BOLD, 16f)); - var sonarQubeIcon = new JBLabel(SonarLintIcons.ICON_SONARQUBE_16); - var sonarQubeLabel = new JBLabel("SonarQube"); + var sonarQubeIcon = new JBLabel(SonarLintIcons.ICON_SONARQUBE_CLOUD_16); + var sonarQubeLabel = new JBLabel("Server, "); sonarQubeLabel.setFont(sonarQubeLabel.getFont().deriveFont(Font.BOLD, 16f)); + var sonarCloudIcon = new JBLabel(SonarLintIcons.ICON_SONARQUBE_SERVER_16); + var sonarCloudLabel = new JBLabel("Cloud)"); + sonarCloudLabel.setFont(sonarQubeLabel.getFont().deriveFont(Font.BOLD, 16f)); titlePanel.add(connectionLabel); - titlePanel.add(sonarCloudIcon); - titlePanel.add(sonarCloudLabel); titlePanel.add(sonarQubeIcon); titlePanel.add(sonarQubeLabel); + titlePanel.add(sonarCloudIcon); + titlePanel.add(sonarCloudLabel); return titlePanel; } @@ -168,7 +168,7 @@ protected void hyperlinkActivated(HyperlinkEvent e) { connectedModeLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 15, 0)); initHtmlPane(connectedModeLabel); SwingHelper.setHtml(connectedModeLabel, "Connected Mode " + - "links SonarLint to SonarCloud or SonarQube to apply the same Clean Code standards as your team. " + + "links SonarQube for IntelliJ to SonarQube (Server, Cloud) to apply the same Clean Code standards as your team. " + "Analyze more languages, detect more issues, receive notifications about the quality gate status, and more. " + "Quality Profiles and file exclusion settings defined on the server are shared between all connected users.", JBUI.CurrentTheme.ContextHelp.FOREGROUND); diff --git a/src/main/java/org/sonarlint/intellij/config/global/SonarLintAboutPanel.java b/src/main/java/org/sonarlint/intellij/config/global/SonarLintAboutPanel.java index 5cd7acaafb..bdff8bbabd 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/SonarLintAboutPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/global/SonarLintAboutPanel.java @@ -63,9 +63,9 @@ public SonarLintAboutPanel() { } private JComponent createSonarLintPanel() { - var sonarlintIcon = new JBLabel(SonarLintIcons.SONARLINT_32); + var sonarlintIcon = new JBLabel(SonarLintIcons.SONARQUBE_FOR_INTELLIJ_32PX); var plugin = SonarLintUtils.getService(SonarLintPlugin.class); - var title = new JBLabel("SonarLint " + plugin.getVersion() + ""); + var title = new JBLabel("SonarQube for IntelliJ " + plugin.getVersion() + ""); var linkLabel = new HyperlinkLabel("Documentation"); linkLabel.addHyperlinkListener(e -> BrowserUtil.browse(BASE_DOCS_URL)); var copyrightLabel = new JBLabel("© " + LocalDate.now().getYear() + " SonarSource"); @@ -192,12 +192,12 @@ protected void hyperlinkActivated(HyperlinkEvent e) { }); // info - var info = new JBLabel("By sharing anonymous SonarLint usage statistics, you help us understand how SonarLint is used so " + var info = new JBLabel("By sharing anonymous SonarQube for IntelliJ usage statistics, you help us understand how SonarQube for IntelliJ is used so " + "we can improve the plugin to work even better for you. We don't collect source code, IP addresses, or any personally identifying " + "information. And we don't share the data with anyone else."); // checkbox - enableTelemetryCheckBox = new JCheckBox("Share anonymous SonarLint statistics"); + enableTelemetryCheckBox = new JCheckBox("Share anonymous SonarQube for IntelliJ statistics"); enableTelemetryCheckBox.setFocusable(false); var tickOptions = new JPanel(new VerticalFlowLayout()); tickOptions.setBorder(BorderFactory.createEmptyBorder(0, 0, 4, 0)); diff --git a/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalConfigurable.java b/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalConfigurable.java index 411533da5c..372a3cd9f1 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalConfigurable.java +++ b/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalConfigurable.java @@ -58,7 +58,7 @@ public class SonarLintGlobalConfigurable implements Configurable, Configurable.N @Nls @Override public String getDisplayName() { - return "SonarLint"; + return "SonarQube for IntelliJ"; } @Nullable @@ -167,10 +167,10 @@ private JPanel getPanel() { rootPanel = new JPanel(new BorderLayout()); tabs = new JBTabbedPane(); - tabs.insertTab("Settings", null, settingsPanel, "Configure SonarLint for all projects", SETTINGS_TAB_INDEX); + tabs.insertTab("Settings", null, settingsPanel, "Configure SonarQube for IntelliJ for all projects", SETTINGS_TAB_INDEX); tabs.insertTab("File Exclusions", null, exclusions.getComponent(), "Configure which files should be excluded from analysis", FILE_EXCLUSIONS_TAB_INDEX); - tabs.insertTab("Rules", null, rules.getComponent(), "Choose which rules are enabled when not bound to SonarCloud or SonarQube", RULES_TAB_INDEX); - tabs.insertTab("About", null, about.getComponent(), "About SonarLint", ABOUT_TAB_INDEX); + tabs.insertTab("Rules", null, rules.getComponent(), "Choose which rules are enabled when not bound to SonarQube (Server, Cloud)", RULES_TAB_INDEX); + tabs.insertTab("About", null, about.getComponent(), "About SonarQube for IntelliJ", ABOUT_TAB_INDEX); rootPanel.add(tabs, BorderLayout.CENTER); } diff --git a/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalOptionsPanel.java b/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalOptionsPanel.java index 9afac99c4b..e04ad19a58 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalOptionsPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalOptionsPanel.java @@ -51,8 +51,9 @@ import static org.sonarlint.intellij.documentation.SonarLintDocumentation.Intellij.FOCUS_ON_NEW_CODE_LINK; public class SonarLintGlobalOptionsPanel implements ConfigurationPanel { - private static final String NODE_JS_TOOLTIP = "SonarLint requires Node.js to analyze some languages. You can provide an explicit path for the node executable here or leave " + - "this field blank to let SonarLint look for it using your PATH environment variable." + + private static final String NODE_JS_TOOLTIP = "SonarQube for IntelliJ requires Node.js to analyze some languages. " + + "You can provide an explicit path for the node executable here or leave " + + "this field blank to let SonarQube for IntelliJ look for it using your PATH environment variable." + " Restarting your IDE is recommended."; private JPanel rootPane; private JBCheckBox autoTrigger; @@ -113,7 +114,7 @@ private JPanel createTopPanel() { var nodeJsPathWithBrowse = new TextFieldWithBrowseButton(nodeJsPath); nodeJsPathWithBrowse.setToolTipText(NODE_JS_TOOLTIP); var fileChooser = FileChooserDescriptorFactory.createSingleLocalFileDescriptor(); - nodeJsPathWithBrowse.addBrowseFolderListener("Select Node.js Binary", "Select Node.js binary to be used by SonarLint", null, fileChooser); + nodeJsPathWithBrowse.addBrowseFolderListener("Select Node.js Binary", "Select Node.js binary to be used by SonarQube for IntelliJ", null, fileChooser); optionsPanel.add(nodeJsPathWithBrowse, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, WEST, GridBagConstraints.HORIZONTAL, JBUI.emptyInsets(), 0, 0)); diff --git a/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalSettingsPresentableName.java b/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalSettingsPresentableName.java index 0716ed65cb..2c5a1400d7 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalSettingsPresentableName.java +++ b/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalSettingsPresentableName.java @@ -24,6 +24,6 @@ public class SonarLintGlobalSettingsPresentableName extends State.NameGetter { @Override public String get() { - return "SonarLint settings"; + return "SonarQube for IntelliJ settings"; } } diff --git a/src/main/java/org/sonarlint/intellij/config/global/rules/RuleConfigurationPanel.java b/src/main/java/org/sonarlint/intellij/config/global/rules/RuleConfigurationPanel.java index f28599350b..9fd28a204a 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/rules/RuleConfigurationPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/global/rules/RuleConfigurationPanel.java @@ -410,11 +410,11 @@ private void createUIComponents() { var introLabel = new JEditorPane(); initHtmlPane(introLabel); - SwingHelper.setHtml(introLabel, "Configure rules used for Sonarlint analysis for projects not in Connected Mode.", + SwingHelper.setHtml(introLabel, "Configure rules used for SonarQube for IntelliJ analysis for projects not in Connected Mode.", UIUtil.getLabelForeground()); var configureRuleLabel = new JEditorPane(); initHtmlPane(configureRuleLabel); - SwingHelper.setHtml(configureRuleLabel, "Connecting your project to SonarQube or SonarCloud syncs SonarLint with the " + + SwingHelper.setHtml(configureRuleLabel, "Connecting your project to SonarQube (Server, Cloud) syncs SonarQube for IntelliJ with the " + "Quality Profile standards defined on the server, allowing you to share the same rules configuration with your team.", JBUI.CurrentTheme.ContextHelp.FOREGROUND); var ruleServerLabel = new JEditorPane(); @@ -425,8 +425,8 @@ protected void hyperlinkActivated(HyperlinkEvent e) { RULE_SELECTION_PAGE.browseWithTelemetry(); } }); - SwingHelper.setHtml(ruleServerLabel, "  When a project is connected to SonarQube or " + - "SonarCloud, configuration from the server applies.", JBUI.CurrentTheme.ContextHelp.FOREGROUND); + SwingHelper.setHtml(ruleServerLabel, "  When a project is connected to SonarQube (Server, Cloud), " + + "configuration from the server applies.", JBUI.CurrentTheme.ContextHelp.FOREGROUND); var labelPanel = new JBPanel<>(new VerticalFlowLayout(0, 0)); labelPanel.add(introLabel); labelPanel.add(configureRuleLabel); diff --git a/src/main/java/org/sonarlint/intellij/config/global/wizard/NotificationsStep.java b/src/main/java/org/sonarlint/intellij/config/global/wizard/NotificationsStep.java index 1821aa9ae9..e58015caa8 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/wizard/NotificationsStep.java +++ b/src/main/java/org/sonarlint/intellij/config/global/wizard/NotificationsStep.java @@ -51,7 +51,7 @@ public JComponent getComponent() { @Override public void _init() { var isSc = model.getServerType() == WizardModel.ServerType.SONARCLOUD; - var sqOrSc = isSc ? "SonarCloud" : "SonarQube"; + var sqOrSc = isSc ? "SonarQube Cloud" : "SonarQube Server"; notificationsCheckBox.setText("Receive notifications from " + sqOrSc); notificationsCheckBox.setSelected(!model.isNotificationsDisabled()); var docUrl = isSc ? SonarLintDocumentation.SonarCloud.SMART_NOTIFICATIONS : SonarLintDocumentation.SonarQube.SMART_NOTIFICATIONS; diff --git a/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.form b/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.form index 146ec04fcd..f7c2382bb2 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.form +++ b/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.form @@ -168,7 +168,7 @@ - + diff --git a/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.java b/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.java index cba6b9c30e..c842163793 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.java +++ b/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.java @@ -30,7 +30,6 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.Collection; -import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JEditorPane; @@ -102,10 +101,10 @@ protected void textChanged(DocumentEvent e) { "and extends the CI/CD workflow to systematically help developers and organizations deliver Clean Code."; sonarCloudDescription.setText(cloudMainText); - initEditorPane(sonarCloudFree, "SonarCloud is entirely free for open source projects", + initEditorPane(sonarCloudFree, "SonarQube Cloud is entirely free for open source projects", SONARCLOUD_PRODUCT_PAGE); - initEditorPane(sonarQubeFree, "SonarQube offers a free Community Edition", + initEditorPane(sonarQubeFree, "SonarQube Server offers a free Community Build", SONARQUBE_EDITIONS_DOWNLOADS); initEditorPane(compareProducts, "Discover which option is the best for your team here", @@ -150,19 +149,19 @@ private void paintErrors() { } private void load(boolean editing) { - Icon sqIcon = SonarLintIcons.ICON_SONARQUBE; - Icon clIcon = SonarLintIcons.ICON_SONARCLOUD; + var sqsIcon = SonarLintIcons.ICON_SONARQUBE_SERVER; + var sqcIcon = SonarLintIcons.ICON_SONARQUBE_CLOUD; if (model.getServerType() == WizardModel.ServerType.SONARCLOUD || model.getServerType() == null) { radioSonarCloud.setSelected(true); if (editing) { - sqIcon = SonarLintIcons.toDisabled(sqIcon); + sqsIcon = SonarLintIcons.toDisabled(sqsIcon); } } else { radioSonarQube.setSelected(true); urlText.setText(model.getServerUrl()); if (editing) { - clIcon = SonarLintIcons.toDisabled(clIcon); + sqcIcon = SonarLintIcons.toDisabled(sqcIcon); } } @@ -174,8 +173,8 @@ private void load(boolean editing) { radioSonarCloud.setEnabled(false); } - sonarqubeIcon.setIcon(sqIcon); - sonarcloudIcon.setIcon(clIcon); + sonarqubeIcon.setIcon(sqsIcon); + sonarcloudIcon.setIcon(sqcIcon); } private void selectionChanged() { @@ -269,8 +268,8 @@ public JComponent getPreferredFocusedComponent() { } private void createUIComponents() { - sonarcloudIcon = new JLabel(SonarLintIcons.ICON_SONARCLOUD); - sonarqubeIcon = new JLabel(SonarLintIcons.ICON_SONARQUBE); + sonarcloudIcon = new JLabel(SonarLintIcons.ICON_SONARQUBE_CLOUD); + sonarqubeIcon = new JLabel(SonarLintIcons.ICON_SONARQUBE_SERVER); sonarcloudText = SwingHelper.createHtmlViewer(false, null, null, null); sonarqubeText = SwingHelper.createHtmlViewer(false, null, null, null); sonarQubeDescription = SwingHelper.createHtmlViewer(false, null, null, null); diff --git a/src/main/java/org/sonarlint/intellij/config/project/AddEditExclusionDialog.java b/src/main/java/org/sonarlint/intellij/config/project/AddEditExclusionDialog.java index 4bb9eaa55c..1652e3ad98 100644 --- a/src/main/java/org/sonarlint/intellij/config/project/AddEditExclusionDialog.java +++ b/src/main/java/org/sonarlint/intellij/config/project/AddEditExclusionDialog.java @@ -66,20 +66,20 @@ public class AddEditExclusionDialog extends DialogWrapper { public AddEditExclusionDialog(Project project) { super(project, false); this.project = project; - setTitle("Add SonarLint File Exclusion"); + setTitle("Add SonarQube for IntelliJ File Exclusion"); init(); FileChooserDescriptor fileChooser = new FileChooserDescriptor(true, false, false, true, false, false); fileChooser.setRoots(ProjectRootManager.getInstance(project).getContentRoots()); fileTextField.addBrowseFolderListener("Select File to Exclude", - "Select the file which will be excluded from SonarLint analysis", + "Select the file which will be excluded from SonarQube for IntelliJ analysis", project, fileChooser); FileChooserDescriptor directoryChooser = FileChooserDescriptorFactory.createSingleFolderDescriptor(); directoryChooser.setRoots(ProjectRootManager.getInstance(project).getContentRoots()); directoryTextField.addBrowseFolderListener("Select Directory to Exclude", - "Select the directory which will be excluded from SonarLint analysis", + "Select the directory which will be excluded from SonarQube for IntelliJ analysis", project, directoryChooser); DocumentListener docListener = new DocumentAdapter() { @@ -140,7 +140,7 @@ public ExclusionItem getExclusion() { } public void setExclusion(@Nullable ExclusionItem item) { - setTitle("Edit SonarLint File Exclusion"); + setTitle("Edit SonarQube for IntelliJ File Exclusion"); if (item != null) { switch (item.type()) { diff --git a/src/main/java/org/sonarlint/intellij/config/project/ProjectExclusionsPanel.java b/src/main/java/org/sonarlint/intellij/config/project/ProjectExclusionsPanel.java index 0f1b3cb419..c76d3ac92e 100644 --- a/src/main/java/org/sonarlint/intellij/config/project/ProjectExclusionsPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/project/ProjectExclusionsPanel.java @@ -56,7 +56,7 @@ public ProjectExclusionsPanel(Project project) { + "\">override your locally defined exclusions."; editorPane2.setVisible(false); } else { - message = "When a project is connected to SonarQube or SonarCloud, exclusions defined in the server's General Settings " + + message = "When a project is connected to SonarQube (Server, Cloud), exclusions defined in its General Settings " + "override your locally defined exclusions."; editorPane2.setVisible(true); } diff --git a/src/main/java/org/sonarlint/intellij/config/project/SearchProjectKeyDialog.kt b/src/main/java/org/sonarlint/intellij/config/project/SearchProjectKeyDialog.kt index ac3d06cf6e..6182657336 100644 --- a/src/main/java/org/sonarlint/intellij/config/project/SearchProjectKeyDialog.kt +++ b/src/main/java/org/sonarlint/intellij/config/project/SearchProjectKeyDialog.kt @@ -58,7 +58,7 @@ class SearchProjectKeyDialog( private lateinit var searchTextField: SearchTextField init { - title = "Select " + (if (isSonarCloud) "SonarCloud" else "SonarQube") + " Project To Bind" + title = "Select " + (if (isSonarCloud) "SonarQube Cloud" else "SonarQube Server") + " Project To Bind" init() } diff --git a/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectBindPanel.java b/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectBindPanel.java index 0bba0cd5b6..e56038da8c 100644 --- a/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectBindPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectBindPanel.java @@ -218,12 +218,12 @@ private void setConnectionList(Collection connections, @Nullab private void createBindPanel() { bindPanel = new JPanel(new GridBagLayout()); - var bindContext = new JBLabel("Complete your Connected Mode setup by binding your local project to your SonarCloud or SonarQube project " + + var bindContext = new JBLabel("Complete your Connected Mode setup by binding your local project to your SonarQube (Server, Cloud) project " + "to benefit from the same rules and settings that are used to inspect the project on the server."); bindContext.setFontColor(UIUtil.FontColor.BRIGHTER); boolean pluralizeProject = ProjectAttachProcessor.canAttachToProject() && ModuleManager.getInstance(project).getModules().length > 1; - bindEnable = new JBCheckBox("Bind project" + (pluralizeProject ? "s" : "") + " to SonarCloud / SonarQube", true); + bindEnable = new JBCheckBox("Bind project" + (pluralizeProject ? "s" : "") + " to SonarQube (Server, Cloud)", true); bindEnable.addItemListener(new BindItemListener()); configureConnectionButton = new JButton(); @@ -253,7 +253,7 @@ public void actionPerformed(ActionEvent e) { projectKeyLabel = new JLabel("Project key:"); projectKeyTextField = new JBTextField(); - projectKeyTextField.getEmptyText().setText("Input SonarCloud/SonarQube project key or search one"); + projectKeyTextField.getEmptyText().setText("Input SonarQube (Server, Cloud) project key or search one"); searchProjectButton = new JButton(); searchProjectButton.setAction(new AbstractAction() { @@ -375,9 +375,9 @@ protected void customizeCellRenderer(JList list, @Nullable ServerConnection valu append(value.getName(), attrs, true); setToolTipText("Bind project using this connection"); if (value.isSonarCloud()) { - setIcon(SonarLintIcons.ICON_SONARCLOUD_16); + setIcon(SonarLintIcons.ICON_SONARQUBE_CLOUD_16); } else { - setIcon(SonarLintIcons.ICON_SONARQUBE_16); + setIcon(SonarLintIcons.ICON_SONARQUBE_SERVER_16); } } } diff --git a/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectPropertiesPanel.java b/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectPropertiesPanel.java index 186c7c78d1..878dbf4949 100644 --- a/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectPropertiesPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectPropertiesPanel.java @@ -49,7 +49,7 @@ public JPanel create() { tableModel = new PropertiesTableModel(); // Unfortunately TableModel's listener does not work properly, it doesn't receive events related to changed cells. final var table = new JBTable(tableModel); - table.getEmptyText().setText("No SonarLint properties configured for this project"); + table.getEmptyText().setText("No SonarQube for IntelliJ properties configured for this project"); var tablePanel = ToolbarDecorator.createDecorator(table) .disableUpAction() diff --git a/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectSettingsPanel.java b/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectSettingsPanel.java index 62f3ccefc7..ae41c041b6 100644 --- a/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectSettingsPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectSettingsPanel.java @@ -60,7 +60,7 @@ public SonarLintProjectSettingsPanel(Project project) { rootPropertiesPane = new JPanel(new BorderLayout()); rootPropertiesPane.add(propsPanel.create(), BorderLayout.CENTER); - tabs.insertTab("Bind to SonarCloud / SonarQube", null, rootBindPane, "Configure the binding to SonarCloud or a SonarQube server", 0); + tabs.insertTab("Bind to SonarQube (Server, Cloud)", null, rootBindPane, "Configure the binding to SonarQube (Server, Cloud)", 0); tabs.insertTab("File Exclusions", null, exclusionsPanel.getComponent(), "Configure which files to exclude from analysis", 1); tabs.insertTab("Analysis Properties", null, rootPropertiesPane, "Configure analysis properties", 2); diff --git a/src/main/java/org/sonarlint/intellij/core/BackendService.kt b/src/main/java/org/sonarlint/intellij/core/BackendService.kt index 91e9361586..0e9de49397 100644 --- a/src/main/java/org/sonarlint/intellij/core/BackendService.kt +++ b/src/main/java/org/sonarlint/intellij/core/BackendService.kt @@ -230,28 +230,34 @@ class BackendService : Disposable { } private fun createServiceStartingTask(): Task.Backgroundable { - return object : Task.Backgroundable(null, "Starting SonarLint service\u2026", false, ALWAYS_BACKGROUND) { + return object : Task.Backgroundable(null, "Starting SonarQube for IntelliJ service\u2026", false, ALWAYS_BACKGROUND) { override fun run(indicator: ProgressIndicator) { try { val sloop = startSloopProcess() this@BackendService.sloop = sloop getService(GlobalLogOutput::class.java).log("Migrating the storage...", ClientLogOutput.Level.INFO) migrateStoragePath() - getService(GlobalLogOutput::class.java).log("Listening for SonarLint service exit...", ClientLogOutput.Level.INFO) + getService(GlobalLogOutput::class.java).log( + "Listening for SonarQube for IntelliJ service exit...", + ClientLogOutput.Level.INFO + ) listenForProcessExit(sloop) - getService(GlobalLogOutput::class.java).log("Initializing the SonarLint service...", ClientLogOutput.Level.INFO) + getService(GlobalLogOutput::class.java).log( + "Initializing the SonarQube for IntelliJ service...", + ClientLogOutput.Level.INFO + ) initRpcServer(sloop.rpcServer).get(1, TimeUnit.MINUTES) - getService(GlobalLogOutput::class.java).log("SonarLint service initialized...", ClientLogOutput.Level.INFO) + getService(GlobalLogOutput::class.java).log("SonarQube for IntelliJ service initialized...", ClientLogOutput.Level.INFO) backendFuture.complete(sloop.rpcServer) } catch (t: TimeoutException) { GlobalLogOutput.get().log( - "The 'Starting SonarLint service...' task timed out, please capture thread dumps of the 'SonarLintServerCli' process and report the problem to the SonarLint maintainers", + "The 'Starting SonarQube for IntelliJ service...' task timed out, please capture thread dumps of the 'SonarLintServerCli' process and report the problem to the SonarQube for IntelliJ maintainers", ClientLogOutput.Level.ERROR ) handleSloopExited() backendFuture.cancel(true) } catch (t: Throwable) { - GlobalLogOutput.get().logError("Cannot start the SonarLint service", t) + GlobalLogOutput.get().logError("Cannot start the SonarQube for IntelliJ service", t) handleSloopExited() backendFuture.cancel(true) } @@ -269,14 +275,14 @@ class BackendService : Disposable { false } else true } - getService(GlobalLogOutput::class.java).log("Starting the SonarLint service process...", ClientLogOutput.Level.INFO) + getService(GlobalLogOutput::class.java).log("Starting the SonarQube for IntelliJ service process...", ClientLogOutput.Level.INFO) val sloopLauncher = this.defaultSloopLauncher ?: SloopLauncher(SonarLintIntelliJClient) val customJrePath = getPathProperty("sonarlint.jre.path")?.also { getService(GlobalLogOutput::class.java).log("Custom JRE detected: $it", ClientLogOutput.Level.INFO) } val jreHomePath = customJrePath ?: getPathProperty("java.home") val sloopPath = getService(SonarLintPlugin::class.java).path.resolve("sloop") - getService(GlobalLogOutput::class.java).log("Listing SonarLint service files:", ClientLogOutput.Level.INFO) + getService(GlobalLogOutput::class.java).log("Listing SonarQube for IntelliJ service files:", ClientLogOutput.Level.INFO) sloopPath.toFile().walkTopDown().forEach { file -> getService(GlobalLogOutput::class.java).log(file.absolutePath, ClientLogOutput.Level.INFO) } @@ -320,7 +326,7 @@ class BackendService : Disposable { InitializeParams( ClientConstantInfoDto( ApplicationInfo.getInstance().versionName, - "SonarLint IntelliJ " + getService(SonarLintPlugin::class.java).version + "SonarQube for IntelliJ " + getService(SonarLintPlugin::class.java).version ), getTelemetryConstantAttributes(), getHttpConfiguration(), diff --git a/src/main/java/org/sonarlint/intellij/editor/ApplyQuickFixIntentionAction.kt b/src/main/java/org/sonarlint/intellij/editor/ApplyQuickFixIntentionAction.kt index 2c68d6e335..952ade7ed3 100644 --- a/src/main/java/org/sonarlint/intellij/editor/ApplyQuickFixIntentionAction.kt +++ b/src/main/java/org/sonarlint/intellij/editor/ApplyQuickFixIntentionAction.kt @@ -36,8 +36,8 @@ import org.sonarlint.intellij.finding.RangeMarkerEdit import org.sonarlint.intellij.telemetry.SonarLintTelemetry class ApplyQuickFixIntentionAction(private val fix: QuickFix, private val ruleKey: String, private val invokedInPreview: Boolean) : IntentionAction, PriorityAction, Iconable { - override fun getText() = "SonarLint: " + fix.message - override fun getFamilyName() = "SonarLint quick fix" + override fun getText() = "SonarQube: " + fix.message + override fun getFamilyName() = "SonarQube quick fix" override fun startInWriteAction() = true override fun getIcon(flags: Int) = AllIcons.Actions.IntentionBulb override fun getPriority() = PriorityAction.Priority.TOP diff --git a/src/main/java/org/sonarlint/intellij/editor/DisableRuleIntentionAction.java b/src/main/java/org/sonarlint/intellij/editor/DisableRuleIntentionAction.java index 76b2e06ba0..e5df86cdfa 100644 --- a/src/main/java/org/sonarlint/intellij/editor/DisableRuleIntentionAction.java +++ b/src/main/java/org/sonarlint/intellij/editor/DisableRuleIntentionAction.java @@ -46,11 +46,11 @@ public class DisableRuleIntentionAction implements IntentionAction, LowPriorityA } @Nls @NotNull @Override public String getText() { - return "SonarLint: Disable rule '" + ruleKey + "'"; + return "SonarQube: Disable rule '" + ruleKey + "'"; } @Nls @NotNull @Override public String getFamilyName() { - return "SonarLint disable rule"; + return "SonarQube disable rule"; } @Override public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) { diff --git a/src/main/java/org/sonarlint/intellij/editor/EditorDecorator.kt b/src/main/java/org/sonarlint/intellij/editor/EditorDecorator.kt index cd4fab27c7..310ce61047 100644 --- a/src/main/java/org/sonarlint/intellij/editor/EditorDecorator.kt +++ b/src/main/java/org/sonarlint/intellij/editor/EditorDecorator.kt @@ -196,7 +196,7 @@ class EditorDecorator(private val project: Project) { .severity(HighlightSeverity.ERROR) .textAttributes(SonarLintTextAttributes.SELECTED) if (!message.isNullOrEmpty() && "..." != message) { - builder.descriptionAndTooltip("SonarLint: $message") + builder.descriptionAndTooltip("SonarQube: $message") } return builder.create()?.let { hl -> computeReadActionSafely { Highlight(location.document, hl) } } } diff --git a/src/main/java/org/sonarlint/intellij/editor/ShowLocationsIntentionAction.java b/src/main/java/org/sonarlint/intellij/editor/ShowLocationsIntentionAction.java index 6db2dfa5ac..3cefb68fa4 100644 --- a/src/main/java/org/sonarlint/intellij/editor/ShowLocationsIntentionAction.java +++ b/src/main/java/org/sonarlint/intellij/editor/ShowLocationsIntentionAction.java @@ -44,11 +44,11 @@ public ShowLocationsIntentionAction(LiveFinding finding, FindingContext context) } @Nls @NotNull @Override public String getText() { - return "SonarLint: Show " + (context.hasUniqueFlow() ? "issue locations" : "data flows"); + return "SonarQube: Show " + (context.hasUniqueFlow() ? "issue locations" : "data flows"); } @Nls @NotNull @Override public String getFamilyName() { - return "SonarLint locations"; + return "SonarQube locations"; } @Override public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) { diff --git a/src/main/java/org/sonarlint/intellij/editor/ShowRuleDescriptionIntentionAction.java b/src/main/java/org/sonarlint/intellij/editor/ShowRuleDescriptionIntentionAction.java index 1cc0be9dd1..17a77a4d24 100644 --- a/src/main/java/org/sonarlint/intellij/editor/ShowRuleDescriptionIntentionAction.java +++ b/src/main/java/org/sonarlint/intellij/editor/ShowRuleDescriptionIntentionAction.java @@ -44,12 +44,12 @@ public ShowRuleDescriptionIntentionAction(LiveFinding liveFinding) { @Override public @Nls(capitalization = Nls.Capitalization.Sentence) @NotNull String getText() { - return "SonarLint: Show rule description '" + liveFinding.getRuleKey() + "'"; + return "SonarQube: Show rule description '" + liveFinding.getRuleKey() + "'"; } @Override public @NotNull @Nls(capitalization = Nls.Capitalization.Sentence) String getFamilyName() { - return "SonarLint show issue description"; + return "SonarQube show issue description"; } @Override diff --git a/src/main/java/org/sonarlint/intellij/editor/ShowTaintVulnerabilityRuleDescriptionIntentionAction.java b/src/main/java/org/sonarlint/intellij/editor/ShowTaintVulnerabilityRuleDescriptionIntentionAction.java index dae4ecbba4..bba259611b 100644 --- a/src/main/java/org/sonarlint/intellij/editor/ShowTaintVulnerabilityRuleDescriptionIntentionAction.java +++ b/src/main/java/org/sonarlint/intellij/editor/ShowTaintVulnerabilityRuleDescriptionIntentionAction.java @@ -45,12 +45,12 @@ public ShowTaintVulnerabilityRuleDescriptionIntentionAction(LocalTaintVulnerabil @Override public @Nls(capitalization = Nls.Capitalization.Sentence) @NotNull String getText() { - return "SonarLint: Show rule description '" + taintVulnerability.getRuleKey() + "'"; + return "SonarQube: Show rule description '" + taintVulnerability.getRuleKey() + "'"; } @Override public @NotNull @Nls(capitalization = Nls.Capitalization.Sentence) String getFamilyName() { - return "SonarLint show taint vulnerability description"; + return "SonarQube show taint vulnerability description"; } @Override diff --git a/src/main/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSource.java b/src/main/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSource.java index 443b616bac..80193fbf5c 100644 --- a/src/main/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSource.java +++ b/src/main/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSource.java @@ -47,13 +47,13 @@ public class BlameSonarSource extends ErrorReportSubmitter { private static final String COMMUNITY_ROOT_URL = "https://community.sonarsource.com/"; private static final String COMMUNITY_FAULT_CATEGORY_URL = COMMUNITY_ROOT_URL + "tags/c/" + BUG_FAULT_CATEGORY_ID + "/" + INTELLIJ_TAG; private static final String COMMUNITY_NEW_TOPIC_URL = COMMUNITY_ROOT_URL + "new-topic" - + "?title=Error+in+SonarLint+for+IntelliJ" + + "?title=Error+in+SonarQube+for+IntelliJ" + "&category_id=" + BUG_FAULT_CATEGORY_ID + "&tags=sonarlint," + INTELLIJ_TAG; @Override public @NotNull String getReportActionText() { - return "Report to SonarSource"; + return "Report to Sonar"; } @Override @@ -89,7 +89,7 @@ String buildBody(@NotNull IdeaLoggingEvent[] events, @Nullable String additional body.append("* Java: ").append(System.getProperty("java.vendor")).append(" ").append(System.getProperty("java.version")).append("\n"); body.append("* OS: ").append(System.getProperty("os.name")).append(" ").append(System.getProperty("os.arch")).append("\n"); body.append("* IDE: ").append(ApplicationInfo.getInstance().getFullApplicationName()).append("\n"); - body.append("* SonarLint: ").append(SonarLintUtils.getService(SonarLintPlugin.class).getVersion()).append("\n"); + body.append("* SonarQube for IntelliJ: ").append(SonarLintUtils.getService(SonarLintPlugin.class).getVersion()).append("\n"); body.append("\n"); if (additionalInfo != null) { body.append(additionalInfo); diff --git a/src/main/java/org/sonarlint/intellij/fs/DefaultVirtualFileSystemEventsHandler.kt b/src/main/java/org/sonarlint/intellij/fs/DefaultVirtualFileSystemEventsHandler.kt index 5d0d2ab330..987252aac4 100644 --- a/src/main/java/org/sonarlint/intellij/fs/DefaultVirtualFileSystemEventsHandler.kt +++ b/src/main/java/org/sonarlint/intellij/fs/DefaultVirtualFileSystemEventsHandler.kt @@ -51,6 +51,7 @@ open class DefaultVirtualFileSystemEventsHandler @NonInjectable constructor(priv events: List, eventTypeConverter: (VFileEvent) -> ModuleFileEvent.Type?, ) { + val openProjects = ProjectManager.getInstance().openProjects.filter { !it.isDisposed }.toList() val filesByModule = fileEventsByModules(events, openProjects, eventTypeConverter) val allFilesByModule = filesByModule.entries.associate { it.key to it.value.toList() } diff --git a/src/main/java/org/sonarlint/intellij/java/JavaAnalysisConfigurator.java b/src/main/java/org/sonarlint/intellij/java/JavaAnalysisConfigurator.java index 9d9a79b544..acaed956e7 100644 --- a/src/main/java/org/sonarlint/intellij/java/JavaAnalysisConfigurator.java +++ b/src/main/java/org/sonarlint/intellij/java/JavaAnalysisConfigurator.java @@ -210,7 +210,7 @@ private static boolean isExported(OrderEntry entry) { private static void processJdkOrderEntry(final Module module, JavaModuleClasspath moduleClasspath, Sdk jdk) { var jdkHomePath = jdk.getHomePath(); if (moduleClasspath.getJdkHome() != null) { - SonarLintConsole.get(module.getProject()).info("Multiple Jdk configured for module: " + module.getName()); + SonarLintConsole.get(module.getProject()).info("Multiple JDK configured for module: " + module.getName()); } else { moduleClasspath.setJdkHome(jdkHomePath); } diff --git a/src/main/java/org/sonarlint/intellij/messages/AnalysisListener.java b/src/main/java/org/sonarlint/intellij/messages/AnalysisListener.java index 984e15cd73..ac1bc82868 100644 --- a/src/main/java/org/sonarlint/intellij/messages/AnalysisListener.java +++ b/src/main/java/org/sonarlint/intellij/messages/AnalysisListener.java @@ -28,7 +28,7 @@ * Notifies about analysis tasks starting. It will be called for any analysis task, regardless of the trigger, if it is background or not, etc. */ public interface AnalysisListener { - Topic TOPIC = Topic.create("SonarLint analysis start", AnalysisListener.class); + Topic TOPIC = Topic.create("SonarQube for IntelliJ analysis start", AnalysisListener.class); void started(Collection files, TriggerType trigger); diff --git a/src/main/java/org/sonarlint/intellij/messages/StatusListener.java b/src/main/java/org/sonarlint/intellij/messages/StatusListener.java index 518ec1ef5f..89214bc00d 100644 --- a/src/main/java/org/sonarlint/intellij/messages/StatusListener.java +++ b/src/main/java/org/sonarlint/intellij/messages/StatusListener.java @@ -24,7 +24,7 @@ @FunctionalInterface public interface StatusListener { - Topic SONARLINT_STATUS_TOPIC = Topic.create("SonarLint Analyzer Status", StatusListener.class); + Topic SONARLINT_STATUS_TOPIC = Topic.create("SonarQube for IntelliJ analyzer status", StatusListener.class); /** * Called when the status of the user-initiated analysis changes. diff --git a/src/main/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotifications.java b/src/main/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotifications.java index 7700054540..fd49ba6f27 100644 --- a/src/main/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotifications.java +++ b/src/main/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotifications.java @@ -42,10 +42,10 @@ public static void resetCachedMessages() { public static void notifyOnceForSkippedPlugins(Project project, org.sonarsource.sonarlint.core.rpc.protocol.common.Language language, DidSkipLoadingPluginParams.SkipReason reason, String minVersion, @Nullable String currentVersion) { var languageLabel = Language.valueOf(language.name()).getLabel(); - final var title = "SonarLint failed to analyze " + languageLabel + " code"; + final var title = "SonarQube for IntelliJ failed to analyze " + languageLabel + " code"; if (reason == DidSkipLoadingPluginParams.SkipReason.UNSATISFIED_JRE) { var content = String.format( - "SonarLint requires Java runtime version %s or later to analyze %s code. Current version is %s.", + "SonarQube for IntelliJ requires Java runtime version %s or later to analyze %s code. Current version is %s.", minVersion, languageLabel, currentVersion); createNotificationOnce(project, title, content, new OpenLinkAction("https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run" + @@ -53,11 +53,11 @@ public static void notifyOnceForSkippedPlugins(Project project, org.sonarsource. "How to change the IDE-running JDK?")); } else if (reason == DidSkipLoadingPluginParams.SkipReason.UNSATISFIED_NODE_JS) { var content = new StringBuilder( - String.format("SonarLint requires Node.js runtime version %s or later to analyze %s code.", minVersion, languageLabel)); + String.format("SonarQube for IntelliJ requires Node.js runtime version %s or later to analyze %s code.", minVersion, languageLabel)); if (currentVersion != null) { content.append(String.format(" Current version is %s.", currentVersion)); } - content.append("
Please configure the Node.js path in the SonarLint settings."); + content.append("
Please configure the Node.js path in the SonarQube for IntelliJ settings."); createNotificationOnce(project, title, content.toString(), new OpenGlobalSettingsAction(project)); } } diff --git a/src/main/java/org/sonarlint/intellij/notifications/ClearSecurityHotspotsFiltersAction.kt b/src/main/java/org/sonarlint/intellij/notifications/ClearSecurityHotspotsFiltersAction.kt index e0661f24c1..362afa8845 100644 --- a/src/main/java/org/sonarlint/intellij/notifications/ClearSecurityHotspotsFiltersAction.kt +++ b/src/main/java/org/sonarlint/intellij/notifications/ClearSecurityHotspotsFiltersAction.kt @@ -33,7 +33,7 @@ class ClearSecurityHotspotsFiltersAction(private val securityHotspotKey: String) SonarLintActions.getInstance().includeResolvedHotspotAction().setSelected(e, true) if (!SonarLintUtils.getService(it, SonarLintToolWindow::class.java).trySelectSecurityHotspot(securityHotspotKey)) { SonarLintProjectNotifications.get(it) - .notifyUnableToOpenFinding("The Security Hotspot could not be opened by SonarLint") + .notifyUnableToOpenFinding("The Security Hotspot could not be opened by SonarQube for IntelliJ") } } notification.expire() diff --git a/src/main/java/org/sonarlint/intellij/notifications/OpenGlobalSettingsAction.java b/src/main/java/org/sonarlint/intellij/notifications/OpenGlobalSettingsAction.java index e8f5cdb754..50f60561e4 100644 --- a/src/main/java/org/sonarlint/intellij/notifications/OpenGlobalSettingsAction.java +++ b/src/main/java/org/sonarlint/intellij/notifications/OpenGlobalSettingsAction.java @@ -25,6 +25,6 @@ class OpenGlobalSettingsAction extends OpenConfigurableAction { OpenGlobalSettingsAction(Project project) { - super(project, "Open SonarLint Settings", new SonarLintGlobalConfigurable()); + super(project, "Open SonarQube for IntelliJ Settings", new SonarLintGlobalConfigurable()); } } diff --git a/src/main/java/org/sonarlint/intellij/notifications/OpenProjectSettingsAction.java b/src/main/java/org/sonarlint/intellij/notifications/OpenProjectSettingsAction.java index df5e4f9b3d..08feba57bf 100644 --- a/src/main/java/org/sonarlint/intellij/notifications/OpenProjectSettingsAction.java +++ b/src/main/java/org/sonarlint/intellij/notifications/OpenProjectSettingsAction.java @@ -25,7 +25,7 @@ class OpenProjectSettingsAction extends OpenConfigurableAction { OpenProjectSettingsAction(Project project) { - this(project, "Open SonarLint Project Configuration"); + this(project, "Open SonarQube for IntelliJ Project Configuration"); } OpenProjectSettingsAction(Project project, String text) { diff --git a/src/main/java/org/sonarlint/intellij/notifications/SonarLintProjectNotifications.kt b/src/main/java/org/sonarlint/intellij/notifications/SonarLintProjectNotifications.kt index 043301d9b1..ffaa90064c 100644 --- a/src/main/java/org/sonarlint/intellij/notifications/SonarLintProjectNotifications.kt +++ b/src/main/java/org/sonarlint/intellij/notifications/SonarLintProjectNotifications.kt @@ -57,36 +57,43 @@ import org.sonarsource.sonarlint.core.rpc.protocol.client.smartnotification.Show class SonarLintProjectNotifications(private val myProject: Project) { companion object { - private const val TITLE_SONARLINT_INVALID_BINDING = "SonarLint - Invalid binding" - private const val TITLE_SONARLINT_SUGGESTIONS = "SonarLint suggestions" + private const val TITLE_SONARLINT_INVALID_BINDING = "SonarQube for IntelliJ - Invalid binding" + private const val TITLE_SONARLINT_SUGGESTIONS = "SonarQube for IntelliJ suggestions" fun get(project: Project): SonarLintProjectNotifications { return SonarLintUtils.getService(project, SonarLintProjectNotifications::class.java) } fun projectLessNotification(title: String?, message: String, type: NotificationType, action: AnAction? = null): Notification { - return NotificationGroupManager.getInstance().getNotificationGroup("SonarLint").createNotification( + return NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ").createNotification( title ?: "", message, type ).apply { isImportant = type != NotificationType.INFORMATION - icon = SonarLintIcons.SONARLINT + icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ action?.let { addAction(it) } notify(null) } } } - private val inContextPromotionGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: In Context Promotions") - private val bindingProblemGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: Server Binding Errors") - private val serverNotificationsGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: Server Notifications") - private val bindingSuggestionGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: Binding Suggestions") - private val openInIdeGroup: NotificationGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: Open in IDE") - private val secretDetectionGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: Secrets detection") - private val taintGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: Taint vulnerabilities") - private val analyzerRequirementGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: Analyzer Requirement") - private val sonarlintGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint") + private val inContextPromotionGroup = + NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: In Context Promotions") + private val bindingProblemGroup = + NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: Server Binding Errors") + private val serverNotificationsGroup = + NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: Server Notifications") + private val bindingSuggestionGroup = + NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: Binding Suggestions") + private val openInIdeGroup: NotificationGroup = + NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: Open in IDE") + private val secretDetectionGroup = + NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: Secrets detection") + private val taintGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: Taint vulnerabilities") + private val analyzerRequirementGroup = + NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: Analyzer Requirement") + private val sonarlintGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ") private var storageErrorNotificationShown = AtomicBoolean(false) private var lastBindingSuggestion: Notification? = null @@ -105,7 +112,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { "Project binding is invalid and has been removed, the connection has probably been deleted previously.", NotificationType.WARNING ).apply { - icon = SonarLintIcons.SONARLINT + icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ addAction(OpenProjectSettingsAction(myProject)) isImportant = true notify(myProject) @@ -118,11 +125,11 @@ class SonarLintProjectNotifications(private val myProject: Project) { content, NotificationType.INFORMATION ).apply { - addAction(OpenTrackedLinkAction("Try SonarCloud for free", LinkTelemetry.SONARCLOUD_SIGNUP_PAGE)) - addAction(OpenTrackedLinkAction("Download SonarQube", LinkTelemetry.SONARQUBE_EDITIONS_DOWNLOADS)) + addAction(OpenTrackedLinkAction("Try SonarQube Cloud for free", LinkTelemetry.SONARCLOUD_SIGNUP_PAGE)) + addAction(OpenTrackedLinkAction("Download SonarQube Server", LinkTelemetry.SONARQUBE_EDITIONS_DOWNLOADS)) addAction(OpenInBrowserAction("Learn more", null, CONNECTED_MODE_BENEFITS_LINK)) addAction(DontAskAgainAction()) - icon = SonarLintIcons.SONARLINT + icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ notify(myProject) } } @@ -138,7 +145,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { ) } else { notifyBindingSuggestions( - "Bind this project to SonarCloud or SonarQube?", + "Bind this project to SonarQube (Server, Cloud)?", if (suggestedBindings.isEmpty()) OpenProjectSettingsAction( myProject, "Configure binding" @@ -159,7 +166,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { addAction(DisableBindingSuggestionsAction()) collapseDirection = Notification.CollapseActionsDirection.KEEP_LEFTMOST isImportant = true - icon = SonarLintIcons.SONARLINT + icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ notify(myProject) } } @@ -173,7 +180,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { ).apply { Arrays.stream(mainActions).forEach { action: AnAction -> addAction(action) } isImportant = true - icon = SonarLintIcons.SONARLINT + icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ notify(myProject) } } @@ -198,16 +205,16 @@ class SonarLintProjectNotifications(private val myProject: Project) { } val isSonarCloud = connection.map { obj: ServerConnection -> obj.isSonarCloud }.orElse(false) - val label = if (isSonarCloud) "SonarCloud" else "SonarQube" + val label = if (isSonarCloud) "SonarQube Cloud" else "SonarQube Server" serverNotificationsGroup.createNotification( "$label Notification", smartNotificationParams.text, NotificationType.INFORMATION ).apply { icon = if (isSonarCloud) { - SonarLintIcons.ICON_SONARCLOUD_16 + SonarLintIcons.ICON_SONARQUBE_CLOUD_16 } else { - SonarLintIcons.ICON_SONARQUBE_16 + SonarLintIcons.ICON_SONARQUBE_SERVER_16 } isImportant = true addAction(OpenInServerAction(label, smartNotificationParams.link, smartNotificationParams.category)) @@ -222,7 +229,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { content, NotificationType.INFORMATION ).apply { - icon = SonarLintIcons.SONARLINT + icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ isImportant = true notify(myProject) } @@ -236,7 +243,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { group.createNotification( title, content, NotificationType.ERROR ).apply { - icon = SonarLintIcons.SONARLINT + icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ isImportant = true addAction(ShowLogAction()) notify(myProject) @@ -247,7 +254,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { group.createNotification( "", content, NotificationType.WARNING ).apply { - icon = SonarLintIcons.SONARLINT + icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ isImportant = true addAction(ShowLogAction()) notify(myProject) @@ -256,13 +263,13 @@ class SonarLintProjectNotifications(private val myProject: Project) { fun sendNotification() { secretDetectionGroup.createNotification( - "SonarLint: secret(s) detected", - "SonarLint detected some secrets in one of the open files. " + + "SonarQube for IntelliJ: secret(s) detected", + "SonarQube for IntelliJ detected some secrets in one of the open files. " + "We strongly advise you to review those secrets and ensure they are not committed into repositories. " + - "Please refer to the SonarLint tool window for more information.", + "Please refer to the SonarQube for IntelliJ tool window for more information.", NotificationType.WARNING ).apply { - icon = SonarLintIcons.SONARLINT + icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ setImportant(true) notify(myProject) } @@ -274,7 +281,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { content, NotificationType.WARNING ).apply { - icon = SonarLintIcons.SONARLINT + icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ setImportant(true) Stream.of(*actions).forEach(this::addAction) notify(myProject) @@ -287,7 +294,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { message, NotificationType.WARNING ).apply { - icon = SonarLintIcons.SONARLINT + icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ action?.let { addAction(it) } addAction(DontShowAgainAction(doNotShowAgainId)) notify(myProject) @@ -301,7 +308,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { message, NotificationType.WARNING ).apply { - icon = SonarLintIcons.SONARLINT + icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ addAction(ShareConfigurationAction("Share configuration")) addAction(DontShowAgainAction(doNotShowAgainId)) notify(myProject) @@ -315,7 +322,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { message, NotificationType.INFORMATION ).apply { - icon = SonarLintIcons.SONARLINT + icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ action?.let { addAction(it) } addAction(DontShowAgainAction(doNotShowAgainId)) notify(myProject) @@ -328,7 +335,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { message, type ).apply { - icon = SonarLintIcons.SONARLINT + icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ Stream.of(*actions).forEach(this::addAction) notify(myProject) } diff --git a/src/main/java/org/sonarlint/intellij/sharing/AutomaticSharedConfigCreator.kt b/src/main/java/org/sonarlint/intellij/sharing/AutomaticSharedConfigCreator.kt index c3efeafc37..028a12905a 100644 --- a/src/main/java/org/sonarlint/intellij/sharing/AutomaticSharedConfigCreator.kt +++ b/src/main/java/org/sonarlint/intellij/sharing/AutomaticSharedConfigCreator.kt @@ -98,11 +98,11 @@ class AutomaticSharedConfigCreator( private val tokenGenerationButton = JButton("Generate Token") init { - title = if (isSQ) "Connect to This SonarQube Server?" else "Connect to SonarCloud?" + title = if (isSQ) "Connect to This SonarQube Server Instance?" else "Connect to SonarQube Cloud?" val connectionNames = getGlobalSettings().serverNames connectionNameField.text = findFirstUniqueConnectionName(connectionNames, orgOrServerUrl) - val connectionActionName = if (isSQ) "Connect to This SonarQube Server" else "Connect to SonarCloud" + val connectionActionName = if (isSQ) "Connect to This SonarQube Server Instance" else "Connect to SonarQube Cloud" createConnectionAction = object : DialogWrapperAction(connectionActionName) { init { putValue(DEFAULT_ACTION, true) @@ -168,11 +168,11 @@ class AutomaticSharedConfigCreator( .orElseThrow { IllegalStateException("Unable to find connection '${connectionNameField.text}'") } getService(project, ProjectBindingManager::class.java).bindTo(connection, projectKey, emptyMap(), bindingMode) - val connectionTypeMessage = if (isSQ) "SonarQube server" else "SonarCloud organization" + val connectionTypeMessage = if (isSQ) "SonarQube Server instance" else "SonarQube Cloud organization" SonarLintProjectNotifications.get(project).simpleNotification( "Project successfully bound", "Local project bound to project '$projectKey' of $connectionTypeMessage '${connection.name}'. " + - "You can now enjoy all capabilities of SonarLint Connected Mode. The binding of this project can be updated in the SonarLint settings.", + "You can now enjoy all capabilities of SonarQube for IntelliJ Connected Mode. The binding of this project can be updated in the SonarQube for IntelliJ settings.", NotificationType.INFORMATION, OpenInBrowserAction("Learn more", null, SonarLintDocumentation.Intellij.CONNECTED_MODE_BENEFITS_LINK) ) @@ -191,9 +191,9 @@ class AutomaticSharedConfigCreator( GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.NONE, JBUI.insets(0, 10), 0, 18) ) - val sqOrScMessage = if (isSQ) "SonarQube" else "SonarCloud" + val sqOrScMessage = if (isSQ) "SonarQube Server" else "SonarQube Cloud" connectedModeDescriptionLabel.text = - "Connect SonarLint with $sqOrScMessage to apply the same Clean Code standards as your team, analyze more languages, " + + "Connect SonarQube for IntelliJ with $sqOrScMessage to apply the same Clean Code standards as your team, analyze more languages, " + "detect more issues, and receive notifications about the quality gate status." connectedModeDescriptionLabel.addHyperlinkListener(object : HyperlinkAdapter() { override fun hyperlinkActivated(e: HyperlinkEvent) { @@ -205,7 +205,7 @@ class AutomaticSharedConfigCreator( GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, JBUI.insetsBottom(20), 0, 0) ) - connectionLabel.text = if (isSQ) "Server URL" else "SonarCloud organization" + connectionLabel.text = if (isSQ) "Server URL" else "SonarQube Cloud organization" projectKeyLabel.text = "Project key" centerPanel.add( projectKeyLabel, @@ -229,8 +229,8 @@ class AutomaticSharedConfigCreator( if (isSQ) { redWarningIcon.icon = AllIcons.Ide.FatalError - warningLabel.text = "Always ensure that your Server URL matches your SonarQube instance. " + - "Letting SonarLint connect to an untrusted SonarQube server is potentially dangerous." + warningLabel.text = "Always ensure that your Server URL matches your SonarQube Server instance. " + + "Letting SonarQube for IntelliJ connect to an untrusted SonarQube Server instance is potentially dangerous." val warningPanel = JBPanel>(BorderLayout()).apply { add(redWarningIcon, BorderLayout.WEST) add(warningLabel, BorderLayout.CENTER) diff --git a/src/main/java/org/sonarlint/intellij/sharing/ConfigurationSharing.kt b/src/main/java/org/sonarlint/intellij/sharing/ConfigurationSharing.kt index 103a195abc..8eefd4e461 100644 --- a/src/main/java/org/sonarlint/intellij/sharing/ConfigurationSharing.kt +++ b/src/main/java/org/sonarlint/intellij/sharing/ConfigurationSharing.kt @@ -129,7 +129,8 @@ class ConfigurationSharing { } val connectionKind = getService(project, ProjectBindingManager::class.java) - .tryGetServerConnection().map { if (it.isSonarCloud) "SonarCloud organization" else "SonarQube server" }.orElse(null) + .tryGetServerConnection().map { if (it.isSonarCloud) "SonarQube Cloud organization" else "SonarQube Server instance" } + .orElse(null) ?: run { SonarLintConsole.get(project).error("Connection is not present") return false diff --git a/src/main/java/org/sonarlint/intellij/sharing/SonarLintSharedFolderUtils.kt b/src/main/java/org/sonarlint/intellij/sharing/SonarLintSharedFolderUtils.kt index 2d9a24b61d..539739f20d 100644 --- a/src/main/java/org/sonarlint/intellij/sharing/SonarLintSharedFolderUtils.kt +++ b/src/main/java/org/sonarlint/intellij/sharing/SonarLintSharedFolderUtils.kt @@ -62,7 +62,7 @@ class SonarLintSharedFolderUtils { getService( module.project, SonarLintConsole::class.java - ).debug("Several candidate Vcs repositories detected for module $module, choosing first") + ).debug("Several candidate VCS repositories detected for module $module, choosing first") } repositories.first() }.toSet().firstOrNull()?.getGitDir() diff --git a/src/main/java/org/sonarlint/intellij/tasks/ConnectionTestTask.kt b/src/main/java/org/sonarlint/intellij/tasks/ConnectionTestTask.kt index cee82f4bfa..7b73336c6a 100644 --- a/src/main/java/org/sonarlint/intellij/tasks/ConnectionTestTask.kt +++ b/src/main/java/org/sonarlint/intellij/tasks/ConnectionTestTask.kt @@ -30,7 +30,7 @@ import org.sonarsource.sonarlint.core.rpc.protocol.backend.connection.validate.V class ConnectionTestTask(private val server: ServerConnection) : Task.WithResult( - null, "Test Connection to " + if (server.isSonarCloud) "SonarCloud" else "SonarQube", true + null, "Test Connection to " + if (server.isSonarCloud) "SonarQube Cloud" else "SonarQube Server", true ) { override fun compute(indicator: ProgressIndicator): ValidateConnectionResponse? { diff --git a/src/main/java/org/sonarlint/intellij/tasks/FutureAwaitingTask.kt b/src/main/java/org/sonarlint/intellij/tasks/FutureAwaitingTask.kt index 316a297770..ec706d2d34 100644 --- a/src/main/java/org/sonarlint/intellij/tasks/FutureAwaitingTask.kt +++ b/src/main/java/org/sonarlint/intellij/tasks/FutureAwaitingTask.kt @@ -46,11 +46,11 @@ open class FutureAwaitingTask( } return try { future.get(100, TimeUnit.MILLISECONDS) - } catch (t: TimeoutException) { + } catch (_: TimeoutException) { continue - } catch (e: InterruptedException) { + } catch (_: InterruptedException) { throw InterruptedException("Interrupted") - } catch (e: CancellationException) { + } catch (_: CancellationException) { throw InterruptedException("Operation cancelled") } catch (e: ExecutionException) { throw e.cause ?: e diff --git a/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationTask.java b/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationTask.java index 49a99b9b21..2cf90af359 100644 --- a/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationTask.java +++ b/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationTask.java @@ -39,7 +39,7 @@ public class GetOrganizationTask extends Task.Modal { private OrganizationDto organization; public GetOrganizationTask(ServerConnection server, String organizationKey) { - super(null, "Fetch Organization From SonarCloud", true); + super(null, "Fetch Organization From SonarQube Cloud", true); this.server = server; this.organizationKey = organizationKey; } diff --git a/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationsTask.java b/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationsTask.java index cccffb0646..702fec747e 100644 --- a/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationsTask.java +++ b/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationsTask.java @@ -41,7 +41,7 @@ public class GetOrganizationsTask extends Task.Modal { private List organizations; public GetOrganizationsTask(ServerConnection connection) { - super(null, "Fetch Organizations from SonarCloud", true); + super(null, "Fetch Organizations from SonarQube Cloud", true); this.connection = connection; } diff --git a/src/main/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandler.java b/src/main/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandler.java index 96eaca4d61..9b25faa75a 100644 --- a/src/main/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandler.java +++ b/src/main/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandler.java @@ -84,7 +84,7 @@ public SonarLintCheckinHandler(Project project, CheckinProjectPanel checkinPanel @Override @Nullable public RefreshableOnComponent getBeforeCheckinConfigurationPanel() { - this.checkBox = new NonFocusableCheckBox("Perform SonarLint analysis"); + this.checkBox = new NonFocusableCheckBox("Perform SonarQube for IntelliJ analysis"); return new MyRefreshableOnComponent(checkBox); } @@ -103,7 +103,7 @@ public ReturnResult beforeCheckin(@Nullable CommitExecutor executor, PairConsume return ReturnResult.CANCEL; } - new Task.Modal(project, "Waiting for SonarLint Analysis", true) { + new Task.Modal(project, "Waiting for SonarQube for IntelliJ Analysis", true) { public void run(@NotNull final ProgressIndicator progressIndicator) { new Timer().scheduleAtFixedRate(new TimerTask() { @Override @@ -129,7 +129,7 @@ public void run() { } private void handleError(Exception e, int numFiles) { - var msg = "SonarLint - Error analysing " + numFiles + " changed file(s)."; + var msg = "SonarQube for IntelliJ - Error analysing " + numFiles + " changed file(s)."; if (e.getMessage() != null) { msg = msg + ": " + e.getMessage(); } @@ -211,15 +211,15 @@ private static String createMessage(long filesAnalyzed, long numIssues, long num warningAboutLeakedSecrets = String.format(""" - SonarLint analysis found %d %s. Committed secrets may lead to unauthorized system access.""", numSecretsIssues, secretWord); + SonarQube for IntelliJ analysis found %d %s. Committed secrets may lead to unauthorized system access.""", numSecretsIssues, secretWord); } var message = new StringBuilder(); if (numBlockerIssues > 0) { var blocker = SonarLintUtils.pluralize("issue", numBlockerIssues); - message.append(String.format("SonarLint analysis on %d %s found %d %s (including %d blocker %s)", filesAnalyzed, files, + message.append(String.format("SonarQube for IntelliJ analysis on %d %s found %d %s (including %d blocker %s)", filesAnalyzed, files, numIssues, issues, numBlockerIssues, blocker)); } else { - message.append(String.format("SonarLint analysis on %d %s found %d %s", filesAnalyzed, files, numIssues, issues)); + message.append(String.format("SonarQube for IntelliJ analysis on %d %s found %d %s", filesAnalyzed, files, numIssues, issues)); } message.append(warningAboutLeakedSecrets); return message.toString(); @@ -228,7 +228,7 @@ private static String createMessage(long filesAnalyzed, long numIssues, long num private ReturnResult showYesNoCancel(String resultStr) { final var answer = Messages.showYesNoCancelDialog(project, resultStr, - "SonarLint Analysis Results", + "SonarQube for IntelliJ Analysis Results", "&Review Issues", "C&ontinue", "Cancel", @@ -264,7 +264,7 @@ public JComponent getComponent() { panel.add(checkBox); var dumb = DumbService.isDumb(project); checkBox.setEnabled(!dumb); - checkBox.setToolTipText(dumb ? "SonarLint analysis is impossible until indices are up-to-date" : ""); + checkBox.setToolTipText(dumb ? "SonarQube for IntelliJ analysis is impossible until indices are up-to-date" : ""); return panel; } diff --git a/src/main/java/org/sonarlint/intellij/ui/AbstractIssuesPanel.java b/src/main/java/org/sonarlint/intellij/ui/AbstractIssuesPanel.java index fcd93ed37d..f7773f1b49 100644 --- a/src/main/java/org/sonarlint/intellij/ui/AbstractIssuesPanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/AbstractIssuesPanel.java @@ -56,7 +56,7 @@ import static org.sonarlint.intellij.util.ThreadUtilsKt.runOnPooledThread; public abstract class AbstractIssuesPanel extends SimpleToolWindowPanel implements Disposable { - private static final String ID = "SonarLint"; + private static final String ID = "SonarQube for IntelliJ"; protected final Project project; protected Tree tree; protected Tree oldTree; @@ -204,7 +204,7 @@ public void updateOnSelect(@Nullable LiveFinding issue, Show } else { if (showFinding.getCodeSnippet() == null) { SonarLintProjectNotifications.Companion.get(project) - .notifyUnableToOpenFinding("The issue could not be detected by SonarLint in the current code"); + .notifyUnableToOpenFinding("The issue could not be detected by SonarQube for IntelliJ in the current code"); return; } runOnPooledThread(project, () -> { @@ -212,7 +212,7 @@ public void updateOnSelect(@Nullable LiveFinding issue, Show var rangeMarker = computeReadActionSafely(project, () -> matcher.matchWithCode(showFinding.getFile(), showFinding.getTextRange(), showFinding.getCodeSnippet())); if (rangeMarker == null) { SonarLintProjectNotifications.Companion.get(project) - .notifyUnableToOpenFinding("The issue could not be detected by SonarLint in the current code"); + .notifyUnableToOpenFinding("The issue could not be detected by SonarQube for IntelliJ in the current code"); return; } diff --git a/src/main/java/org/sonarlint/intellij/ui/AutoTriggerStatusPanel.java b/src/main/java/org/sonarlint/intellij/ui/AutoTriggerStatusPanel.java index 366f77dad1..49915e9602 100644 --- a/src/main/java/org/sonarlint/intellij/ui/AutoTriggerStatusPanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/AutoTriggerStatusPanel.java @@ -60,7 +60,7 @@ public class AutoTriggerStatusPanel { private static final String POWER_SAVE_MODE_ENABLED = "POWER_SAVE_MODE_ENABLED"; private static final String AUTO_TRIGGER_DISABLED = "AUTO_TRIGGER_DISABLED"; - private static final String TOOLTIP = "Some files are not automatically analyzed. Check the SonarLint debug logs for details."; + private static final String TOOLTIP = "Some files are not automatically analyzed. Check the SonarQube for IntelliJ debug logs for details."; private static final String POWER_SAVE_MODE_TOOLTIP = "Disable power save mode for automatic analysis"; diff --git a/src/main/java/org/sonarlint/intellij/ui/BindingSuggestionSelectionDialog.kt b/src/main/java/org/sonarlint/intellij/ui/BindingSuggestionSelectionDialog.kt index cb0d5a7e11..d162132836 100644 --- a/src/main/java/org/sonarlint/intellij/ui/BindingSuggestionSelectionDialog.kt +++ b/src/main/java/org/sonarlint/intellij/ui/BindingSuggestionSelectionDialog.kt @@ -61,7 +61,7 @@ class BindingSuggestionRenderer : val attrs = SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES getGlobalSettings().getServerConnectionByName(suggestion.connectionId) .ifPresentOrElse({ - icon = if (it.isSonarCloud) SonarLintIcons.ICON_SONARCLOUD_16 else SonarLintIcons.ICON_SONARQUBE_16 + icon = if (it.isSonarCloud) SonarLintIcons.ICON_SONARQUBE_CLOUD_16 else SonarLintIcons.ICON_SONARQUBE_SERVER_16 append(suggestion.projectName, attrs, true) append(" (" + suggestion.projectKey + ")", SimpleTextAttributes.GRAY_ATTRIBUTES, false) append(" on connection [" + suggestion.connectionId + "]", SimpleTextAttributes.GRAY_ATTRIBUTES, false) diff --git a/src/main/java/org/sonarlint/intellij/ui/CurrentFileConnectedModePanel.java b/src/main/java/org/sonarlint/intellij/ui/CurrentFileConnectedModePanel.java index 10164b5c1f..308ddb32fd 100644 --- a/src/main/java/org/sonarlint/intellij/ui/CurrentFileConnectedModePanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/CurrentFileConnectedModePanel.java @@ -109,7 +109,7 @@ private NotConnectedCard() { super(SonarLintIcons.NOT_CONNECTED); var notConnectedTooltip = new TooltipWithClickableLinks.ForBrowser(this, "

Not Connected

" + - "

Click to synchronize your project with SonarCloud or SonarQube.

" + + "

Click to synchronize your project with SonarQube (Server, Cloud).

" + "

Learn More

"); IdeTooltipManager.getInstance().setCustomTooltip(this, notConnectedTooltip); } @@ -120,7 +120,7 @@ private ErrorCard() { super(SonarLintIcons.CONNECTION_ERROR); var errorTooltip = new TooltipWithClickableLinks(this, "

Connected Mode Error

" + - "

There was an issue, please check for additional details in the SonarLint Log.

" + + "

There was an issue, please check for additional details in the SonarQube for IntelliJ Log.

" + "

Open Log

", new HyperlinkAdapter() { @Override diff --git a/src/main/java/org/sonarlint/intellij/ui/CurrentFilePanel.java b/src/main/java/org/sonarlint/intellij/ui/CurrentFilePanel.java index 7df6d92010..35565fdd09 100644 --- a/src/main/java/org/sonarlint/intellij/ui/CurrentFilePanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/CurrentFilePanel.java @@ -66,7 +66,7 @@ public class CurrentFilePanel extends AbstractIssuesPanel { - public static final String SONARLINT_TOOLWINDOW_ID = "SonarLint"; + public static final String SONARLINT_TOOLWINDOW_ID = "SonarQube for IntelliJ"; private static final String SPLIT_PROPORTION_PROPERTY = "SONARLINT_ISSUES_SPLIT_PROPORTION"; private final JBPanelWithEmptyText issuesPanel; private final JScrollPane treeScrollPane; @@ -133,7 +133,7 @@ public void update(@Nullable VirtualFile file, @Nullable Collection i var backendIsAlive = getService(BackendService.class).isAlive(); if (!backendIsAlive) { statusText.setText(SONARLINT_ERROR_MSG); - statusText.appendLine("Restart SonarLint Service", SimpleTextAttributes.LINK_PLAIN_ATTRIBUTES, + statusText.appendLine("Restart SonarQube for IntelliJ Service", SimpleTextAttributes.LINK_PLAIN_ATTRIBUTES, ignore -> ActionUtil.invokeAction(restartSonarLintAction, this, CurrentFilePanel.SONARLINT_TOOLWINDOW_ID, null, null)); disableEmptyDisplay(false); populateSubTree(tree, treeBuilder, Map.of()); @@ -157,7 +157,7 @@ public void update(@Nullable VirtualFile file, @Nullable Collection i ignore -> ActionUtil.invokeAction(analyzeCurrentFileAction, this, CurrentFilePanel.SONARLINT_TOOLWINDOW_ID, null, null)); } } else { - statusText.setText("Waiting for SonarLint to be ready"); + statusText.setText("Waiting for SonarQube for IntelliJ to be ready"); } issues = Collections.emptyList(); @@ -216,7 +216,7 @@ private void updateIcon(@Nullable VirtualFile file, Collection issues private static void doUpdateIcon(@Nullable VirtualFile file, Collection issues, ToolWindow toolWindow) { ApplicationManager.getApplication().assertIsDispatchThread(); boolean empty = file == null || issues.isEmpty(); - toolWindow.setIcon(empty ? SonarLintIcons.SONARLINT_TOOLWINDOW_EMPTY : SonarLintIcons.SONARLINT_TOOLWINDOW); + toolWindow.setIcon(empty ? SonarLintIcons.SONARQUBE_FOR_INTELLIJ_EMPTY_TOOLWINDOW : SonarLintIcons.SONARQUBE_FOR_INTELLIJ_TOOLWINDOW); } private void expandTree() { diff --git a/src/main/java/org/sonarlint/intellij/ui/CurrentFileStatusPanel.java b/src/main/java/org/sonarlint/intellij/ui/CurrentFileStatusPanel.java index ff16d02568..3b21a18b9e 100644 --- a/src/main/java/org/sonarlint/intellij/ui/CurrentFileStatusPanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/CurrentFileStatusPanel.java @@ -34,7 +34,7 @@ public class CurrentFileStatusPanel extends JBPanel { private final Project project; - public static final String HELP_TEXT = "SonarLint analyzes in real-time the active file only, and reports any issues found in this view. "; + public static final String HELP_TEXT = "SonarQube for IntelliJ analyzes in real-time the active file only, and reports any issues found in this view. "; CurrentFileStatusPanel(Project project) { super(new BorderLayout()); diff --git a/src/main/java/org/sonarlint/intellij/ui/ReportPanel.java b/src/main/java/org/sonarlint/intellij/ui/ReportPanel.java index 94e3f80f86..c421b51e17 100644 --- a/src/main/java/org/sonarlint/intellij/ui/ReportPanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/ReportPanel.java @@ -76,7 +76,7 @@ public class ReportPanel extends SimpleToolWindowPanel implements Disposable { private static final String SPLIT_PROPORTION_PROPERTY = "SONARLINT_ANALYSIS_RESULTS_SPLIT_PROPORTION"; - private static final String ID = "SonarLint"; + private static final String ID = "SonarQube for IntelliJ"; protected final Project project; private final LastAnalysisPanel lastAnalysisPanel; private final ReportTabStatusPanel whatsNewPanel; @@ -211,7 +211,7 @@ private void handleEmptyView() { var backendIsAlive = getService(BackendService.class).isAlive(); if (!backendIsAlive) { statusText.setText(SONARLINT_ERROR_MSG); - statusText.appendLine("Restart SonarLint Service", SimpleTextAttributes.LINK_PLAIN_ATTRIBUTES, + statusText.appendLine("Restart SonarQube for IntelliJ Service", SimpleTextAttributes.LINK_PLAIN_ATTRIBUTES, ignore -> ActionUtil.invokeAction(restartSonarLintAction, this, CurrentFilePanel.SONARLINT_TOOLWINDOW_ID, null, null)); } else { var sonarLintActions = SonarLintActions.getInstance(); diff --git a/src/main/java/org/sonarlint/intellij/ui/SecurityHotspotsPanel.java b/src/main/java/org/sonarlint/intellij/ui/SecurityHotspotsPanel.java index 8e5b89dcfa..d96689babd 100644 --- a/src/main/java/org/sonarlint/intellij/ui/SecurityHotspotsPanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/SecurityHotspotsPanel.java @@ -128,7 +128,7 @@ private void initPanel() { sonarConfigureProject = new SonarConfigureProject(); notSupportedPanel = centeredLabel("Security Hotspots are currently not supported", "Configure Binding", sonarConfigureProject); - cardPanel.add(centeredLabel(SONARLINT_ERROR_MSG, "Restart SonarLint Service", new RestartBackendAction()), SONARLINT_ERROR_CARD_ID); + cardPanel.add(centeredLabel(SONARLINT_ERROR_MSG, "Restart SonarQube for IntelliJ Service", new RestartBackendAction()), SONARLINT_ERROR_CARD_ID); cardPanel.add(notSupportedPanel, NOT_SUPPORTED_CARD_ID); cardPanel.add(centeredLabel("No Security Hotspots found for currently opened files in the latest analysis", null, null), NO_SECURITY_HOTSPOT_CARD_ID); cardPanel.add(centeredLabel("No Security Hotspots shown due to the current filtering", null, null), NO_SECURITY_HOTSPOT_FILTERED_CARD_ID); @@ -145,7 +145,7 @@ private static DefaultActionGroup createActionGroup() { actionGroup.add(sonarLintActions.filterSecurityHotspots()); actionGroup.add(sonarLintActions.includeResolvedHotspotAction()); actionGroup.add(sonarLintActions.configure()); - actionGroup.add(new OpenInBrowserAction("Learn More", "Learn more about Security Hotspots in SonarLint", SECURITY_HOTSPOTS_LINK, AllIcons.Actions.Help)); + actionGroup.add(new OpenInBrowserAction("Learn More", "Learn more about Security Hotspots in SonarQube for IntelliJ", SECURITY_HOTSPOTS_LINK, AllIcons.Actions.Help)); return actionGroup; } diff --git a/src/main/java/org/sonarlint/intellij/ui/SonarLintLogPanel.java b/src/main/java/org/sonarlint/intellij/ui/SonarLintLogPanel.java index 0289547364..249e824062 100644 --- a/src/main/java/org/sonarlint/intellij/ui/SonarLintLogPanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/SonarLintLogPanel.java @@ -27,7 +27,6 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.SimpleToolWindowPanel; import com.intellij.openapi.wm.ToolWindow; -import com.intellij.openapi.wm.ex.ToolWindowEx; import javax.swing.Box; import org.sonarlint.intellij.actions.ToolWindowLogAnalysisAction; import org.sonarlint.intellij.actions.ToolWindowVerboseModeAction; @@ -39,7 +38,7 @@ import static org.sonarlint.intellij.ui.UiUtils.runOnUiThread; public class SonarLintLogPanel extends SimpleToolWindowPanel { - private static final String ID = "SonarLint"; + private static final String ID = "SonarQube for IntelliJ"; private final ToolWindow toolWindow; private final Project project; @@ -82,7 +81,7 @@ private void addLogActions() { var group = new DefaultActionGroup(); group.add(new ToolWindowLogAnalysisAction()); group.add(new ToolWindowVerboseModeAction()); - ((ToolWindowEx) toolWindow).setAdditionalGearActions(group); + toolWindow.setAdditionalGearActions(group); } private void addConsole() { diff --git a/src/main/java/org/sonarlint/intellij/ui/SonarLintToolWindowFactory.java b/src/main/java/org/sonarlint/intellij/ui/SonarLintToolWindowFactory.java index ec39b31f61..5eec9467b7 100644 --- a/src/main/java/org/sonarlint/intellij/ui/SonarLintToolWindowFactory.java +++ b/src/main/java/org/sonarlint/intellij/ui/SonarLintToolWindowFactory.java @@ -46,7 +46,7 @@ * Nothing can be injected as it runs in the root pico container. */ public class SonarLintToolWindowFactory implements ToolWindowFactory { - public static final String TOOL_WINDOW_ID = "SonarLint"; + public static final String TOOL_WINDOW_ID = "SonarQube for IntelliJ"; public static final String LOG_TAB_TITLE = "Log"; public static final String CURRENT_FILE_TAB_TITLE = "Current File"; public static final String REPORT_TAB_TITLE = "Report"; diff --git a/src/main/java/org/sonarlint/intellij/ui/inlay/FixSuggestionInlayPanel.kt b/src/main/java/org/sonarlint/intellij/ui/inlay/FixSuggestionInlayPanel.kt index 8257f58cc2..1c99af7c73 100644 --- a/src/main/java/org/sonarlint/intellij/ui/inlay/FixSuggestionInlayPanel.kt +++ b/src/main/java/org/sonarlint/intellij/ui/inlay/FixSuggestionInlayPanel.kt @@ -145,8 +145,8 @@ class FixSuggestionInlayPanel( border = JBUI.Borders.empty(5) add( JBLabel( - "SonarLint Fix Suggestion (fix ${suggestion.snippetIndex}/${suggestion.totalSnippets})", - SonarLintIcons.SONARLINT, SwingConstants.LEFT + "SonarQube for IntelliJ Fix Suggestion (fix ${suggestion.snippetIndex}/${suggestion.totalSnippets})", + SonarLintIcons.SONARQUBE_FOR_INTELLIJ, SwingConstants.LEFT ), BorderLayout.WEST ) add(titleRightSidePanel, BorderLayout.EAST) diff --git a/src/main/java/org/sonarlint/intellij/ui/nodes/IssueNode.java b/src/main/java/org/sonarlint/intellij/ui/nodes/IssueNode.java index 29f9c70627..528f2f16b3 100644 --- a/src/main/java/org/sonarlint/intellij/ui/nodes/IssueNode.java +++ b/src/main/java/org/sonarlint/intellij/ui/nodes/IssueNode.java @@ -83,7 +83,7 @@ private void doRender(TreeCellRenderer renderer) { setIcon(renderer, new CompoundIcon(CompoundIcon.Axis.X_AXIS, gap, connection.getProductIcon(), impactIcon)); } else { renderer.setIconToolTip(impactText + " impact on " + qualityText); - var serverIconEmptySpace = SonarLintIcons.ICON_SONARQUBE_16.getIconWidth() + gap; + var serverIconEmptySpace = SonarLintIcons.ICON_SONARQUBE_SERVER_16.getIconWidth() + gap; setIcon(renderer, new OffsetIcon(serverIconEmptySpace, new CompoundIcon(CompoundIcon.Axis.X_AXIS, gap, impactIcon))); } } else { @@ -104,7 +104,7 @@ private void doRender(TreeCellRenderer renderer) { setIcon(renderer, new CompoundIcon(CompoundIcon.Axis.X_AXIS, gap, connection.getProductIcon(), typeIcon)); } else { renderer.setIconToolTip(severityText + " " + typeStr); - var serverIconEmptySpace = SonarLintIcons.ICON_SONARQUBE_16.getIconWidth() + gap; + var serverIconEmptySpace = SonarLintIcons.ICON_SONARQUBE_SERVER_16.getIconWidth() + gap; setIcon(renderer, new OffsetIcon(serverIconEmptySpace, new CompoundIcon(CompoundIcon.Axis.X_AXIS, gap, typeIcon))); } } diff --git a/src/main/java/org/sonarlint/intellij/ui/traffic/light/SonarLintDashboardPanel.kt b/src/main/java/org/sonarlint/intellij/ui/traffic/light/SonarLintDashboardPanel.kt index ada1959221..d79ad28718 100644 --- a/src/main/java/org/sonarlint/intellij/ui/traffic/light/SonarLintDashboardPanel.kt +++ b/src/main/java/org/sonarlint/intellij/ui/traffic/light/SonarLintDashboardPanel.kt @@ -173,9 +173,9 @@ class SonarLintDashboardPanel(private val editor: Editor) { connectionHelp.isVisible = false connectionIcon.isVisible = true if (serverConnection.isSonarCloud) { - connectionIcon.icon = SonarLintIcons.ICON_SONARCLOUD_16 + connectionIcon.icon = SonarLintIcons.ICON_SONARQUBE_CLOUD_16 } else { - connectionIcon.icon = SonarLintIcons.ICON_SONARQUBE_16 + connectionIcon.icon = SonarLintIcons.ICON_SONARQUBE_SERVER_16 } settings.projectKey?.let { projectKey -> bindingLabel.isVisible = true @@ -204,7 +204,7 @@ class SonarLintDashboardPanel(private val editor: Editor) { val gc = GridBag().nextLine() val constrains = gc.next() - val noAccessLabel = HyperlinkLabel("Restart SonarLint Service").apply { + val noAccessLabel = HyperlinkLabel("Restart SonarQube for IntelliJ Service").apply { addHyperlinkListener(object : HyperlinkAdapter() { override fun hyperlinkActivated(e: HyperlinkEvent) { getService(BackendService::class.java).restartBackendService() diff --git a/src/main/java/org/sonarlint/intellij/ui/traffic/light/SonarLintTrafficLightWidget.kt b/src/main/java/org/sonarlint/intellij/ui/traffic/light/SonarLintTrafficLightWidget.kt index 8ae74934ac..754d22d47d 100644 --- a/src/main/java/org/sonarlint/intellij/ui/traffic/light/SonarLintTrafficLightWidget.kt +++ b/src/main/java/org/sonarlint/intellij/ui/traffic/light/SonarLintTrafficLightWidget.kt @@ -144,13 +144,13 @@ class SonarLintTrafficLightWidget( fun refresh(model: SonarLintDashboardModel) { if (!model.isAlive) { - iconAndFindingsCountLabel.icon = SonarLintIcons.SONARLINT_ACTION_ORANGE_12PX + iconAndFindingsCountLabel.icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ_ORANGE_13PX iconAndFindingsCountLabel.text = model.findingsCount().toString() } else if (model.hasFindings()) { - iconAndFindingsCountLabel.icon = SonarLintIcons.SONARLINT_ACTION_12PX + iconAndFindingsCountLabel.icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ_RED_13PX iconAndFindingsCountLabel.text = model.findingsCount().toString() } else { - iconAndFindingsCountLabel.icon = SonarLintIcons.SONARLINT_ACTION_GREEN_12PX + iconAndFindingsCountLabel.icon = SonarLintIcons.SONARQUBE_FOR_INTELLIJ_GREEN_13PX iconAndFindingsCountLabel.text = null } dashboardPopup.refresh(model) diff --git a/src/main/java/org/sonarlint/intellij/ui/vulnerabilities/TaintVulnerabilitiesPanel.kt b/src/main/java/org/sonarlint/intellij/ui/vulnerabilities/TaintVulnerabilitiesPanel.kt index 8cd4c10abd..29bbe22682 100644 --- a/src/main/java/org/sonarlint/intellij/ui/vulnerabilities/TaintVulnerabilitiesPanel.kt +++ b/src/main/java/org/sonarlint/intellij/ui/vulnerabilities/TaintVulnerabilitiesPanel.kt @@ -117,10 +117,13 @@ class TaintVulnerabilitiesPanel(private val project: Project) : SimpleToolWindow init { val globalSettings = getGlobalSettings() cards.add( - centeredLabel(SONARLINT_ERROR_MSG, "Restart SonarLint Service", RestartBackendAction()), + centeredLabel(SONARLINT_ERROR_MSG, "Restart SonarQube for IntelliJ Service", RestartBackendAction()), ERROR_CARD_ID ) - cards.add(centeredLabel("The project is not bound to SonarCloud/SonarQube", "Configure Binding", SonarConfigureProject()), NO_BINDING_CARD_ID) + cards.add( + centeredLabel("The project is not bound to SonarQube (Server, Cloud)", "Configure Binding", SonarConfigureProject()), + NO_BINDING_CARD_ID + ) cards.add(centeredLabel("The project binding is invalid", "Edit Binding", SonarConfigureProject()), INVALID_BINDING_CARD_ID) cards.add(centeredLabel("No taint vulnerabilities shown due to the current filtering", "Show Resolved Taint Vulnerabilities", SonarLintActions.getInstance().includeResolvedTaintVulnerabilitiesAction()), NO_FILTERED_TAINT_VULNERABILITIES_CARD_ID) @@ -151,7 +154,12 @@ class TaintVulnerabilitiesPanel(private val project: Project) : SimpleToolWindow RefreshTaintVulnerabilitiesAction(), sonarLintActions.includeResolvedTaintVulnerabilitiesAction(), sonarLintActions.configure(), - OpenInBrowserAction(LEARN_MORE, "Learn more about taint vulnerabilities in SonarLint", TAINT_VULNERABILITIES_LINK, AllIcons.Actions.Help) + OpenInBrowserAction( + LEARN_MORE, + "Learn more about taint vulnerabilities in SonarQube for IntelliJ", + TAINT_VULNERABILITIES_LINK, + AllIcons.Actions.Help + ) )) applyFocusOnNewCodeSettings() } @@ -191,8 +199,14 @@ class TaintVulnerabilitiesPanel(private val project: Project) : SimpleToolWindow } private fun createDisclaimer(): StripePanel { - val stripePanel = StripePanel("This tab displays taint vulnerabilities detected by SonarCloud or SonarQube. SonarLint does not detect those issues locally.", Information) - stripePanel.addAction(LEARN_MORE, OpenInBrowserAction(LEARN_MORE, "Learn more about taint vulnerabilities in SonarLint", TAINT_VULNERABILITIES_LINK)) + val stripePanel = StripePanel( + "This tab displays taint vulnerabilities detected by SonarQube (Server, Cloud). SonarQube for IntelliJ does not detect those issues locally.", + Information + ) + stripePanel.addAction( + LEARN_MORE, + OpenInBrowserAction(LEARN_MORE, "Learn more about taint vulnerabilities in SonarQube for IntelliJ", TAINT_VULNERABILITIES_LINK) + ) stripePanel.addAction("Dismiss", object : AbstractSonarAction() { override fun actionPerformed(e: AnActionEvent) { stripePanel.isVisible = false @@ -360,7 +374,7 @@ class TaintVulnerabilitiesPanel(private val project: Project) : SimpleToolWindow runOnPooledThread(project) { if (showFinding.codeSnippet == null) { SonarLintProjectNotifications.get(project) - .notifyUnableToOpenFinding("The taint vulnerability could not be detected by SonarLint in the current code") + .notifyUnableToOpenFinding("The taint vulnerability could not be detected by SonarQube for IntelliJ in the current code") return@runOnPooledThread } val matcher = TextRangeMatcher(project) @@ -369,7 +383,7 @@ class TaintVulnerabilitiesPanel(private val project: Project) : SimpleToolWindow } if (rangeMarker == null) { SonarLintProjectNotifications.get(project) - .notifyUnableToOpenFinding("The taint vulnerability could not be detected by SonarLint in the current code") + .notifyUnableToOpenFinding("The taint vulnerability could not be detected by SonarQube for IntelliJ in the current code") return@runOnPooledThread } diff --git a/src/main/java/org/sonarlint/intellij/util/HelpLabelUtils.kt b/src/main/java/org/sonarlint/intellij/util/HelpLabelUtils.kt index a198562a15..967d33a16b 100644 --- a/src/main/java/org/sonarlint/intellij/util/HelpLabelUtils.kt +++ b/src/main/java/org/sonarlint/intellij/util/HelpLabelUtils.kt @@ -28,8 +28,9 @@ class HelpLabelUtils { fun createHelpTextNotConnected(helpText: String) = ContextHelpLabel.createWithLink(null, helpText + - "SonarCloud complements SonarLint by detecting more across the whole project.", - "Try SonarCloud for free", true) { + "SonarQube Cloud complements SonarQube for IntelliJ by detecting more across the whole project.", + "Try SonarQube Cloud for free", true + ) { LinkTelemetry.SONARCLOUD_SIGNUP_PAGE.browseWithTelemetry() } @@ -40,15 +41,15 @@ class HelpLabelUtils { @JvmStatic fun createCleanAsYouCode() = ContextHelpLabel.create( - "Use connected mode to benefit from an
accurate new code definition based on your SonarQube or SonarCloud settings." + + "Use Connected Mode to benefit from an
accurate new code definition based on your SonarQube (Server, Cloud) settings." + "
" + - "
Without connected mode, any code added or changed in the last 30 days is considered new code." + "
Without Connected Mode, any code added or changed in the last 30 days is considered new code." ) @JvmStatic fun createConnectedMode() = ContextHelpLabel.createWithLink(null, - "Connected Mode links SonarLint with SonarCloud or SonarQube to analyze more languages, detect more issues, and receive notifications about the quality gate status.", + "Connected Mode links SonarQube for IntelliJ with SonarQube (Server, Cloud) to analyze more languages, detect more issues, and receive notifications about the quality gate status.", "Learn more about Connected Mode", true) { LinkTelemetry.CONNECTED_MODE_DOCS.browseWithTelemetry() } diff --git a/src/main/java/org/sonarlint/intellij/util/ProgressUtils.kt b/src/main/java/org/sonarlint/intellij/util/ProgressUtils.kt index b124812c6a..1e989f4154 100644 --- a/src/main/java/org/sonarlint/intellij/util/ProgressUtils.kt +++ b/src/main/java/org/sonarlint/intellij/util/ProgressUtils.kt @@ -40,11 +40,11 @@ object ProgressUtils { } try { return future.get(100, TimeUnit.MILLISECONDS) - } catch (t: TimeoutException) { + } catch (_: TimeoutException) { continue - } catch (e: InterruptedException) { + } catch (_: InterruptedException) { throw ProcessCanceledException() - } catch (e: CancellationException) { + } catch (_: CancellationException) { throw ProcessCanceledException() } catch (e: ExecutionException) { throw e.cause ?: e diff --git a/src/main/java/org/sonarlint/intellij/util/SonarGotItTooltipsUtils.kt b/src/main/java/org/sonarlint/intellij/util/SonarGotItTooltipsUtils.kt index a82a671cd5..80b6d84382 100644 --- a/src/main/java/org/sonarlint/intellij/util/SonarGotItTooltipsUtils.kt +++ b/src/main/java/org/sonarlint/intellij/util/SonarGotItTooltipsUtils.kt @@ -35,7 +35,7 @@ object SonarGotItTooltipsUtils { fun showTrafficLightToolTip(component: JComponent, parent: Disposable) { // we pick a random project service that is disposable with(GotItTooltip(TRAFFIC_LIGHT_TOOLTIP_ID, TRAFFIC_LIGHT_TOOLTIP_TEXT, parent)) { - withIcon(SonarLintIcons.SONARLINT) + withIcon(SonarLintIcons.SONARQUBE_FOR_INTELLIJ) withPosition(Balloon.Position.above) show(component) { it, _ -> Point(-5, it.height / 2) } } diff --git a/src/main/java/org/sonarlint/intellij/util/SonarLintActions.java b/src/main/java/org/sonarlint/intellij/util/SonarLintActions.java index fac5579a31..568cd59ec1 100644 --- a/src/main/java/org/sonarlint/intellij/util/SonarLintActions.java +++ b/src/main/java/org/sonarlint/intellij/util/SonarLintActions.java @@ -83,16 +83,16 @@ public SonarLintActions() { "Clear analysis results", SonarLintIcons.CLEAN); clearIssuesAction = new ClearCurrentFileIssuesAction("Clear SonarLint Issues", - "Clear SonarLint issues", + "Clear SonarQube for IntelliJ issues", SonarLintIcons.CLEAN); cleanConsoleAction = new SonarCleanConsoleAction("Clear SonarLint Console", - "Clear SonarLint console", + "Clear SonarQube for IntelliJ console", SonarLintIcons.CLEAN); analyzeAllFilesAction = new SonarAnalyzeAllFilesAction("Analyze All Project Files", - "Run a SonarLint analysis on all project files", + "Run a SonarQube for IntelliJ analysis on all project files", SonarLintIcons.PROJECT); analyzeChangedFilesAction = new SonarAnalyzeChangedFilesAction("Analyze VCS Changed Files", - "Run a SonarLint analysis on VCS changed files", + "Run a SonarQube for IntelliJ analysis on VCS changed files", SonarLintIcons.SCM); filterAction = new FilterSecurityHotspotActionGroup("Filter Security Hotspots", "Filter Security Hotspots", @@ -110,7 +110,7 @@ public SonarLintActions() { SonarLintIcons.RESOLVED, LocalTaintVulnerability.class); analyzeCurrentFileAction = new SonarAnalyzeFilesAction("Analyze Current File", - "Run SonarLint analysis on the current file", + "Run SonarQube for IntelliJ analysis on the current file", SonarLintIcons.PLAY); restartSonarLintAction = new RestartBackendAction(); } diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index d991d26826..1ef7ad9aaf 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -21,40 +21,37 @@ --> org.sonarlint.idea - SonarLint + SonarQube for IDE ${project.version} SonarSource

- SonarLint by Sonar is a free IDE extension to find and fix coding issues in real-time, flagging issues as you code, just like a spell-checker. + SonarQube for IDE by Sonar is a free IDE extension to find and fix coding issues in real-time, flagging issues as you code, just like a spell-checker. More than a linter, it also delivers rich contextual guidance to help developers understand why there is an issue, assess the risk and educate them on how to fix it. This helps improve their skills, enhance their productivity, and take ownership of their code, taking linting to a different level.


- When paired with SonarQube or SonarCloud in connected mode, - SonarLint forms a powerful end-to-end code quality platform to enrich the CI/CD pipeline, ensuring any code edits or additions are clean. - In connected mode, your team can share common language rulesets, project analysis settings and more. + When paired with SonarQube Server or SonarQube Cloud in Connected Mode, + SonarQube for IDE forms a powerful end-to-end code quality platform to enrich the CI/CD pipeline, ensuring any code edits or additions are clean. + In Connected Mode, your team can share common language rulesets, project analysis settings and more.


- SonarLint is a powerful open-source tool for developers of all experience and skill levels, empowering them + SonarQube for IDE is a powerful open-source tool for developers of all experience and skill levels, empowering them to deliver Clean Code - code fit for development and production. An essential linting tool for every developer.


- SonarLint integrates with most JetBrains IDEs including - IntelliJ IDEA, CLion, GoLand, WebStorm, PHPStorm, PyCharm, Rider, Android Studio & RubyMine. Supported languages include + SonarQube for IDE integrates with most JetBrains IDEs including + IntelliJ IDEA, CLion, GoLand, WebStorm, PHPStorm, PyCharm, Rider, Aqua, AppCode, Android Studio & RubyMine. Supported languages include C, C++, Java, Go, JavaScript, TypeScript, Python, C#, Kotlin, Ruby, HTML, CSS, PHP & PL/SQL. The full list of supported languages and rules is available in our docs.


-

- Beginning in version 7.5, SonarLint can detect Security Hotspots when in Connected Mode with SonarQube 9.7+, or SonarCloud. -


Get started by checking the Requirements and Installation pages. @@ -202,8 +199,11 @@ - - + + @@ -251,27 +251,27 @@ - - - - - - - - - - - @@ -289,7 +289,8 @@ - + @@ -297,58 +298,59 @@ + text="Analyze with SonarQube for IntelliJ" + description="Run SonarQube for IntelliJ analysis on selected file(s)" + icon="org.sonarlint.intellij.SonarLintIcons.SONARQUBE_FOR_INTELLIJ_13PX"> - + + text="Exclude from SonarQube for IntelliJ Analysis" + description="Adds resources to the list exclusions in the SonarQube for IntelliJ project settings" + icon="org.sonarlint.intellij.SonarLintIcons.SONARQUBE_FOR_INTELLIJ_13PX"> + text="Analyze VCS Changed Files with SonarQube for IntelliJ" + description="Run a SonarQube for IntelliJ analysis on VCS changed files" + icon="org.sonarlint.intellij.SonarLintIcons.SONARQUBE_FOR_INTELLIJ_13PX"> + text="Analyze All Files with SonarQube for IntelliJ" + description="Run a SonarQube for IntelliJ analysis on all files in the project" + icon="org.sonarlint.intellij.SonarLintIcons.SONARQUBE_FOR_INTELLIJ_13PX"> diff --git a/src/main/resources/images/SonarCloud.png b/src/main/resources/images/SonarCloud.png deleted file mode 100644 index 7970d2a0f2..0000000000 Binary files a/src/main/resources/images/SonarCloud.png and /dev/null differ diff --git a/src/main/resources/images/SonarCloud_dark.png b/src/main/resources/images/SonarCloud_dark.png deleted file mode 100644 index 5bfad2097b..0000000000 Binary files a/src/main/resources/images/SonarCloud_dark.png and /dev/null differ diff --git a/src/main/resources/images/SonarQube.png b/src/main/resources/images/SonarQube.png deleted file mode 100644 index e0ae7398e2..0000000000 Binary files a/src/main/resources/images/SonarQube.png and /dev/null differ diff --git a/src/main/resources/images/SonarQube_dark.png b/src/main/resources/images/SonarQube_dark.png deleted file mode 100644 index f058da8e7c..0000000000 Binary files a/src/main/resources/images/SonarQube_dark.png and /dev/null differ diff --git a/src/main/resources/images/issue_annotation.png b/src/main/resources/images/issue_annotation.png deleted file mode 100644 index f46bf66ece..0000000000 Binary files a/src/main/resources/images/issue_annotation.png and /dev/null differ diff --git a/src/main/resources/images/onde-sonar-13.png b/src/main/resources/images/onde-sonar-13.png deleted file mode 100644 index 9eade15d68..0000000000 Binary files a/src/main/resources/images/onde-sonar-13.png and /dev/null differ diff --git a/src/main/resources/images/onde-sonar-16-execute.png b/src/main/resources/images/onde-sonar-16-execute.png deleted file mode 100644 index 8e261ce968..0000000000 Binary files a/src/main/resources/images/onde-sonar-16-execute.png and /dev/null differ diff --git a/src/main/resources/images/onde-sonar-16.png b/src/main/resources/images/onde-sonar-16.png deleted file mode 100644 index da84646430..0000000000 Binary files a/src/main/resources/images/onde-sonar-16.png and /dev/null differ diff --git a/src/main/resources/images/remove.png b/src/main/resources/images/remove.png deleted file mode 100644 index c6ff278b55..0000000000 Binary files a/src/main/resources/images/remove.png and /dev/null differ diff --git a/src/main/resources/images/resolved.svg b/src/main/resources/images/resolved.svg index eb3de76b51..4924de22b7 100644 --- a/src/main/resources/images/resolved.svg +++ b/src/main/resources/images/resolved.svg @@ -1,4 +1,4 @@ - + - - + - + + + + + + - - + + + - + \ No newline at end of file diff --git a/src/main/resources/images/resolved_dark.svg b/src/main/resources/images/resolved_dark.svg index 6bcc50da99..9dd855acc8 100644 --- a/src/main/resources/images/resolved_dark.svg +++ b/src/main/resources/images/resolved_dark.svg @@ -1,4 +1,3 @@ - - - - - - - - - + + + + + + + + diff --git a/src/main/resources/images/sonarcloud-16.png b/src/main/resources/images/sonarcloud-16.png deleted file mode 100644 index 7abe416f20..0000000000 Binary files a/src/main/resources/images/sonarcloud-16.png and /dev/null differ diff --git a/src/main/resources/images/sonarlint.png b/src/main/resources/images/sonarlint.png deleted file mode 100644 index 799485612e..0000000000 Binary files a/src/main/resources/images/sonarlint.png and /dev/null differ diff --git a/src/main/resources/images/sonarlint@2x.png b/src/main/resources/images/sonarlint@2x.png deleted file mode 100644 index d69dc112b9..0000000000 Binary files a/src/main/resources/images/sonarlint@2x.png and /dev/null differ diff --git a/src/main/resources/images/sonarlintAction.svg b/src/main/resources/images/sonarlintAction.svg deleted file mode 100644 index cfe9a5ab99..0000000000 --- a/src/main/resources/images/sonarlintAction.svg +++ /dev/null @@ -1,22 +0,0 @@ - - diff --git a/src/main/resources/images/sonarlintAction_12px.svg b/src/main/resources/images/sonarlintAction_12px.svg deleted file mode 100644 index 4fffe58f47..0000000000 --- a/src/main/resources/images/sonarlintAction_12px.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - diff --git a/src/main/resources/images/sonarlintAction_green_12px.svg b/src/main/resources/images/sonarlintAction_green_12px.svg deleted file mode 100644 index 93ef400359..0000000000 --- a/src/main/resources/images/sonarlintAction_green_12px.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - diff --git a/src/main/resources/images/sonarlintAction_orange_12px.svg b/src/main/resources/images/sonarlintAction_orange_12px.svg deleted file mode 100644 index 7311202c68..0000000000 --- a/src/main/resources/images/sonarlintAction_orange_12px.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - diff --git a/src/main/resources/images/sonarlintToolWindow.svg b/src/main/resources/images/sonarlintToolWindow.svg deleted file mode 100644 index 6d7e3cfbc2..0000000000 --- a/src/main/resources/images/sonarlintToolWindow.svg +++ /dev/null @@ -1,22 +0,0 @@ - - diff --git a/src/main/resources/images/sonarlintToolWindowEmpty.svg b/src/main/resources/images/sonarlintToolWindowEmpty.svg deleted file mode 100644 index 6f30f7a2ee..0000000000 --- a/src/main/resources/images/sonarlintToolWindowEmpty.svg +++ /dev/null @@ -1,22 +0,0 @@ - - diff --git a/src/main/resources/images/sonarlintToolWindowEmpty_dark.svg b/src/main/resources/images/sonarlintToolWindowEmpty_dark.svg deleted file mode 100644 index 68d9edc4e2..0000000000 --- a/src/main/resources/images/sonarlintToolWindowEmpty_dark.svg +++ /dev/null @@ -1,22 +0,0 @@ - - diff --git a/src/main/resources/images/sonarlintToolWindow_dark.svg b/src/main/resources/images/sonarlintToolWindow_dark.svg deleted file mode 100644 index 30ec16ce2e..0000000000 --- a/src/main/resources/images/sonarlintToolWindow_dark.svg +++ /dev/null @@ -1,22 +0,0 @@ - - diff --git a/src/main/resources/images/sonarqube-48x200.png b/src/main/resources/images/sonarqube-48x200.png deleted file mode 100644 index fa45b5ff6f..0000000000 Binary files a/src/main/resources/images/sonarqube-48x200.png and /dev/null differ diff --git a/src/main/resources/images/sonarqube_cloud.png b/src/main/resources/images/sonarqube_cloud.png new file mode 100644 index 0000000000..6e87011cf8 Binary files /dev/null and b/src/main/resources/images/sonarqube_cloud.png differ diff --git a/src/main/resources/images/sonarqube_cloud_16px.svg b/src/main/resources/images/sonarqube_cloud_16px.svg new file mode 100644 index 0000000000..fb86854b8f --- /dev/null +++ b/src/main/resources/images/sonarqube_cloud_16px.svg @@ -0,0 +1,26 @@ + + + + + + diff --git a/src/main/resources/images/sonarqube_cloud_16px_dark.svg b/src/main/resources/images/sonarqube_cloud_16px_dark.svg new file mode 100644 index 0000000000..5a200bc10a --- /dev/null +++ b/src/main/resources/images/sonarqube_cloud_16px_dark.svg @@ -0,0 +1,26 @@ + + + + + + diff --git a/src/main/resources/images/sonarqube_cloud_dark.png b/src/main/resources/images/sonarqube_cloud_dark.png new file mode 100644 index 0000000000..3eb7d82d61 Binary files /dev/null and b/src/main/resources/images/sonarqube_cloud_dark.png differ diff --git a/src/main/resources/images/sonarqube_for_intellij.svg b/src/main/resources/images/sonarqube_for_intellij.svg new file mode 100644 index 0000000000..9d4c385826 --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij.svg @@ -0,0 +1,26 @@ + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij@2px_dark.svg b/src/main/resources/images/sonarqube_for_intellij@2px_dark.svg new file mode 100644 index 0000000000..0d794ff7b3 --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij@2px_dark.svg @@ -0,0 +1,26 @@ + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij@2x.svg b/src/main/resources/images/sonarqube_for_intellij@2x.svg new file mode 100644 index 0000000000..de4ec26d7b --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij@2x.svg @@ -0,0 +1,26 @@ + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij_13px.svg b/src/main/resources/images/sonarqube_for_intellij_13px.svg new file mode 100644 index 0000000000..27ed3497c0 --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij_13px.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij_13px_dark.svg b/src/main/resources/images/sonarqube_for_intellij_13px_dark.svg new file mode 100644 index 0000000000..3f430f2236 --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij_13px_dark.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij_32px.svg b/src/main/resources/images/sonarqube_for_intellij_32px.svg new file mode 100644 index 0000000000..de4ec26d7b --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij_32px.svg @@ -0,0 +1,26 @@ + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij_32px_dark.svg b/src/main/resources/images/sonarqube_for_intellij_32px_dark.svg new file mode 100644 index 0000000000..0d794ff7b3 --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij_32px_dark.svg @@ -0,0 +1,26 @@ + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij_dark.svg b/src/main/resources/images/sonarqube_for_intellij_dark.svg new file mode 100644 index 0000000000..ea00134356 --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij_dark.svg @@ -0,0 +1,26 @@ + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij_empty_toolwindow.svg b/src/main/resources/images/sonarqube_for_intellij_empty_toolwindow.svg new file mode 100644 index 0000000000..3f430f2236 --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij_empty_toolwindow.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij_green_13px.svg b/src/main/resources/images/sonarqube_for_intellij_green_13px.svg new file mode 100644 index 0000000000..8297ca91b8 --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij_green_13px.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij_green_13px_dark.svg b/src/main/resources/images/sonarqube_for_intellij_green_13px_dark.svg new file mode 100644 index 0000000000..6a3cb46174 --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij_green_13px_dark.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij_orange_13px.svg b/src/main/resources/images/sonarqube_for_intellij_orange_13px.svg new file mode 100644 index 0000000000..fcb4eccd86 --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij_orange_13px.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij_orange_13px_dark.svg b/src/main/resources/images/sonarqube_for_intellij_orange_13px_dark.svg new file mode 100644 index 0000000000..af0dbcbe9e --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij_orange_13px_dark.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij_red_13px.svg b/src/main/resources/images/sonarqube_for_intellij_red_13px.svg new file mode 100644 index 0000000000..f9ebe97fb7 --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij_red_13px.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij_red_13px_dark.svg b/src/main/resources/images/sonarqube_for_intellij_red_13px_dark.svg new file mode 100644 index 0000000000..a0e4eceaf2 --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij_red_13px_dark.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij_toolwindow.svg b/src/main/resources/images/sonarqube_for_intellij_toolwindow.svg new file mode 100644 index 0000000000..aaa605a253 --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij_toolwindow.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/src/main/resources/images/sonarqube_for_intellij_toolwindow_dark.svg b/src/main/resources/images/sonarqube_for_intellij_toolwindow_dark.svg new file mode 100644 index 0000000000..92096cd34f --- /dev/null +++ b/src/main/resources/images/sonarqube_for_intellij_toolwindow_dark.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/src/main/resources/images/sonarqube_server.png b/src/main/resources/images/sonarqube_server.png new file mode 100644 index 0000000000..68186ce3a9 Binary files /dev/null and b/src/main/resources/images/sonarqube_server.png differ diff --git a/src/main/resources/images/sonarqube_server_16px.svg b/src/main/resources/images/sonarqube_server_16px.svg new file mode 100644 index 0000000000..27feac2807 --- /dev/null +++ b/src/main/resources/images/sonarqube_server_16px.svg @@ -0,0 +1,29 @@ + + + + + + + + + diff --git a/src/main/resources/images/sonarqube_server_16px_dark.svg b/src/main/resources/images/sonarqube_server_16px_dark.svg new file mode 100644 index 0000000000..3842e76bfb --- /dev/null +++ b/src/main/resources/images/sonarqube_server_16px_dark.svg @@ -0,0 +1,29 @@ + + + + + + + + + diff --git a/src/main/resources/images/sonarqube_server_dark.png b/src/main/resources/images/sonarqube_server_dark.png new file mode 100644 index 0000000000..22dd2a6438 Binary files /dev/null and b/src/main/resources/images/sonarqube_server_dark.png differ diff --git a/src/main/resources/images/tip.png b/src/main/resources/images/tip.png deleted file mode 100644 index 2b62f2ac9b..0000000000 Binary files a/src/main/resources/images/tip.png and /dev/null differ diff --git a/src/test/java/org/sonarlint/intellij/SonarLintIconsTest.kt b/src/test/java/org/sonarlint/intellij/SonarLintIconsTest.kt index b9d4e6b2a0..1c3f06ae89 100644 --- a/src/test/java/org/sonarlint/intellij/SonarLintIconsTest.kt +++ b/src/test/java/org/sonarlint/intellij/SonarLintIconsTest.kt @@ -61,14 +61,29 @@ class SonarLintIconsTest { @Test fun testIcons() { - assertThat(SonarLintIcons.CLEAN).isNotNull - assertThat(SonarLintIcons.ICON_SONARQUBE_16).isNotNull - assertThat(SonarLintIcons.INFO).isNotNull + assertThat(SonarLintIcons.ICON_SONARQUBE_SERVER).isNotNull + assertThat(SonarLintIcons.ICON_SONARQUBE_CLOUD).isNotNull + assertThat(SonarLintIcons.ICON_SONARQUBE_SERVER_16).isNotNull + assertThat(SonarLintIcons.ICON_SONARQUBE_CLOUD_16).isNotNull + assertThat(SonarLintIcons.SONARQUBE_FOR_INTELLIJ_13PX).isNotNull + assertThat(SonarLintIcons.SONARQUBE_FOR_INTELLIJ_RED_13PX).isNotNull + assertThat(SonarLintIcons.SONARQUBE_FOR_INTELLIJ_GREEN_13PX).isNotNull + assertThat(SonarLintIcons.SONARQUBE_FOR_INTELLIJ_ORANGE_13PX).isNotNull + assertThat(SonarLintIcons.SONARQUBE_FOR_INTELLIJ).isNotNull + assertThat(SonarLintIcons.SONARQUBE_FOR_INTELLIJ_32PX).isNotNull assertThat(SonarLintIcons.PLAY).isNotNull - assertThat(SonarLintIcons.SONARLINT).isNotNull - assertThat(SonarLintIcons.SUSPEND).isNotNull + assertThat(SonarLintIcons.CLEAN).isNotNull assertThat(SonarLintIcons.TOOLS).isNotNull + assertThat(SonarLintIcons.SUSPEND).isNotNull + assertThat(SonarLintIcons.INFO).isNotNull assertThat(SonarLintIcons.WARN).isNotNull + assertThat(SonarLintIcons.SCM).isNotNull + assertThat(SonarLintIcons.PROJECT).isNotNull + assertThat(SonarLintIcons.NOT_CONNECTED).isNotNull + assertThat(SonarLintIcons.CONNECTED).isNotNull + assertThat(SonarLintIcons.CONNECTION_ERROR).isNotNull + assertThat(SonarLintIcons.RESOLVED).isNotNull + assertThat(SonarLintIcons.FOCUS).isNotNull } @Test diff --git a/src/test/java/org/sonarlint/intellij/SonarLintIntelliJClientTests.kt b/src/test/java/org/sonarlint/intellij/SonarLintIntelliJClientTests.kt index 45013aa93d..11ee8d65a1 100644 --- a/src/test/java/org/sonarlint/intellij/SonarLintIntelliJClientTests.kt +++ b/src/test/java/org/sonarlint/intellij/SonarLintIntelliJClientTests.kt @@ -108,7 +108,7 @@ class SonarLintIntelliJClientTests : AbstractSonarLintLightTests() { assertThat(projectNotifications).extracting("title", "content").containsExactly( tuple( - "SonarLint suggestions", "Bind this project to 'projectName' on 'connectionId'?" + "SonarQube for IntelliJ suggestions", "Bind this project to 'projectName' on 'connectionId'?" ) ) } @@ -121,8 +121,8 @@ class SonarLintIntelliJClientTests : AbstractSonarLintLightTests() { assertThat(projectNotifications).extracting("title", "content").containsExactly( tuple( - "SonarLint suggestions", - "Bind this project to SonarCloud or SonarQube?" + "SonarQube for IntelliJ suggestions", + "Bind this project to SonarQube (Server, Cloud)?" ) ) } @@ -142,8 +142,8 @@ class SonarLintIntelliJClientTests : AbstractSonarLintLightTests() { assertThat(projectNotifications).extracting("title", "content").containsExactly( tuple( - "SonarLint suggestions", - "Bind this project to SonarCloud or SonarQube?" + "SonarQube for IntelliJ suggestions", + "Bind this project to SonarQube (Server, Cloud)?" ) ) } diff --git a/src/test/java/org/sonarlint/intellij/analysis/LocalFileExclusionsTests.java b/src/test/java/org/sonarlint/intellij/analysis/LocalFileExclusionsTests.java index 44eda1c152..73a76839d5 100644 --- a/src/test/java/org/sonarlint/intellij/analysis/LocalFileExclusionsTests.java +++ b/src/test/java/org/sonarlint/intellij/analysis/LocalFileExclusionsTests.java @@ -93,7 +93,7 @@ void should_exclude_if_file_excluded_in_project_config() { setProjectLevelExclusions(List.of("GLOB:foo.php")); var nonExcludedFilesByModule = underTest.retainNonExcludedFilesByModules(List.of(file), false, excludeReasons::put); - assertIsExcluded(file, nonExcludedFilesByModule, "file matches exclusions defined in the SonarLint Project Settings"); + assertIsExcluded(file, nonExcludedFilesByModule, "file matches exclusions defined in the SonarQube for IntelliJ Project Settings"); } @Test @@ -113,7 +113,7 @@ void should_exclude_if_file_excluded_in_global_config() { triggerFileExclusions("foo.php"); var nonExcludedFilesByModule = underTest.retainNonExcludedFilesByModules(List.of(file), false, excludeReasons::put); - assertIsExcluded(file, nonExcludedFilesByModule, "file matches exclusions defined in the SonarLint Global Settings"); + assertIsExcluded(file, nonExcludedFilesByModule, "file matches exclusions defined in the SonarQube for IntelliJ Global Settings"); } @Test diff --git a/src/test/java/org/sonarlint/intellij/config/SonarLintColorSettingsPageTests.java b/src/test/java/org/sonarlint/intellij/config/SonarLintColorSettingsPageTests.java index 45248c1c91..b77313435c 100644 --- a/src/test/java/org/sonarlint/intellij/config/SonarLintColorSettingsPageTests.java +++ b/src/test/java/org/sonarlint/intellij/config/SonarLintColorSettingsPageTests.java @@ -38,7 +38,7 @@ void setUp() { void testGetters() { assertThat(colorSettingsPage).isNotNull(); assertThat(colorSettingsPage.getColorDescriptors()).isEmpty(); - assertThat(colorSettingsPage.getDisplayName()).isEqualTo("SonarLint"); + assertThat(colorSettingsPage.getDisplayName()).isEqualTo("SonarQube for IntelliJ"); assertThat(colorSettingsPage.getHighlighter()).isInstanceOf(PlainSyntaxHighlighter.class); } diff --git a/src/test/java/org/sonarlint/intellij/editor/DisableRuleIntentionActionTests.java b/src/test/java/org/sonarlint/intellij/editor/DisableRuleIntentionActionTests.java index edefafbb15..83baf9920d 100644 --- a/src/test/java/org/sonarlint/intellij/editor/DisableRuleIntentionActionTests.java +++ b/src/test/java/org/sonarlint/intellij/editor/DisableRuleIntentionActionTests.java @@ -45,13 +45,13 @@ void prepare() { @Test void text_should_mention_rule_key() { - assertThat(quickFix.getText()).isEqualTo("SonarLint: Disable rule 'rule'"); + assertThat(quickFix.getText()).isEqualTo("SonarQube: Disable rule 'rule'"); } @Test void check_getters() { assertThat(quickFix.getIcon(0)).isEqualTo(AllIcons.Actions.Cancel); - assertThat(quickFix.getFamilyName()).isEqualTo("SonarLint disable rule"); + assertThat(quickFix.getFamilyName()).isEqualTo("SonarQube disable rule"); assertThat(quickFix.startInWriteAction()).isFalse(); } diff --git a/src/test/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSourceTests.java b/src/test/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSourceTests.java index aa86aaba7c..3eaa04df91 100644 --- a/src/test/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSourceTests.java +++ b/src/test/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSourceTests.java @@ -33,20 +33,22 @@ class BlameSonarSourceTests { @Test void testShortDescription() { var url = underTest.getReportWithBodyUrl("a"); - assertThat(url).hasSizeLessThanOrEqualTo(BlameSonarSource.MAX_URI_LENGTH).isEqualTo("https://community.sonarsource.com/new-topic?title=Error+in+SonarLint+for+IntelliJ&category_id=6&tags=sonarlint,intellij&body=a"); + assertThat(url).hasSizeLessThanOrEqualTo(BlameSonarSource.MAX_URI_LENGTH) + .isEqualTo("https://community.sonarsource.com/new-topic?title=Error+in+SonarQube+for+IntelliJ&category_id=6&tags=sonarlint,intellij&body=a"); } @Test void emptyBodyIfSingleLineTooLong() { var url = underTest.getReportWithBodyUrl(StringUtil.repeat("a", 5000)); - assertThat(url).hasSizeLessThanOrEqualTo(BlameSonarSource.MAX_URI_LENGTH).isEqualTo("https://community.sonarsource.com/new-topic?title=Error+in+SonarLint+for+IntelliJ&category_id=6&tags=sonarlint,intellij&body="); + assertThat(url).hasSizeLessThanOrEqualTo(BlameSonarSource.MAX_URI_LENGTH) + .isEqualTo("https://community.sonarsource.com/new-topic?title=Error+in+SonarQube+for+IntelliJ&category_id=6&tags=sonarlint,intellij&body="); } @Test void truncateOnNewLineIfDescriptionTooLong() { var url = underTest.getReportWithBodyUrl(StringUtil.repeat("1234567\n", 400)); assertThat(url).hasSizeLessThanOrEqualTo(BlameSonarSource.MAX_URI_LENGTH) - .isEqualTo("https://community.sonarsource.com/new-topic?title=Error+in+SonarLint+for+IntelliJ&category_id=6&tags=sonarlint,intellij&body=" + .isEqualTo("https://community.sonarsource.com/new-topic?title=Error+in+SonarQube+for+IntelliJ&category_id=6&tags=sonarlint,intellij&body=" + StringUtil.repeat("1234567%0A", 391) + "1234567"); } diff --git a/src/test/java/org/sonarlint/intellij/mediumtests/StandaloneModeMediumTests.kt b/src/test/java/org/sonarlint/intellij/mediumtests/StandaloneModeMediumTests.kt index e31d9ce1a7..1d05f74308 100644 --- a/src/test/java/org/sonarlint/intellij/mediumtests/StandaloneModeMediumTests.kt +++ b/src/test/java/org/sonarlint/intellij/mediumtests/StandaloneModeMediumTests.kt @@ -58,7 +58,7 @@ import org.sonarlint.intellij.util.getDocument import org.sonarsource.sonarlint.plugin.api.module.file.ModuleFileEvent class StandaloneModeMediumTests : AbstractSonarLintLightTests() { - private val diamondQuickFix = "SonarLint: Replace with <>" + private val diamondQuickFix = "SonarQube: Replace with <>" @BeforeEach fun notifyProjectOpened() { @@ -422,9 +422,9 @@ class StandaloneModeMediumTests : AbstractSonarLintLightTests() { val file = myFixture.configureByFile("src/quick_fixes/overlapping_quick_fixes.input.java") analyze(file.virtualFile) - myFixture.launchAction(myFixture.findSingleIntention("SonarLint: Use \"Arrays.toString(array)\" instead")) + myFixture.launchAction(myFixture.findSingleIntention("SonarQube: Use \"Arrays.toString(array)\" instead")) myFixture.editor.caretModel.currentCaret.moveToOffset(180) - myFixture.launchAction(myFixture.findSingleIntention("SonarLint: Merge this if statement with the enclosing one")) + myFixture.launchAction(myFixture.findSingleIntention("SonarQube: Merge this if statement with the enclosing one")) //Their stripTrailingSpaces function don't work myFixture.checkResult(expectedFile.getDocument()!!.text.trim(), true) } diff --git a/src/test/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotificationsTests.java b/src/test/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotificationsTests.java index 5c1529eabc..cd48667cc8 100644 --- a/src/test/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotificationsTests.java +++ b/src/test/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotificationsTests.java @@ -85,7 +85,7 @@ void notifyIfSkippedLanguage_JRE() { AnalysisRequirementNotifications.notifyOnceForSkippedPlugins(getProject(), Language.JAVA, DidSkipLoadingPluginParams.SkipReason.UNSATISFIED_JRE, "11", "1.8"); assertThat(notifications).hasSize(1); - assertThat(notifications.get(0).getContent()).isEqualTo("SonarLint requires Java runtime version 11 or later to analyze Java code. Current version is 1.8."); + assertThat(notifications.get(0).getContent()).isEqualTo("SonarQube for IntelliJ requires Java runtime version 11 or later to analyze Java code. Current version is 1.8."); } @Test @@ -93,9 +93,10 @@ void notifyIfSkippedLanguage_Node() { AnalysisRequirementNotifications.notifyOnceForSkippedPlugins(getProject(), Language.JS, DidSkipLoadingPluginParams.SkipReason.UNSATISFIED_NODE_JS, "8.0", "7.2"); assertThat(notifications).hasSize(1); - assertThat(notifications.get(0).getContent()).isEqualTo("SonarLint requires Node.js runtime version 8.0 or later to analyze JavaScript code. Current version is 7.2.
Please configure the Node.js path in the SonarLint settings."); + assertThat(notifications.get(0).getContent()).isEqualTo( + "SonarQube for IntelliJ requires Node.js runtime version 8.0 or later to analyze JavaScript code. Current version is 7.2.
Please configure the Node.js path in the SonarQube for IntelliJ settings."); assertThat(notifications.get(0).getActions()).hasSize(1); - assertThat(notifications.get(0).getActions().get(0).getTemplatePresentation().getText()).isEqualTo("Open SonarLint Settings"); + assertThat(notifications.get(0).getActions().get(0).getTemplatePresentation().getText()).isEqualTo("Open SonarQube for IntelliJ Settings"); } } diff --git a/src/test/java/org/sonarlint/intellij/notifications/SonarLintProjectNotificationsTests.kt b/src/test/java/org/sonarlint/intellij/notifications/SonarLintProjectNotificationsTests.kt index aa8a64a1b7..58616ab5e3 100644 --- a/src/test/java/org/sonarlint/intellij/notifications/SonarLintProjectNotificationsTests.kt +++ b/src/test/java/org/sonarlint/intellij/notifications/SonarLintProjectNotificationsTests.kt @@ -70,11 +70,11 @@ class SonarLintProjectNotificationsTests : AbstractSonarLintLightTests() { sonarLintProjectNotifications.notifyProjectBindingInvalidAndUnbound() Assertions.assertThat(notifications).hasSize(1) - Assertions.assertThat(notifications[0].title).isEqualTo("SonarLint - Invalid binding") + Assertions.assertThat(notifications[0].title).isEqualTo("SonarQube for IntelliJ - Invalid binding") Assertions.assertThat(notifications[0].content) .isEqualTo("Project binding is invalid and has been removed, the connection has probably been deleted previously.") Assertions.assertThat(notifications[0].type).isEqualTo(NotificationType.WARNING) - Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARLINT) + Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARQUBE_FOR_INTELLIJ) Assertions.assertThat(notifications[0].actions.size).isEqualTo(1) } @@ -85,10 +85,10 @@ class SonarLintProjectNotificationsTests : AbstractSonarLintLightTests() { sonarLintProjectNotifications.notifyLanguagePromotion(content) Assertions.assertThat(notifications).hasSize(1) - Assertions.assertThat(notifications[0].title).isEqualTo("SonarLint suggestions") + Assertions.assertThat(notifications[0].title).isEqualTo("SonarQube for IntelliJ suggestions") Assertions.assertThat(notifications[0].content).isEqualTo(content) Assertions.assertThat(notifications[0].type).isEqualTo(NotificationType.INFORMATION) - Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARLINT) + Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARQUBE_FOR_INTELLIJ) Assertions.assertThat(notifications[0].actions.size).isEqualTo(4) } @@ -103,7 +103,7 @@ class SonarLintProjectNotificationsTests : AbstractSonarLintLightTests() { Assertions.assertThat(notifications[0].content).isEqualTo(message) Assertions.assertThat(notifications[0].type).isEqualTo(NotificationType.INFORMATION) Assertions.assertThat(notifications[0].isExpired).isEqualTo(false) - Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARLINT) + Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARQUBE_FOR_INTELLIJ) Assertions.assertThat(notifications[0].actions).isEmpty() } @@ -134,10 +134,10 @@ class SonarLintProjectNotificationsTests : AbstractSonarLintLightTests() { sonarLintProjectNotifications.handle(param) Assertions.assertThat(notifications).hasSize(1) - Assertions.assertThat(notifications[0].title).isEqualTo("SonarQube Notification") + Assertions.assertThat(notifications[0].title).isEqualTo("SonarQube Server Notification") Assertions.assertThat(notifications[0].content).isEqualTo("text") Assertions.assertThat(notifications[0].type).isEqualTo(NotificationType.INFORMATION) - Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.ICON_SONARQUBE_16) + Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.ICON_SONARQUBE_SERVER_16) Assertions.assertThat(notifications[0].actions.size).isEqualTo(2) } @@ -157,10 +157,10 @@ class SonarLintProjectNotificationsTests : AbstractSonarLintLightTests() { sonarLintProjectNotifications.handle(param) Assertions.assertThat(notifications).hasSize(1) - Assertions.assertThat(notifications[0].title).isEqualTo("SonarCloud Notification") + Assertions.assertThat(notifications[0].title).isEqualTo("SonarQube Cloud Notification") Assertions.assertThat(notifications[0].content).isEqualTo("text") Assertions.assertThat(notifications[0].type).isEqualTo(NotificationType.INFORMATION) - Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.ICON_SONARCLOUD_16) + Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.ICON_SONARQUBE_CLOUD_16) Assertions.assertThat(notifications[0].actions.size).isEqualTo(2) } @@ -175,7 +175,7 @@ class SonarLintProjectNotificationsTests : AbstractSonarLintLightTests() { Assertions.assertThat(notifications[0].title).isBlank() Assertions.assertThat(notifications[0].content).isEqualTo(content) Assertions.assertThat(notifications[0].type).isEqualTo(NotificationType.INFORMATION) - Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARLINT) + Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARQUBE_FOR_INTELLIJ) Assertions.assertThat(notifications[0].actions).isEmpty() } @@ -191,7 +191,7 @@ class SonarLintProjectNotificationsTests : AbstractSonarLintLightTests() { Assertions.assertThat(notifications[0].title).isEqualTo(title) Assertions.assertThat(notifications[0].content).isEqualTo(content) Assertions.assertThat(notifications[0].type).isEqualTo(NotificationType.ERROR) - Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARLINT) + Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARQUBE_FOR_INTELLIJ) Assertions.assertThat(notifications[0].actions.size).isEqualTo(1) } @@ -206,7 +206,7 @@ class SonarLintProjectNotificationsTests : AbstractSonarLintLightTests() { Assertions.assertThat(notifications[0].title).isBlank() Assertions.assertThat(notifications[0].content).isEqualTo(content) Assertions.assertThat(notifications[0].type).isEqualTo(NotificationType.WARNING) - Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARLINT) + Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARQUBE_FOR_INTELLIJ) Assertions.assertThat(notifications[0].actions.size).isEqualTo(1) } @@ -215,14 +215,14 @@ class SonarLintProjectNotificationsTests : AbstractSonarLintLightTests() { sonarLintProjectNotifications.sendNotification() Assertions.assertThat(notifications).hasSize(1) - Assertions.assertThat(notifications[0].title).isEqualTo("SonarLint: secret(s) detected") + Assertions.assertThat(notifications[0].title).isEqualTo("SonarQube for IntelliJ: secret(s) detected") Assertions.assertThat(notifications[0].content).isEqualTo( - "SonarLint detected some secrets in one of the open files. " + + "SonarQube for IntelliJ detected some secrets in one of the open files. " + "We strongly advise you to review those secrets and ensure they are not committed into repositories. " + - "Please refer to the SonarLint tool window for more information." + "Please refer to the SonarQube for IntelliJ tool window for more information." ) Assertions.assertThat(notifications[0].type).isEqualTo(NotificationType.WARNING) - Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARLINT) + Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARQUBE_FOR_INTELLIJ) Assertions.assertThat(notifications[0].actions).isEmpty() } @@ -237,7 +237,7 @@ class SonarLintProjectNotificationsTests : AbstractSonarLintLightTests() { Assertions.assertThat(notifications[0].title).isBlank() Assertions.assertThat(notifications[0].content).isEqualTo(message) Assertions.assertThat(notifications[0].type).isEqualTo(NotificationType.WARNING) - Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARLINT) + Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARQUBE_FOR_INTELLIJ) Assertions.assertThat(notifications[0].actions.size).isEqualTo(1) } @@ -253,7 +253,7 @@ class SonarLintProjectNotificationsTests : AbstractSonarLintLightTests() { Assertions.assertThat(notifications[0].title).isEqualTo(title) Assertions.assertThat(notifications[0].content).isEqualTo(message) Assertions.assertThat(notifications[0].type).isEqualTo(NotificationType.WARNING) - Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARLINT) + Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARQUBE_FOR_INTELLIJ) Assertions.assertThat(notifications[0].actions.size).isEqualTo(2) } @@ -269,7 +269,7 @@ class SonarLintProjectNotificationsTests : AbstractSonarLintLightTests() { Assertions.assertThat(notifications[0].title).isEqualTo(title) Assertions.assertThat(notifications[0].content).isEqualTo(message) Assertions.assertThat(notifications[0].type).isEqualTo(NotificationType.INFORMATION) - Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARLINT) + Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARQUBE_FOR_INTELLIJ) Assertions.assertThat(notifications[0].actions.size).isEqualTo(1) } @@ -285,7 +285,7 @@ class SonarLintProjectNotificationsTests : AbstractSonarLintLightTests() { Assertions.assertThat(notifications[0].title).isEqualTo(title) Assertions.assertThat(notifications[0].content).isEqualTo(message) Assertions.assertThat(notifications[0].type).isEqualTo(type) - Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARLINT) + Assertions.assertThat(notifications[0].icon).isEqualTo(SonarLintIcons.SONARQUBE_FOR_INTELLIJ) Assertions.assertThat(notifications[0].actions).isEmpty() } diff --git a/src/test/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandlerTests.java b/src/test/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandlerTests.java index 518f7c06df..d6b6eb2e59 100644 --- a/src/test/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandlerTests.java +++ b/src/test/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandlerTests.java @@ -116,7 +116,7 @@ void testIssues() { var result = handler.beforeCheckin(null, null); assertThat(result).isEqualTo(CheckinHandler.ReturnResult.CLOSE_WINDOW); - assertThat(messages).containsExactly("SonarLint analysis on 1 file found 1 issue"); + assertThat(messages).containsExactly("SonarQube for IntelliJ analysis on 1 file found 1 issue"); ArgumentCaptor analysisResultCaptor = ArgumentCaptor.forClass(AnalysisResult.class); verify(toolWindow, timeout(1000)).openReportTab(analysisResultCaptor.capture()); var analysisResult = analysisResultCaptor.getValue(); @@ -148,9 +148,10 @@ void testSecretsIssues() { var result = handler.beforeCheckin(null, null); assertThat(result).isEqualTo(CheckinHandler.ReturnResult.CLOSE_WINDOW); - assertThat(messages).containsExactly("SonarLint analysis on 1 file found 1 issue\n" + - "\n" + - "SonarLint analysis found 1 secret. Committed secrets may lead to unauthorized system access."); + assertThat(messages).containsExactly(""" + SonarQube for IntelliJ analysis on 1 file found 1 issue + + SonarQube for IntelliJ analysis found 1 secret. Committed secrets may lead to unauthorized system access."""); ArgumentCaptor analysisResultCaptor = ArgumentCaptor.forClass(AnalysisResult.class); verify(toolWindow, timeout(1000)).openReportTab(analysisResultCaptor.capture()); var analysisResult = analysisResultCaptor.getValue();