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
428ce081
Unverified
Commit
428ce081
authored
May 27, 2020
by
Neevash Ramdial
Committed by
GitHub
May 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] Support latest IntelliJ via Jetbrain toolbox (#57963)
parent
356b958f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
88 deletions
+58
-88
doctor.dart
packages/flutter_tools/lib/src/doctor.dart
+17
-4
doctor_test.dart
...utter_tools/test/commands.shard/hermetic/doctor_test.dart
+41
-6
Info.plist
...est/data/intellij/mac_not_via_toolbox/Contents/Info.plist
+0
-38
Info.plist
...ls/test/data/intellij/mac_via_toolbox/Contents/Info.plist
+0
-40
No files found.
packages/flutter_tools/lib/src/doctor.dart
View file @
428ce081
...
...
@@ -915,19 +915,32 @@ class IntelliJValidatorOnMac extends IntelliJValidator {
}
final
List
<
String
>
split
=
version
.
split
(
'.'
);
if
(
split
.
length
<
2
)
{
return
null
;
}
final
String
major
=
split
[
0
];
final
String
minor
=
split
[
1
];
_pluginsPath
=
globals
.
fs
.
path
.
join
(
globals
.
fsUtils
.
homeDirPath
,
final
String
homeDirPath
=
globals
.
fsUtils
.
homeDirPath
;
String
pluginsPath
=
globals
.
fs
.
path
.
join
(
homeDirPath
,
'Library'
,
'Application Support'
,
'JetBrains'
,
'
$id$major
.
$minor
'
,
'plugins'
,
);
// Fallback to legacy location from < 2020.
if
(!
globals
.
fs
.
isDirectorySync
(
pluginsPath
))
{
pluginsPath
=
globals
.
fs
.
path
.
join
(
homeDirPath
,
'Library'
,
'Application Support'
,
'
$id$major
.
$minor
'
,
);
}
_pluginsPath
=
pluginsPath
;
return
_pluginsPath
;
}
String
_pluginsPath
;
...
...
packages/flutter_tools/test/commands.shard/hermetic/doctor_test.dart
View file @
428ce081
...
...
@@ -19,6 +19,7 @@ import 'package:flutter_tools/src/commands/doctor.dart';
import
'package:flutter_tools/src/doctor.dart'
;
import
'package:flutter_tools/src/features.dart'
;
import
'package:flutter_tools/src/globals.dart'
as
globals
;
import
'package:flutter_tools/src/ios/plist_parser.dart'
;
import
'package:flutter_tools/src/proxy_validator.dart'
;
import
'package:flutter_tools/src/reporting/reporting.dart'
;
import
'package:flutter_tools/src/version.dart'
;
...
...
@@ -55,6 +56,14 @@ void main() {
});
group
(
'doctor'
,
()
{
MockPlistParser
mockPlistParser
;
MemoryFileSystem
fileSystem
;
setUp
(()
{
mockPlistParser
=
MockPlistParser
();
fileSystem
=
MemoryFileSystem
.
test
();
});
testUsingContext
(
'intellij validator'
,
()
async
{
const
String
installPath
=
'/path/to/intelliJ'
;
final
ValidationResult
result
=
await
IntelliJValidatorTestTarget
(
'Test'
,
installPath
).
validate
();
...
...
@@ -77,14 +86,39 @@ void main() {
},
overrides:
noColorTerminalOverride
);
testUsingContext
(
'intellij plugins path checking on mac'
,
()
async
{
final
String
pathViaToolbox
=
globals
.
fs
.
path
.
join
(
'test'
,
'data'
,
'intellij'
,
'mac_via_toolbox'
);
final
String
pathNotViaToolbox
=
globals
.
fs
.
path
.
join
(
'test'
,
'data'
,
'intellij'
,
'mac_not_via_toolbox'
);
when
(
mockPlistParser
.
getValueFromFile
(
any
,
PlistParser
.
kCFBundleShortVersionStringKey
)).
thenReturn
(
'2020.10'
);
final
IntelliJValidatorOnMac
validatorViaToolbox
=
IntelliJValidatorOnMac
(
'Test'
,
'Test'
,
pathViaToolbox
);
expect
(
validatorViaToolbox
.
plistFile
,
'test/data/intellij/mac_via_toolbox/Contents/Info.plist'
);
final
Directory
pluginsDirectory
=
fileSystem
.
directory
(
'/foo/bar/Library/Application Support/JetBrains/TestID2020.10/plugins'
)
..
createSync
(
recursive:
true
);
final
IntelliJValidatorOnMac
validator
=
IntelliJValidatorOnMac
(
'Test'
,
'TestID'
,
'/path/to/app'
);
expect
(
validator
.
plistFile
,
'/path/to/app/Contents/Info.plist'
);
expect
(
validator
.
pluginsPath
,
pluginsDirectory
.
path
);
},
overrides:
<
Type
,
Generator
>{
Platform:
()
=>
FakePlatform
()
..
environment
=
<
String
,
String
>{
'HOME'
:
'/foo/bar'
},
PlistParser:
()
=>
mockPlistParser
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
mockProcessManager
,
});
final
IntelliJValidatorOnMac
validatorNotViaToolbox
=
IntelliJValidatorOnMac
(
'Test'
,
'Test'
,
pathNotViaToolbox
);
expect
(
validatorNotViaToolbox
.
plistFile
,
'test/data/intellij/mac_not_via_toolbox/Contents/Info.plist'
);
testUsingContext
(
'legacy intellij plugins path checking on mac'
,
()
async
{
when
(
mockPlistParser
.
getValueFromFile
(
any
,
PlistParser
.
kCFBundleShortVersionStringKey
)).
thenReturn
(
'2020.10'
);
final
IntelliJValidatorOnMac
validator
=
IntelliJValidatorOnMac
(
'Test'
,
'TestID'
,
'/foo'
);
expect
(
validator
.
pluginsPath
,
'/foo/bar/Library/Application Support/TestID2020.10'
);
},
overrides:
<
Type
,
Generator
>{
Platform:
()
=>
FakePlatform
()
..
environment
=
<
String
,
String
>{
'HOME'
:
'/foo/bar'
},
PlistParser:
()
=>
mockPlistParser
,
});
testUsingContext
(
'intellij plugins path checking on mac with override'
,
()
async
{
when
(
mockPlistParser
.
getValueFromFile
(
any
,
'JetBrainsToolboxApp'
)).
thenReturn
(
'/path/to/JetBrainsToolboxApp'
);
final
IntelliJValidatorOnMac
validator
=
IntelliJValidatorOnMac
(
'Test'
,
'TestID'
,
'/foo'
);
expect
(
validator
.
pluginsPath
,
'/path/to/JetBrainsToolboxApp.plugins'
);
},
overrides:
<
Type
,
Generator
>{
PlistParser:
()
=>
mockPlistParser
,
});
testUsingContext
(
'vs code validator when both installed'
,
()
async
{
...
...
@@ -1185,3 +1219,4 @@ class VsCodeValidatorTestTargets extends VsCodeValidator {
class
MockProcessManager
extends
Mock
implements
ProcessManager
{}
class
MockArtifacts
extends
Mock
implements
Artifacts
{}
class
MockPlistParser
extends
Mock
implements
PlistParser
{}
packages/flutter_tools/test/data/intellij/mac_not_via_toolbox/Contents/Info.plist
deleted
100644 → 0
View file @
356b958f
<
?xml
v
e
rsion='
1
.
0
'
e
n
c
o
d
ing='UT
F
-
8
'?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
'-//
A
ppl
e C
omput
e
r//
D
T
D
PLIST
1
.
0
//
E
N'
'http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
'
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
jetbrains-toolbox-launcher
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string/
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
>
Copyright
(
c
)
JetBrains
s.r.o.
<
/string
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSUIElement
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
LSUIElement
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
IntelliJ
IDEA
Ultimate
2019.3.3
<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
com.jetbrains.apps.activator.linkapp.pcom.jetbrains.apps.activator__ntelli_ltimate_2019_3_3
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
2019.3.3
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
>
2019.3.3
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
2019.3.3
<
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
icon.icns
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
packages/flutter_tools/test/data/intellij/mac_via_toolbox/Contents/Info.plist
deleted
100644 → 0
View file @
356b958f
<
?xml
v
e
rsion='
1
.
0
'
e
n
c
o
d
ing='UT
F
-
8
'?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
'-//
A
ppl
e C
omput
e
r//
D
T
D
PLIST
1
.
0
//
E
N'
'http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
'
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
English
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
jetbrains-toolbox-launcher
<
/string
>
<
k
e
y
>
CFBundleGetInfoString
<
/k
e
y
>
<
string/
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
>
Copyright
(
c
)
JetBrains
s.r.o.
<
/string
>
<
k
e
y
>
NSHighResolutionCapable
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSUIElement
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
LSUIElement
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
IntelliJ
IDEA
Ultimate
2019.3.3
<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
com.jetbrains.apps.activator.linkapp.pcom.jetbrains.apps.activator__ntelli_ltimate_2019_3_3
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
2019.3.3
<
/string
>
<
k
e
y
>
CFBundleLongVersionString
<
/k
e
y
>
<
string
>
2019.3.3
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
2019.3.3
<
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
>
icon.icns
<
/string
>
<
k
e
y
>
JetBrainsToolboxApp
<
/k
e
y
>
<
string
>
/Users/lynn/Library/Application
Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/193.6494.35/IntelliJ
IDEA.app
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
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