@@ -467,8 +467,11 @@ ClassMethod GetCoverageTargetsForFile(pFileName As %String, Output pTargetArray)
467467 $$$ThrowOnError(tSC )
468468 Set tExtension = " CLS"
469469 } ElseIf (tExtension = " CLS" ) {
470- If (tName = " *" ) {
471- // TODO: support special case of *.CLS
470+ If (tName [ " *" ) {
471+ w !, " *CLS" ,!
472+ // *.CLS is "all classes in the current namespace's default routine database"
473+ // Will ignore system classes unless run in %SYS namespace or "%" is included in the expression
474+ Do ..SearchClasses (tLine ,.tNames )
472475 } Else {
473476 Set tNames (tName ) = " "
474477 }
@@ -506,6 +509,23 @@ ClassMethod SearchRoutines(pSearchExpr As %String, Output pRoutines) [ Private ]
506509 } While 'tAtEnd
507510}
508511
512+ /// Returns the classes in this namespace that satisfy the pSearchExpr
513+ /// Will not return system classes unless run in %SYS or pSearchExpr contains "%" prefix
514+ ClassMethod SearchClasses (pSearchExpr As %String , Output pClasses )
515+ {
516+ set statement = " SELECT Name FROM %Library.RoutineMgr_StudioOpenDialog(?,1,1,0,1,0,0)"
517+
518+ #dim result As %SQL.StatementResult
519+ Set result = ##class (%SQL.Statement ).%ExecDirect (,statement , pSearchExpr )
520+ If (result .%SQLCODE < 0 ) {
521+ Throw ##class (%Exception.SQL ).CreateFromSQLCODE (result .%SQLCODE ,result .%Message )
522+ }
523+ While result .%Next (.tSC ) {
524+ $$$ThrowOnError(tSC )
525+ set pClasses ($Piece (result .%Get (" Name" )," ." ,1 ,*-1 )) = " "
526+ }
527+ }
528+
509529Method GetObjectCodeForSourceNames (pSourceNameList As %List ) As %List [ Private ]
510530{
511531 New $Namespace
0 commit comments