Skip to content

Commit

Permalink
SLE-981: Overhaul labels to make them more clear
Browse files Browse the repository at this point in the history
Based on PR review and validation feedback.
  • Loading branch information
thahnen committed Nov 15, 2024
1 parent 716191a commit 1205520
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public void test_MarkIssueAs_Dialog() {
INSUFFICIENT_PERMISSION_USER);

// 7) Remove binding suggestion notification
new DefaultLink(shellByName("SonarQube Binding Suggestion").get(), "Don't ask again").click();
new DefaultLink(shellByName("SonarQube - Binding Suggestion").get(), "Don't ask again").click();

waitForAnalysisReady(MAVEN2_PROJECT_KEY);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ConfirmConnectionCreationDialog extends DefaultShell {
public ConfirmConnectionCreationDialog(Boolean isSonarCloud) {
super(isSonarCloud
? "Do you trust this SonarQube Cloud organization?"
: "Do you trust this SonarQube Server?");
: "Do you trust this SonarQube Server instance?");
this.isSonarCloud = isSonarCloud;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

public class ProjectSelectionDialog extends DefaultShell {
public ProjectSelectionDialog() {
super("SonarQube - Project Selection");
super("SonarQube for Eclipse - Project Selection");
}

public void filterProjectName(String projectName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public TrustButton(ReferencedComposite referencedComposite, int index, boolean i
index,
isSonarCloud
? "Connect to SonarQube Cloud"
: "Connect to this SonarQube Server",
: "Connect to this SonarQube Server instance",
SWT.PUSH);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public void analyzeProjectWithMissingLanguageAnalyzers() {
var abapFile = rootProject.getResource("Test.abap");
openFileAndWaitForAnalysisCompletion(abapFile);

var notAnalyzedOpt = shellByName("SonarQube - Language could not be analyzed");
var notAnalyzedOpt = shellByName("SonarQube for Eclipse - Language could not be analyzed");
notAnalyzedOpt.ifPresent(shell -> new DefaultLink(shell, "Learn more").click());
notAnalyzedOpt.ifPresent(shell -> new DefaultLink(shell, "Try SonarQube Cloud for free").click());
notAnalyzedOpt.ifPresent(DefaultShell::close);
Expand All @@ -194,7 +194,7 @@ public void analyzeProjectWithMissingLanguageAnalyzers() {
doAndWaitForSonarLintAnalysisJob(dialog::learnMore);

// THe project contains multiple languages, therefore the shell name slightly differs
notAnalyzedOpt = shellByName("SonarQube - Languages could not be analyzed");
notAnalyzedOpt = shellByName("SonarQube for Eclipse - Languages could not be analyzed");
notAnalyzedOpt.ifPresent(shell -> new DefaultLink(shell, "Don't show again").click());

new ContextMenu(rootProject.getTreeItem()).getItem("SonarQube", "Analyze").select();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public void notifyIfSkippedLanguage_JRE() {
.isEqualTo(
List.of(new Notification(
"Analyzer Requirement",
"SonarQube failed to analyze Java code",
"SonarQube requires Java runtime version 11 or later to analyze Java code. Current version is 1.8.\n" +
"SonarQube for Eclipse failed to analyze Java code",
"SonarQube for Eclipse requires Java runtime version 11 or later to analyze Java code. Current version is 1.8.\n" +
"See <a href=\"https://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM\">the Eclipse Wiki</a> to configure your IDE to run with a more recent JRE.")));
}

Expand All @@ -70,8 +70,8 @@ public void notifyIfSkippedLanguage_Node() {
assertThat(notifications).usingRecursiveComparison().isEqualTo(
List.of(new Notification(
"Analyzer Requirement",
"SonarQube failed to analyze JavaScript code",
"SonarQube requires Node.js runtime version 8.0 or later to analyze JavaScript code. Current version is 7.2.\n" +
"SonarQube for Eclipse failed to analyze JavaScript code",
"SonarQube for Eclipse requires Node.js runtime version 8.0 or later to analyze JavaScript code. Current version is 7.2.\n" +
"Please configure the Node.js path in the <a href=\"#edit-settings\">SonarQube settings</a>.")));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ public static void resetCachedMessages() {
public static void notifyOnceForSkippedPlugins(org.sonarsource.sonarlint.core.rpc.protocol.common.Language analyzedSkippedLanguage, SkipReason skipReason, String minVersion,
@Nullable String currentVersion) {
var languageWithLabel = Language.valueOf(analyzedSkippedLanguage.name());
final var shortMsg = "SonarQube failed to analyze " + languageWithLabel.getLabel() + " code";
final var shortMsg = "SonarQube for Eclipse failed to analyze " + languageWithLabel.getLabel() + " code";
if (skipReason == SkipReason.UNSATISFIED_JRE) {
var content = String.format(
"SonarQube requires Java runtime version %s or later to analyze %s code. "
"SonarQube for Eclipse requires Java runtime version %s or later to analyze %s code. "
+ "Current version is %s.\n"
+ "See <a href=\"https://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM\">the Eclipse Wiki</a> to configure your IDE to run with a more recent JRE.",
minVersion, languageWithLabel.getLabel(), currentVersion);
createNotificationOnce(shortMsg, content);
} else if (skipReason == SkipReason.UNSATISFIED_NODE_JS) {
var content = new StringBuilder(
String.format("SonarQube requires Node.js runtime version %s or later to analyze %s code.", minVersion, languageWithLabel.getLabel()));
String.format("SonarQube for Eclipse requires Node.js runtime version %s or later to analyze %s code.", minVersion, languageWithLabel.getLabel()));
if (currentVersion != null) {
content.append(String.format(" Current version is %s.", currentVersion));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class ProjectToBindSelectionDialog extends ElementListSelectionDialog {
private ProjectToBindSelectionDialog(Shell parent, String message, List<ISonarLintProject> projects) {
super(parent, new SonarLintProjectLabelProvider());
setElements(projects.toArray());
setTitle("SonarQube - Project Selection");
setTitle("SonarQube for Eclipse- Project Selection");
setMessage(message);
setHelpAvailable(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
public class ConfirmSonarQubeConnectionCreationDialog extends AbstractConfirmConnectionCreationDialog {
public ConfirmSonarQubeConnectionCreationDialog(Shell parentShell, String serverUrl, boolean automaticSetUp) {
super(parentShell,
"Do you trust this SonarQube Server?",
"Do you trust this SonarQube Server instance?",
"The server at '" + serverUrl + "' is attempting to set up a connection. Letting SonarQube for Eclipse connect "
+ "to an untrusted server is potentially dangerous.",
"Connect to this SonarQube Server",
"Connect to this SonarQube Server instance",
automaticSetUp);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected void createContentArea(Composite composite) {

@Override
protected String getPopupShellTitle() {
return "SonarQube - Language" + (languages.size() > 1 ? "s" : "") + " could not be analyzed";
return "SonarQube for Eclipse - Language" + (languages.size() > 1 ? "s" : "") + " could not be analyzed";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class EditGlobalExclusionDialog extends EditExclusionDialog {
/**
* The standard message to be shown when there are no problems being reported.
*/
private static final String STANDARD_MESSAGE = "Define the GLOB pattern to exclude files from SonarQube analyses";
private static final String STANDARD_MESSAGE = "Define the GLOB pattern to exclude files from the analyses";

public EditGlobalExclusionDialog(Shell parentShell, @Nullable String editItem) {
super(parentShell);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public RulesConfigurationPage() {

@Override
public void init(IWorkbench workbench) {
setDescription("Configure rules used for SonarQube analysis for projects not in Connected Mode.");
setDescription("Configure rules used for analysis for projects not in Connected Mode.");
}

@Override
Expand Down

0 comments on commit 1205520

Please sign in to comment.