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
18362ec6
Commit
18362ec6
authored
Nov 16, 2016
by
Ian Hickson
Committed by
GitHub
Nov 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve the debugDumpFoo output (#6882)
parent
bf2c46e2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
27 deletions
+25
-27
print.dart
packages/flutter/lib/src/foundation/print.dart
+14
-11
object.dart
packages/flutter/lib/src/rendering/object.dart
+1
-1
view.dart
packages/flutter/lib/src/rendering/view.dart
+7
-0
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+3
-15
No files found.
packages/flutter/lib/src/foundation/print.dart
View file @
18362ec6
...
@@ -80,24 +80,27 @@ final RegExp _indentPattern = new RegExp('^ *(?:[-+*] |[0-9]+[.):] )?');
...
@@ -80,24 +80,27 @@ final RegExp _indentPattern = new RegExp('^ *(?:[-+*] |[0-9]+[.):] )?');
enum
_WordWrapParseMode
{
inSpace
,
inWord
,
atBreak
}
enum
_WordWrapParseMode
{
inSpace
,
inWord
,
atBreak
}
/// Wraps the given string at the given width.
/// Wraps the given string at the given width.
///
///
/// Wrapping occurs at space characters (U+0020). Lines that start
/// Wrapping occurs at space characters (U+0020). Lines that start
with an
///
with an octothorpe ("#", U+0023) are not wrapped (so for example,
///
octothorpe ("#", U+0023) are not wrapped (so for example, Dart stack traces
///
Dart stack traces
won't be wrapped).
/// won't be wrapped).
///
///
///
This is not suitable for use with arbitrary Unicode text. F
or
///
Subsequent lines attempt to duplicate the indentation of the first line, f
or
/// example
, it doesn't implement UAX #14, can't handle ideographic
/// example
if the first line starts with multiple spaces. In addition, if a
///
text, doesn't hyphenate, and so forth. It is only intended for
///
`wrapIndent` argument is provided, each line after the first is prefixed by
///
formatting error messages
.
///
that string
.
///
///
/// The default [debugPrint] implementation uses this for its line
/// This is not suitable for use with arbitrary Unicode text. For example, it
/// wrapping.
/// doesn't implement UAX #14, can't handle ideographic text, doesn't hyphenate,
Iterable
<
String
>
debugWordWrap
(
String
message
,
int
width
)
sync
*
{
/// and so forth. It is only intended for formatting error messages.
///
/// The default [debugPrint] implementation uses this for its line wrapping.
Iterable
<
String
>
debugWordWrap
(
String
message
,
int
width
,
{
String
wrapIndent:
''
})
sync
*
{
if
(
message
.
length
<
width
||
message
[
0
]
==
'#'
)
{
if
(
message
.
length
<
width
||
message
[
0
]
==
'#'
)
{
yield
message
;
yield
message
;
return
;
return
;
}
}
Match
prefixMatch
=
_indentPattern
.
matchAsPrefix
(
message
);
Match
prefixMatch
=
_indentPattern
.
matchAsPrefix
(
message
);
String
prefix
=
' '
*
prefixMatch
.
group
(
0
).
length
;
String
prefix
=
wrapIndent
+
' '
*
prefixMatch
.
group
(
0
).
length
;
int
start
=
0
;
int
start
=
0
;
int
startForLengthCalculations
=
0
;
int
startForLengthCalculations
=
0
;
bool
addPrefix
=
false
;
bool
addPrefix
=
false
;
...
...
packages/flutter/lib/src/rendering/object.dart
View file @
18362ec6
...
@@ -2410,7 +2410,7 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
...
@@ -2410,7 +2410,7 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
List
<
String
>
description
=
<
String
>[];
List
<
String
>
description
=
<
String
>[];
debugFillDescription
(
description
);
debugFillDescription
(
description
);
result
+=
description
result
+=
description
.
expand
((
String
description
)
=>
de
scription
.
split
(
'
\n
'
))
.
expand
((
String
description
)
=>
de
bugWordWrap
(
description
,
65
,
wrapIndent:
'
'
))
.
map
/*<String>*/
((
String
line
)
=>
"
$descriptionPrefix$line
\n
"
)
.
map
/*<String>*/
((
String
line
)
=>
"
$descriptionPrefix$line
\n
"
)
.
join
();
.
join
();
if
(
childrenDescription
==
''
)
if
(
childrenDescription
==
''
)
...
...
packages/flutter/lib/src/rendering/view.dart
View file @
18362ec6
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:developer'
;
import
'dart:developer'
;
import
'dart:io'
show
Platform
;
import
'dart:ui'
as
ui
show
Scene
,
SceneBuilder
,
window
;
import
'dart:ui'
as
ui
show
Scene
,
SceneBuilder
,
window
;
import
'package:vector_math/vector_math_64.dart'
;
import
'package:vector_math/vector_math_64.dart'
;
...
@@ -171,8 +172,14 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
...
@@ -171,8 +172,14 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
@override
@override
void
debugFillDescription
(
List
<
String
>
description
)
{
void
debugFillDescription
(
List
<
String
>
description
)
{
// call to ${super.debugFillDescription(prefix)} is omitted because the root superclasses don't include any interesting information for this class
// call to ${super.debugFillDescription(prefix)} is omitted because the root superclasses don't include any interesting information for this class
assert
(()
{
description
.
add
(
'debug mode enabled -
${Platform.operatingSystem}
'
);
return
true
;
});
description
.
add
(
'window size:
${ui.window.physicalSize}
(in physical pixels)'
);
description
.
add
(
'window size:
${ui.window.physicalSize}
(in physical pixels)'
);
description
.
add
(
'device pixel ratio:
${ui.window.devicePixelRatio}
(physical pixels per logical pixel)'
);
description
.
add
(
'device pixel ratio:
${ui.window.devicePixelRatio}
(physical pixels per logical pixel)'
);
description
.
add
(
'configuration:
$configuration
(in logical pixels)'
);
description
.
add
(
'configuration:
$configuration
(in logical pixels)'
);
if
(
ui
.
window
.
semanticsEnabled
)
description
.
add
(
'semantics enabled'
);
}
}
}
}
packages/flutter/lib/src/widgets/framework.dart
View file @
18362ec6
...
@@ -2578,19 +2578,7 @@ abstract class Element implements BuildContext {
...
@@ -2578,19 +2578,7 @@ abstract class Element implements BuildContext {
}
}
if
(
node
!=
null
)
if
(
node
!=
null
)
chain
.
add
(
'
\
u22EF'
);
chain
.
add
(
'
\
u22EF'
);
String
result
=
''
;
return
chain
.
join
(
'
\
u2190 '
);
String
line
=
''
;
for
(
String
link
in
chain
)
{
if
(
line
!=
''
)
line
+=
'
\
u2190 '
;
if
(
link
.
length
>
3
&&
line
.
length
+
link
.
length
>
65
)
{
result
+=
'
$line
\n
'
;
line
=
' '
;
}
line
+=
link
;
}
result
+=
line
;
return
result
;
}
}
/// A short, textual description of this element.
/// A short, textual description of this element.
...
@@ -2637,8 +2625,8 @@ abstract class Element implements BuildContext {
...
@@ -2637,8 +2625,8 @@ abstract class Element implements BuildContext {
if
(
children
.
length
>
0
)
{
if
(
children
.
length
>
0
)
{
Element
last
=
children
.
removeLast
();
Element
last
=
children
.
removeLast
();
for
(
Element
child
in
children
)
for
(
Element
child
in
children
)
result
+=
'
${child.toStringDeep("$prefixOtherLines
\u251C", "$prefixOtherLines
\u2502")}
'
;
result
+=
'
${child.toStringDeep("$prefixOtherLines
\u251C", "$prefixOtherLines
\u2502")}
'
;
result
+=
'
${last.toStringDeep("$prefixOtherLines
\u2514", "$prefixOtherLines
")}
'
;
result
+=
'
${last.toStringDeep("$prefixOtherLines
\u2514", "$prefixOtherLines
")}
'
;
}
}
return
result
;
return
result
;
}
}
...
...
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