Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
42c9719f
Unverified
Commit
42c9719f
authored
May 29, 2018
by
Danny Tuppeny
Committed by
GitHub
May 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change doctor to point at Flutter extension (#17987)
parent
24e2b238
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
vscode.dart
packages/flutter_tools/lib/src/vscode/vscode.dart
+3
-3
vscode_validator.dart
packages/flutter_tools/lib/src/vscode/vscode_validator.dart
+2
-2
doctor_test.dart
packages/flutter_tools/test/commands/doctor_test.dart
+6
-6
fake-extension.txt
...ode/extensions/Dart-Code.flutter-4.5.6/fake-extension.txt
+0
-0
No files found.
packages/flutter_tools/lib/src/vscode/vscode.dart
View file @
42c9719f
...
...
@@ -13,7 +13,7 @@ import '../base/version.dart';
const
bool
_includeInsiders
=
false
;
class
VsCode
{
static
const
String
extensionIdentifier
=
'Dart-Code.
dart-code
'
;
static
const
String
extensionIdentifier
=
'Dart-Code.
flutter
'
;
VsCode
.
_
(
this
.
directory
,
this
.
extensionDirectory
,
{
Version
version
,
this
.
edition
})
:
this
.
version
=
version
??
Version
.
unknown
{
...
...
@@ -43,7 +43,7 @@ class VsCode {
_isValid
=
true
;
_extensionVersion
=
new
Version
.
parse
(
extensionDir
.
basename
.
substring
(
'
$extensionIdentifier
-'
.
length
));
_validationMessages
.
add
(
'
Dart Code
extension version
$_extensionVersion
'
);
_validationMessages
.
add
(
'
Flutter
extension version
$_extensionVersion
'
);
}
}
...
...
@@ -175,7 +175,7 @@ class VsCode {
@override
String
toString
()
=>
'VS Code (
$version
)
${_extensionVersion != Version.unknown ? ',
Dart Code
($_extensionVersion)' : ''}
'
;
'VS Code (
$version
)
${_extensionVersion != Version.unknown ? ',
Flutter
($_extensionVersion)' : ''}
'
;
static
String
_getVersionFromPackageJson
(
String
packageJsonPath
)
{
if
(!
fs
.
isFileSync
(
packageJsonPath
))
...
...
packages/flutter_tools/lib/src/vscode/vscode_validator.dart
View file @
42c9719f
...
...
@@ -10,7 +10,7 @@ import 'vscode.dart';
class
VsCodeValidator
extends
DoctorValidator
{
static
const
String
extensionMarketplaceUrl
=
'https://marketplace.visualstudio.com/items?itemName=Dart-Code.
dart-code
'
;
'https://marketplace.visualstudio.com/items?itemName=Dart-Code.
flutter
'
;
final
VsCode
_vsCode
;
VsCodeValidator
(
this
.
_vsCode
)
:
super
(
_vsCode
.
productName
);
...
...
@@ -38,7 +38,7 @@ class VsCodeValidator extends DoctorValidator {
messages
.
addAll
(
_vsCode
.
validationMessages
.
map
((
String
m
)
=>
new
ValidationMessage
.
error
(
m
)));
messages
.
add
(
new
ValidationMessage
(
'
Dart Code
extension not installed; install from
\n
$extensionMarketplaceUrl
'
));
'
Flutter
extension not installed; install from
\n
$extensionMarketplaceUrl
'
));
}
return
new
ValidationResult
(
type
,
messages
,
statusInfo:
vsCodeVersionText
);
...
...
packages/flutter_tools/test/commands/doctor_test.dart
View file @
42c9719f
...
...
@@ -46,8 +46,8 @@ void main() {
expect
(
message
.
message
,
'VS Code at
${VsCodeValidatorTestTargets.validInstall}
'
);
message
=
result
.
messages
.
firstWhere
((
ValidationMessage
m
)
=>
m
.
message
.
startsWith
(
'
Dart Code
'
));
expect
(
message
.
message
,
'
Dart Code
extension version 4.5.6'
);
.
firstWhere
((
ValidationMessage
m
)
=>
m
.
message
.
startsWith
(
'
Flutter
'
));
expect
(
message
.
message
,
'
Flutter
extension version 4.5.6'
);
});
testUsingContext
(
'vs code validator when 64bit installed'
,
()
async
{
...
...
@@ -62,8 +62,8 @@ void main() {
expect
(
message
.
message
,
'VS Code at
${VsCodeValidatorTestTargets.validInstall}
'
);
message
=
result
.
messages
.
firstWhere
((
ValidationMessage
m
)
=>
m
.
message
.
startsWith
(
'
Dart Code
'
));
expect
(
message
.
message
,
'
Dart Code
extension version 4.5.6'
);
.
firstWhere
((
ValidationMessage
m
)
=>
m
.
message
.
startsWith
(
'
Flutter
'
));
expect
(
message
.
message
,
'
Flutter
extension version 4.5.6'
);
});
testUsingContext
(
'vs code validator when extension missing'
,
()
async
{
...
...
@@ -77,8 +77,8 @@ void main() {
expect
(
message
.
message
,
'VS Code at
${VsCodeValidatorTestTargets.validInstall}
'
);
message
=
result
.
messages
.
firstWhere
((
ValidationMessage
m
)
=>
m
.
message
.
startsWith
(
'
Dart Code
'
));
expect
(
message
.
message
,
startsWith
(
'
Dart Code
extension not installed'
));
.
firstWhere
((
ValidationMessage
m
)
=>
m
.
message
.
startsWith
(
'
Flutter
'
));
expect
(
message
.
message
,
startsWith
(
'
Flutter
extension not installed'
));
});
});
...
...
packages/flutter_tools/test/data/vscode/extensions/Dart-Code.
dart-code
-4.5.6/fake-extension.txt
→
packages/flutter_tools/test/data/vscode/extensions/Dart-Code.
flutter
-4.5.6/fake-extension.txt
View file @
42c9719f
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment