mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Include VS Code + Android Studio URLs in the No IDE message (#69194)
This commit is contained in:
parent
92d9630eaf
commit
e71655b7e9
@ -34,7 +34,11 @@ class UserMessages {
|
||||
|
||||
// Messages used in NoIdeValidator
|
||||
String get noIdeStatusInfo => 'No supported IDEs installed';
|
||||
String get noIdeInstallationInfo => 'IntelliJ - https://www.jetbrains.com/idea/';
|
||||
List<String> get noIdeInstallationInfo => <String>[
|
||||
'IntelliJ - https://www.jetbrains.com/idea/',
|
||||
'Android Studio - https://developer.android.com/studio/',
|
||||
'VS Code - https://code.visualstudio.com/',
|
||||
];
|
||||
|
||||
// Messages used in IntellijValidator
|
||||
String intellijStatusInfo(String version) => 'version $version';
|
||||
|
@ -769,9 +769,11 @@ class NoIdeValidator extends DoctorValidator {
|
||||
|
||||
@override
|
||||
Future<ValidationResult> validate() async {
|
||||
return ValidationResult(ValidationType.missing, <ValidationMessage>[
|
||||
ValidationMessage(userMessages.noIdeInstallationInfo),
|
||||
], statusInfo: userMessages.noIdeStatusInfo);
|
||||
return ValidationResult(
|
||||
ValidationType.missing,
|
||||
userMessages.noIdeInstallationInfo.map((String ideInfo) => ValidationMessage(ideInfo)).toList(),
|
||||
statusInfo: userMessages.noIdeStatusInfo,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,6 +85,16 @@ void main() {
|
||||
expect(message.isError, isFalse);
|
||||
}, overrides: noColorTerminalOverride);
|
||||
|
||||
testUsingContext('No IDE Validator includes expected installation messages', () async {
|
||||
final ValidationResult result = await NoIdeValidator().validate();
|
||||
expect(result.type, ValidationType.missing);
|
||||
|
||||
expect(
|
||||
result.messages.map((ValidationMessage vm) => vm.message),
|
||||
UserMessages().noIdeInstallationInfo,
|
||||
);
|
||||
}, overrides: noColorTerminalOverride);
|
||||
|
||||
testUsingContext('vs code validator when 64bit installed', () async {
|
||||
expect(VsCodeValidatorTestTargets.installedWithExtension64bit.title, 'VS Code, 64-bit edition');
|
||||
final ValidationResult result = await VsCodeValidatorTestTargets.installedWithExtension64bit.validate();
|
||||
|
Loading…
Reference in New Issue
Block a user