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
4daee0cc
Commit
4daee0cc
authored
Mar 14, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc tool ui cleanup
parent
229253f4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
18 deletions
+37
-18
executable.dart
packages/flutter_tools/lib/executable.dart
+10
-1
artifacts.dart
packages/flutter_tools/lib/src/artifacts.dart
+2
-2
devices.dart
packages/flutter_tools/lib/src/commands/devices.dart
+1
-3
device.dart
packages/flutter_tools/lib/src/device.dart
+20
-5
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+3
-4
template.dart
packages/flutter_tools/lib/src/template.dart
+1
-3
No files found.
packages/flutter_tools/lib/executable.dart
View file @
4daee0cc
...
...
@@ -42,6 +42,12 @@ Future<Null> main(List<String> args) async {
bool
verbose
=
args
.
contains
(
'-v'
)
||
args
.
contains
(
'--verbose'
);
bool
verboseHelp
=
help
&&
verbose
;
if
(
verboseHelp
)
{
// Remove the verbose option; for help, users don't need to see verbose logs.
args
=
new
List
<
String
>.
from
(
args
);
args
.
removeWhere
((
String
option
)
=>
option
==
'-v'
||
option
==
'--verbose'
);
}
FlutterCommandRunner
runner
=
new
FlutterCommandRunner
(
verboseHelp:
verboseHelp
)
..
addCommand
(
new
AnalyzeCommand
())
..
addCommand
(
new
ApkCommand
())
...
...
@@ -75,7 +81,10 @@ Future<Null> main(List<String> args) async {
exit
(
result
);
},
onError:
(
dynamic
error
,
Chain
chain
)
{
if
(
error
is
UsageException
)
{
stderr
.
writeln
(
error
);
stderr
.
writeln
(
error
.
message
);
stderr
.
writeln
();
stderr
.
writeln
(
"Run 'flutter -h' (or 'flutter <command> -h') for available "
"flutter commands and options."
);
// Argument error exit code.
exit
(
64
);
}
else
if
(
error
is
ProcessExit
)
{
...
...
packages/flutter_tools/lib/src/artifacts.dart
View file @
4daee0cc
...
...
@@ -21,7 +21,7 @@ String _getNameForHostPlatform(HostPlatform platform) {
}
}
String
_
getNameForTargetPlatform
(
TargetPlatform
platform
)
{
String
getNameForTargetPlatform
(
TargetPlatform
platform
)
{
switch
(
platform
)
{
case
TargetPlatform
.
android_arm
:
return
'android-arm'
;
...
...
@@ -63,7 +63,7 @@ class Artifact {
String
get
platform
{
if
(
targetPlatform
!=
null
)
return
_
getNameForTargetPlatform
(
targetPlatform
);
return
getNameForTargetPlatform
(
targetPlatform
);
if
(
hostPlatform
!=
null
)
return
_getNameForHostPlatform
(
hostPlatform
);
assert
(
false
);
...
...
packages/flutter_tools/lib/src/commands/devices.dart
View file @
4daee0cc
...
...
@@ -29,9 +29,7 @@ class DevicesCommand extends FlutterCommand {
printStatus
(
'No connected devices.'
);
}
else
{
printStatus
(
'
${devices.length}
connected
${pluralize('device', devices.length)}
:
\n
'
);
for
(
Device
device
in
devices
)
printStatus
(
device
.
fullDescription
);
Device
.
printDevices
(
devices
);
}
return
0
;
...
...
packages/flutter_tools/lib/src/device.dart
View file @
4daee0cc
...
...
@@ -3,12 +3,15 @@
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:math'
as
math
;
import
'android/android_device.dart'
;
import
'application_package.dart'
;
import
'artifacts.dart'
;
import
'base/common.dart'
;
import
'base/utils.dart'
;
import
'build_configuration.dart'
;
import
'globals.dart'
;
import
'ios/devices.dart'
;
import
'ios/simulators.dart'
;
import
'toolchain.dart'
;
...
...
@@ -140,11 +143,6 @@ abstract class Device {
bool
get
supportsStartPaused
=>
true
;
String
get
fullDescription
{
String
supportIndicator
=
isSupported
()
?
''
:
' - unsupported'
;
return
'
$name
(
$id
)
$supportIndicator
'
;
}
/// Whether it is an emulated device running on localhost.
bool
get
isLocalEmulator
;
...
...
@@ -202,6 +200,23 @@ abstract class Device {
}
String
toString
()
=>
name
;
static
void
printDevices
(
List
<
Device
>
devices
)
{
int
nameWidth
=
0
;
int
idWidth
=
0
;
for
(
Device
device
in
devices
)
{
nameWidth
=
math
.
max
(
nameWidth
,
device
.
name
.
length
);
idWidth
=
math
.
max
(
idWidth
,
device
.
id
.
length
);
}
for
(
Device
device
in
devices
)
{
String
supportIndicator
=
device
.
isSupported
()
?
''
:
' (unsupported)'
;
printStatus
(
'
${device.name.padRight(nameWidth)}
• '
'
${device.id.padRight(idWidth)}
• '
'
${getNameForTargetPlatform(device.platform)}$supportIndicator
'
);
}
}
}
class
ForwardedPort
{
...
...
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
4daee0cc
...
...
@@ -47,8 +47,8 @@ abstract class FlutterCommand extends Command {
Stopwatch
stopwatch
=
new
Stopwatch
()..
start
();
return
_run
().
then
((
int
exitCode
)
{
printTrace
(
"'flutter
$name
' exiting with code
$exitCode
; "
"elasped time
${stopwatch.elapsedMilliseconds}
ms
."
);
int
ms
=
stopwatch
.
elapsedMilliseconds
;
printTrace
(
"'flutter
$name
' took
${ms}
ms; exiting with code
$exitCode
."
);
return
exitCode
;
});
}
...
...
@@ -90,8 +90,7 @@ abstract class FlutterCommand extends Command {
"the '-d <deviceId>' flag."
);
printStatus
(
''
);
devices
=
await
deviceManager
.
getAllConnectedDevices
();
for
(
Device
device
in
devices
)
printStatus
(
device
.
fullDescription
);
Device
.
printDevices
(
devices
);
return
1
;
}
else
{
_deviceForCommand
=
devices
.
single
;
...
...
packages/flutter_tools/lib/src/template.dart
View file @
4daee0cc
...
...
@@ -72,9 +72,7 @@ class Template {
.
replaceAll
(
_kCopyTemplateExtension
,
''
)
.
replaceAll
(
_kTemplateExtension
,
''
);
File
finalDestinationFile
=
new
File
(
finalDestinationPath
);
String
relativePathForLogging
=
relativeDestPath
.
replaceAll
(
_kCopyTemplateExtension
,
''
)
.
replaceAll
(
_kTemplateExtension
,
''
);
String
relativePathForLogging
=
path
.
relative
(
finalDestinationFile
.
path
);
// Step 1: Check if the file needs to be overwritten.
...
...
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