sdedic commented on code in PR #3995:
URL: https://github.com/apache/netbeans/pull/3995#discussion_r924870096


##########
java/junit.ui/src/org/netbeans/modules/junit/ui/actions/TestClassInfoTask.java:
##########
@@ -178,6 +177,15 @@ private static void collect(CompilationInfo info, TreePath 
clazz, List<TreePath>
         }
     }
 
+    private static String getEnclosingType(String fqClassName, String 
fileName) {
+        // drop the package name
+        String classOnly = fqClassName.substring(fqClassName.lastIndexOf('.') 
+ 1);
+        if (classOnly.startsWith(fileName) && classOnly.length() > 
fileName.length()) {
+            return classOnly.substring(fileName.length());
+        }
+        return null;

Review Comment:
   Note: there may be multiple toplevel classes in a file: how is the 
`SingleMethod` supposed  to capture that ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to