Skip to content

Commit af429ee

Browse files
committed
Update
1 parent f89295b commit af429ee

File tree

1 file changed

+33
-37
lines changed

1 file changed

+33
-37
lines changed

lib/src/generate_screen_access/generator.dart

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,34 @@ Future<void> generateScreenAccess({
6565
);
6666

6767
// 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)) {
7070
final filePath = filePathResult.path;
7171

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+
},
7696
);
7797

7898
// if (classInsights.isNotEmpty) {
@@ -140,37 +160,13 @@ Future<void> generateScreenAccess({
140160

141161
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
142162

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+
// }
174170

175171
enum _Categories {
176172
DART,

0 commit comments

Comments
 (0)