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
c98ce024
Commit
c98ce024
authored
May 27, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
print the dartlang atom plugin version from flutter doctor (#4242)
parent
be7e00a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
20 deletions
+26
-20
doctor.dart
packages/flutter_tools/lib/src/doctor.dart
+26
-20
No files found.
packages/flutter_tools/lib/src/doctor.dart
View file @
c98ce024
...
...
@@ -245,38 +245,44 @@ class AtomValidator extends DoctorValidator {
bool
atomDirExists
=
FileSystemEntity
.
isDirectorySync
(
_getAtomHomePath
());
if
(!
atomDirExists
)
{
messages
.
add
(
new
ValidationMessage
.
error
(
'Atom not installed; download at https://atom.io.'
));
messages
.
add
(
new
ValidationMessage
.
error
(
'Atom not installed; download at https://atom.io.'
));
}
else
{
installCount
++;
if
(!
_validateHasPackage
(
messages
,
'flutter'
,
'Flutter'
))
installCount
++;
if
(!
_validateHasPackage
(
messages
,
'dartlang'
,
'Dart'
))
installCount
++;
}
if
(!
hasPackage
(
'flutter'
))
{
messages
.
add
(
new
ValidationMessage
.
error
(
'Flutter plugin not installed; this adds Flutter specific functionality to Atom.
\n
'
'Install the
\'
flutter
\'
plugin in Atom or run
\'
apm install flutter
\'
.'
return
new
ValidationResult
(
installCount
==
3
?
ValidationType
.
installed
:
installCount
==
1
?
ValidationType
.
partial
:
ValidationType
.
missing
,
messages
);
}
bool
_validateHasPackage
(
List
<
ValidationMessage
>
messages
,
String
packageName
,
String
description
)
{
if
(!
hasPackage
(
packageName
))
{
messages
.
add
(
new
ValidationMessage
(
'
$packageName
plugin not installed; this adds
$description
specific functionality to Atom.
\n
'
'Install the plugin from Atom or run
\'
apm install
$packageName
\'
.'
));
return
true
;
}
else
{
installCount
++;
try
{
String
flutterPluginPath
=
path
.
join
(
_getAtomHomePath
(),
'packages'
,
'flutter'
);
String
flutterPluginPath
=
path
.
join
(
_getAtomHomePath
(),
'packages'
,
packageName
);
File
packageFile
=
new
File
(
path
.
join
(
flutterPluginPath
,
'package.json'
));
dynamic
packageInfo
=
JSON
.
decode
(
packageFile
.
readAsStringSync
());
Map
<
String
,
dynamic
>
packageInfo
=
JSON
.
decode
(
packageFile
.
readAsStringSync
());
String
version
=
packageInfo
[
'version'
];
messages
.
add
(
new
ValidationMessage
(
'
Atom installed; Flutter
plugin version
$version
'
));
messages
.
add
(
new
ValidationMessage
(
'
$packageName
plugin version
$version
'
));
}
catch
(
error
)
{
printTrace
(
'Unable to read
flutter
plugin version:
$error
'
);
printTrace
(
'Unable to read
$packageName
plugin version:
$error
'
);
}
return
false
;
}
return
new
ValidationResult
(
installCount
==
2
?
ValidationType
.
installed
:
installCount
==
1
?
ValidationType
.
partial
:
ValidationType
.
missing
,
messages
);
}
bool
hasPackage
(
String
packageName
)
{
...
...
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