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
90f7afcb
Commit
90f7afcb
authored
Nov 14, 2016
by
Dan Rubel
Committed by
GitHub
Nov 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flutter doctor show one intellij install per location (#6820)
parent
df25e489
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
doctor.dart
packages/flutter_tools/lib/src/doctor.dart
+19
-2
No files found.
packages/flutter_tools/lib/src/doctor.dart
View file @
90f7afcb
...
...
@@ -302,17 +302,34 @@ abstract class IntelliJValidator extends DoctorValidator {
}
class
IntelliJValidatorOnLinux
extends
IntelliJValidator
{
IntelliJValidatorOnLinux
(
String
title
,
this
.
version
,
this
.
pluginsPath
)
:
super
(
title
);
IntelliJValidatorOnLinux
(
String
title
,
this
.
version
,
this
.
installPath
,
this
.
pluginsPath
)
:
super
(
title
);
@override
String
version
;
final
String
installPath
;
@override
String
pluginsPath
;
static
Iterable
<
DoctorValidator
>
get
installed
{
List
<
DoctorValidator
>
validators
=
<
DoctorValidator
>[];
if
(
homeDirPath
==
null
)
return
validators
;
void
addValidator
(
String
title
,
String
version
,
String
installPath
,
String
pluginsPath
)
{
IntelliJValidatorOnLinux
validator
=
new
IntelliJValidatorOnLinux
(
title
,
version
,
installPath
,
pluginsPath
);
for
(
int
index
=
0
;
index
<
validators
.
length
;
++
index
)
{
DoctorValidator
other
=
validators
[
index
];
if
(
other
is
IntelliJValidatorOnLinux
&&
validator
.
installPath
==
other
.
installPath
)
{
if
(
validator
.
version
.
compareTo
(
other
.
version
)
>
0
)
validators
[
index
]
=
validator
;
return
;
}
}
validators
.
add
(
validator
);
}
for
(
FileSystemEntity
dir
in
new
Directory
(
homeDirPath
).
listSync
())
{
if
(
dir
is
Directory
)
{
String
name
=
path
.
basename
(
dir
.
path
);
...
...
@@ -327,7 +344,7 @@ class IntelliJValidatorOnLinux extends IntelliJValidator {
}
if
(
installPath
!=
null
&&
FileSystemEntity
.
isDirectorySync
(
installPath
))
{
String
pluginsPath
=
path
.
join
(
dir
.
path
,
'config'
,
'plugins'
);
validators
.
add
(
new
IntelliJValidatorOnLinux
(
title
,
version
,
pluginsPath
)
);
addValidator
(
title
,
version
,
installPath
,
pluginsPath
);
}
}
});
...
...
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