@@ -65,14 +65,34 @@ Future<void> generateScreenAccess({
65
65
);
66
66
67
67
// For each file...
68
- for (final filePathResult in sourceFileExplorerResults.filePathResults
69
- .where ((e) => e.category == _Categories .DART )) {
68
+ for (final filePathResult
69
+ in sourceFileExplorerResults.filePathResults .where ((e) => e.category == _Categories .DART )) {
70
70
final filePath = filePathResult.path;
71
71
72
- // Extract insights from the file.
73
- final classInsights = await extractClassInsightsFromDartFile1 (
74
- analysisContextCollection,
75
- filePath,
72
+ late ModelGenerateScreenBindings temp;
73
+ final analyzer = DartAnnotatedClassAnalyzer (
74
+ filePath: filePath,
75
+ analysisContextCollection: analysisContextCollection,
76
+ );
77
+
78
+ //final insights = <_ClassInsight>[];
79
+ await analyzer.analyze (
80
+ inclClassAnnotations: {ModelGenerateScreenBindingsFieldNames .className},
81
+ // onClassAnnotationField: (params) async =>
82
+ // temp = _updateFromClassAnnotationField(temp, params),
83
+ //onPreAnalysis: (_, __) => temp = const ModelGenerateScreenBindings(),
84
+ onPostAnalysis: (params) {
85
+ // final fullPathName = params.fullFilePath;
86
+ // final fileName = p.basename(fullPathName);
87
+ // final dirPath = p.dirname(fullPathName);
88
+ // final insight = _ClassInsight(
89
+ // className: params.className,
90
+ // annotation: temp,
91
+ // dirPath: dirPath,
92
+ // fileName: fileName,
93
+ // );
94
+ // insights.add(insight);
95
+ },
76
96
);
77
97
78
98
// if (classInsights.isNotEmpty) {
@@ -140,37 +160,13 @@ Future<void> generateScreenAccess({
140
160
141
161
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
142
162
143
- Future <List <ClassInsight1 >> extractClassInsightsFromDartFile1 (
144
- AnalysisContextCollection analysisContextCollection,
145
- String filePath,
146
- ) async {
147
- //late ModelGenerateScreenBindings temp;
148
- // final analyzer = DartAnnotatedClassAnalyzer(
149
- // filePath: filePath,
150
- // analysisContextCollection: analysisContextCollection,
151
- // );
152
-
153
- // //final insights = <_ClassInsight>[];
154
- // await analyzer.analyze(
155
- // inclClassAnnotations: {ModelGenerateScreenBindingsFieldNames.className},
156
- // // onClassAnnotationField: (params) async =>
157
- // // temp = _updateFromClassAnnotationField(temp, params),
158
- // //onPreAnalysis: (_, __) => temp = const ModelGenerateScreenBindings(),
159
- // onPostAnalysis: (params) {
160
- // // final fullPathName = params.fullFilePath;
161
- // // final fileName = p.basename(fullPathName);
162
- // // final dirPath = p.dirname(fullPathName);
163
- // // final insight = _ClassInsight(
164
- // // className: params.className,
165
- // // annotation: temp,
166
- // // dirPath: dirPath,
167
- // // fileName: fileName,
168
- // // );
169
- // // insights.add(insight);
170
- // },
171
- // );
172
- return [];
173
- }
163
+ // Future<List<ClassInsight1>> extractClassInsightsFromDartFile1(
164
+ // AnalysisContextCollection analysisContextCollection,
165
+ // String filePath,
166
+ // ) async {
167
+
168
+ // return [];
169
+ // }
174
170
175
171
enum _Categories {
176
172
DART ,
0 commit comments