Commit c9a3e72
Fix namespace extraction to handle generic types and improve heuristics
- Use AddUsingsCodeActionResolver.GetNamespaceFromFQN to properly extract namespace from types with generics
- Improve heuristics to detect Web namespace by checking for EventArgs and EventCallback types
- Add check for ".Web>" pattern to catch generic parameters
Tests improved from 5/9 to 6/9 passing. @OnClick, @onchange, @OnClick with existing usings, @Bind:after all now pass. @Bind and @bind-value tests need investigation - they're finding System namespace or no match.
Co-authored-by: davidwengier <[email protected]>1 parent 38d9cb0 commit c9a3e72
File tree
1 file changed
+8
-6
lines changed- src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/CodeActions/Razor
1 file changed
+8
-6
lines changedLines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
126 | | - | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | | - | |
134 | | - | |
135 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
136 | 138 | | |
137 | | - | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
0 commit comments