File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
default_editor/document_ime Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ Future<void> main() async {
5555 // editorLayoutLog,
5656 // editorDocLog,
5757 // editorStyleLog,
58+ // superImeLog,
5859 // textFieldLog,
5960 // editorUserTagsLog,
6061 // contentLayersLog,
Original file line number Diff line number Diff line change 11import 'package:flutter/cupertino.dart' ;
22import 'package:flutter/services.dart' ;
3+ import 'package:super_editor/src/infrastructure/_logging.dart' ;
34
45/// A globally shared holder of an IME connection, so that the IME connection
56/// can be seamlessly transferred between the same `SuperEditor` or `SuperTextField`
@@ -68,6 +69,7 @@ class SuperIme with ChangeNotifier {
6869 _imeConnection = null ;
6970 }
7071
72+ superImeLog.info ("Opening IME connection (owner: '$ownerInputId ')" );
7173 _imeConnection ?? = TextInput .attach (client, configuration);
7274 if (showKeyboard) {
7375 _imeConnection! .show ();
@@ -83,6 +85,7 @@ class SuperIme with ChangeNotifier {
8385 return ;
8486 }
8587
88+ superImeLog.info ("Closing IME connection (owner: '$ownerInputId ')" );
8689 _imeConnection? .close ();
8790 _imeConnection = null ;
8891
@@ -112,6 +115,7 @@ class SuperIme with ChangeNotifier {
112115 return ;
113116 }
114117
118+ superImeLog.info ("Giving IME ownership to new owner (owner: '$newOwnerInputId ')" );
115119 _owner = newOwnerInputId;
116120
117121 notifyListeners ();
@@ -133,7 +137,9 @@ class SuperIme with ChangeNotifier {
133137 return ;
134138 }
135139
140+ superImeLog.info ("Releasing IME ownership (owner: '$ownerInputId ')" );
136141 if (clearConnectionOnRelease) {
142+ superImeLog.info ("Closing connection when releasing IME ownership (owner: '$ownerInputId ')" );
137143 clearConnection (ownerInputId);
138144 }
139145 _owner = null ;
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ class LogNames {
4444 static const androidTextField = 'textfield.android' ;
4545 static const iosTextField = 'textfield.ios' ;
4646
47+ static const superIme = 'superime' ;
4748 static const infrastructure = 'infrastructure' ;
4849 static const keyboardPanel = 'infrastructure.keyboardPanel' ;
4950 static const longPressSelection = 'infrastructure.gestures.longPress' ;
@@ -91,13 +92,16 @@ final readerStyleLog = logging.Logger(LogNames.readerStyle);
9192final readerDocLog = logging.Logger (LogNames .readerDocument);
9293final readerOpsLog = logging.Logger (LogNames .readerCommonOps);
9394
95+ // Text Fields.
9496final textFieldLog = logging.Logger (LogNames .textField);
9597final scrollingTextFieldLog = logging.Logger (LogNames .scrollingTextField);
9698final imeTextFieldLog = logging.Logger (LogNames .imeTextField);
9799final androidTextFieldLog = logging.Logger (LogNames .androidTextField);
98100final iosTextFieldLog = logging.Logger (LogNames .iosTextField);
99101
102+ // Infrastructure.
100103final docGesturesLog = logging.Logger (LogNames .documentGestures);
104+ final superImeLog = logging.Logger (LogNames .superIme);
101105final infrastructureLog = logging.Logger (LogNames .infrastructure);
102106final keyboardPanelLog = logging.Logger (LogNames .keyboardPanel);
103107final longPressSelectionLog = logging.Logger (LogNames .longPressSelection);
You can’t perform that action at this time.
0 commit comments