You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -175,6 +184,36 @@ class UtplsqlController implements Controller {
175
184
}
176
185
return pathList
177
186
}
187
+
188
+
privatedefgetPathList(Stringpath) {
189
+
val pathList =newArrayList<String>
190
+
pathList.add(path)
191
+
return pathList
192
+
}
193
+
194
+
privatedefdedupPathList(List<String>pathList) {
195
+
val set =newHashSet<String>
196
+
for (path : pathList) {
197
+
set.add(path)
198
+
}
199
+
val ret =newArrayList<String>
200
+
val p =Pattern.compile("((((\\w+)\\.)?\\w+)\\.)?\\w+")
201
+
for (path : set) {
202
+
val m = p.matcher(path)
203
+
if (m.matches()) {
204
+
val parent1 = m.group(4) // user
205
+
val parent2 = m.group(2) // user.package
206
+
if (parent1 ===null||!set.contains(parent1)) {
207
+
if (parent2 ===null||!set.contains(parent2)) {
208
+
ret.add(path)
209
+
}
210
+
}
211
+
} else {
212
+
logger.severe('''path: «path» did not match «p.toString», this is unexected!''')
213
+
}
214
+
}
215
+
return ret
216
+
}
178
217
179
218
privatedefgetURL(Contextcontext) {
180
219
varURL url
@@ -242,20 +281,55 @@ class UtplsqlController implements Controller {
242
281
val parser =newUtplsqlParser(component.text, if (preferences.checkRunUtplsqlTest) {Connections.instance.getConnection(connectionName)} else {null}, owner)
243
282
val position = component.caretPosition
244
283
val path = parser.getPathAt(position)
245
-
val utPlsqlWorksheet =newUtplsqlWorksheet(path, connectionName)
284
+
val utPlsqlWorksheet =newUtplsqlWorksheet(path.pathList, connectionName)
val preferences =PreferenceModel.getInstance(Preferences.preferences)
316
+
val parser =newUtplsqlParser(component.text, if (preferences.checkRunUtplsqlTest) {Connections.instance.getConnection(connectionName)} else {null}, owner)
317
+
val position = component.caretPosition
318
+
val path = parser.getPathAt(position)
319
+
val reporter =newCodeCoverageReporter(path.pathList, connectionName)
0 commit comments