Skip to content

Commit

Permalink
SLI-1673 Change product logos to match the rebranding (#1215)
Browse files Browse the repository at this point in the history
  • Loading branch information
nquinquenel committed Nov 15, 2024
1 parent 1133ee0 commit 44f33b4
Show file tree
Hide file tree
Showing 85 changed files with 795 additions and 367 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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") }
Expand All @@ -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 Server").click()
buttonContainsText("Connect to This SonarQube Server Instance").click()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 Server").click()
buttonContainsText("Connect to This SonarQube Server Instance").click()
}
}
}
Expand Down
25 changes: 13 additions & 12 deletions src/main/java/org/sonarlint/intellij/SonarLintIcons.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]")
val SONARQUBE_FOR_INTELLIJ_32PX = getIcon("/images/sonarqube_for_intellij_32px.svg")
@JvmField
val PLAY = getIcon("/images/execute.png")
@JvmField
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/sonarlint/intellij/SonarLintIntelliJClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate {
uniqueSuggestion.connectionSuggestion.right.organization)
} else {
Triple(
"SonarQube Server", uniqueSuggestion.connectionSuggestion.left.projectKey,
"SonarQube Server instance", uniqueSuggestion.connectionSuggestion.left.projectKey,
uniqueSuggestion.connectionSuggestion.left.serverUrl)
}
}
Expand Down Expand Up @@ -423,7 +423,7 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate {

projectLessNotification(
"",
"You have successfully established a connection to the ${if (isSQ) "SonarQube Server" else "SonarQube Cloud organization"}",
"You have successfully established a connection to the ${if (isSQ) "SonarQube Server instance" else "SonarQube Cloud organization"}",
NotificationType.INFORMATION
)

Expand All @@ -440,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 <b>${StringEscapeUtils.escapeHtml4(serverUrl)}</b> is attempting to set up a connection with SonarQube for IntelliJ. Letting SonarQube for IntelliJ connect to an untrusted SonarQube Server is potentially dangerous.
The server <b>${StringEscapeUtils.escapeHtml4(serverUrl)}</b> 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 <a href="$CONNECTED_MODE_SETUP_LINK">manually setting up Connected Mode<icon src="AllIcons.Ide.External_link_arrow" href="$CONNECTED_MODE_SETUP_LINK"></a>.
""".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 {
Expand Down Expand Up @@ -482,7 +482,7 @@ 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}'. "
"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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ class MarkAsResolvedAction(

override fun startInWriteAction() = false

override fun getText() = "SonarQube for IntelliJ: Mark issue as\u2026"
override fun getText() = "SonarQube: Mark issue as\u2026"

override fun getFamilyName(): String {
return "SonarQube for IntelliJ mark issue as\u2026"
return "SonarQube mark issue as\u2026"
}

override fun isVisible(e: AnActionEvent): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ class ReopenIssueAction(private var issue: LiveIssue? = null) : AbstractSonarAct

override fun startInWriteAction() = false

override fun getText() = "SonarQube for IntelliJ: Reopen issue"
override fun getText() = "SonarQube: Reopen issue"

override fun getFamilyName(): String {
return "SonarQube for IntelliJ reopen issue"
return "SonarQube reopen issue"
}

override fun isVisible(e: AnActionEvent): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ class ReviewSecurityHotspotAction(private var serverFindingKey: String? = null,

override fun startInWriteAction() = false

override fun getText() = "SonarQube for IntelliJ: Change Security Hotspot status"
override fun getText() = "SonarQube: Change Security Hotspot status"

override fun getFamilyName() = "SonarQube for IntelliJ review"
override fun getFamilyName() = "SonarQube review"

override fun isAvailable(project: Project, editor: Editor?, file: PsiFile?) = serverFindingKey != null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private static class DescriptorComparator implements Comparator<AttributesDescri
private static final Map<String, TextAttributesKey> ADDITIONAL_HIGHLIGHT_DESCRIPTORS = new TreeMap<>();

@Nullable @Override public Icon getIcon() {
return SonarLintIcons.SONARLINT;
return SonarLintIcons.SONARQUBE_FOR_INTELLIJ;
}

@NotNull @Override public SyntaxHighlighter getHighlighter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ class AutomaticServerConnectionCreator(private val serverOrOrg: String, private
private val proxyButton = JButton("Proxy")

init {
title = if (isSQ) "Trust This SonarQube Server?" else "Trust This SonarQube Cloud Organization?"
title = if (isSQ) "Trust This SonarQube Server Instance?" else "Trust This SonarQube Cloud Organization?"
val connectionNames = Settings.getGlobalSettings().serverNames
connectionNameField.text = findFirstUniqueConnectionName(connectionNames, serverOrOrg)

val buttonTextAction = if (isSQ) "Connect to This SonarQube Server" else "Connect to This SonarQube Cloud Organization"
val buttonTextAction = if (isSQ) "Connect to This SonarQube Server Instance" else "Connect to This SonarQube Cloud Organization"

createConnectionAction = object : DialogWrapperAction(buttonTextAction) {
init {
Expand Down Expand Up @@ -149,7 +149,7 @@ class AutomaticServerConnectionCreator(private val serverOrOrg: String, private
redWarningIcon.icon = AllIcons.Ide.FatalError
warningLabel.text = if (isSQ) {
"Always ensure that your Server URL matches your SonarQube Server instance. " +
"Letting SonarQube for IntelliJ connect to an untrusted SonarQube Server is potentially dangerous."
"Letting SonarQube for IntelliJ connect to an untrusted SonarQube Server instance is potentially dangerous."
} else {
"Ensure that the organization matches your SonarQube Cloud organization."
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public String getProductName() {
}

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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -143,10 +143,10 @@ private static JPanel initConnectionTitle() {
var titlePanel = new JPanel(new HorizontalLayout(5));
var connectionLabel = new JBLabel("Connections to SonarQube (");
connectionLabel.setFont(connectionLabel.getFont().deriveFont(Font.BOLD, 16f));
var sonarQubeIcon = new JBLabel(SonarLintIcons.ICON_SONARCLOUD_16);
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_16);
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ 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("<html><b>SonarQube for IntelliJ " + plugin.getVersion() + "</b></html>");
var linkLabel = new HyperlinkLabel("Documentation");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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() {
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() = "SonarQube for IntelliJ: " + fix.message
override fun getFamilyName() = "SonarQube for IntelliJ 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ public class DisableRuleIntentionAction implements IntentionAction, LowPriorityA
}

@Nls @NotNull @Override public String getText() {
return "SonarQube for IntelliJ: Disable rule '" + ruleKey + "'";
return "SonarQube: Disable rule '" + ruleKey + "'";
}

@Nls @NotNull @Override public String getFamilyName() {
return "SonarQube for IntelliJ disable rule";
return "SonarQube disable rule";
}

@Override public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class EditorDecorator(private val project: Project) {
.severity(HighlightSeverity.ERROR)
.textAttributes(SonarLintTextAttributes.SELECTED)
if (!message.isNullOrEmpty() && "..." != message) {
builder.descriptionAndTooltip("SonarQube for IntelliJ: $message")
builder.descriptionAndTooltip("SonarQube: $message")
}
return builder.create()?.let { hl -> computeReadActionSafely { Highlight(location.document, hl) } }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ public ShowLocationsIntentionAction(LiveFinding finding, FindingContext context)
}

@Nls @NotNull @Override public String getText() {
return "SonarQube for IntelliJ: Show " + (context.hasUniqueFlow() ? "issue locations" : "data flows");
return "SonarQube: Show " + (context.hasUniqueFlow() ? "issue locations" : "data flows");
}

@Nls @NotNull @Override public String getFamilyName() {
return "SonarQube for IntelliJ locations";
return "SonarQube locations";
}

@Override public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ public ShowRuleDescriptionIntentionAction(LiveFinding liveFinding) {

@Override
public @Nls(capitalization = Nls.Capitalization.Sentence) @NotNull String getText() {
return "SonarQube for IntelliJ: Show rule description '" + liveFinding.getRuleKey() + "'";
return "SonarQube: Show rule description '" + liveFinding.getRuleKey() + "'";
}

@Override
public @NotNull @Nls(capitalization = Nls.Capitalization.Sentence) String getFamilyName() {
return "SonarQube for IntelliJ show issue description";
return "SonarQube show issue description";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ public ShowTaintVulnerabilityRuleDescriptionIntentionAction(LocalTaintVulnerabil

@Override
public @Nls(capitalization = Nls.Capitalization.Sentence) @NotNull String getText() {
return "SonarQube for IntelliJ: Show rule description '" + taintVulnerability.getRuleKey() + "'";
return "SonarQube: Show rule description '" + taintVulnerability.getRuleKey() + "'";
}

@Override
public @NotNull @Nls(capitalization = Nls.Capitalization.Sentence) String getFamilyName() {
return "SonarQube for IntelliJ show taint vulnerability description";
return "SonarQube show taint vulnerability description";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ open class DefaultVirtualFileSystemEventsHandler @NonInjectable constructor(priv
events: List<VFileEvent>,
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() }
Expand Down
Loading

0 comments on commit 44f33b4

Please sign in to comment.