tmysik commented on code in PR #8196:
URL: https://github.com/apache/netbeans/pull/8196#discussion_r1929723572
##########
php/php.project/src/org/netbeans/modules/php/project/ComputeTestMethodAnnotations.java:
##########
@@ -142,59 +178,72 @@ public void run() {
}
}
- private List<TestMethod> getTestMethods(Document document) {
- List<TestMethod> testMethods = new ArrayList<>();
- FileObject fileObject = NbEditorUtilities.getFileObject(document);
- if (fileObject != null) {
- PhpProject project = PhpProjectUtils.getPhpProject(fileObject);
- assert project != null;
- PhpModule phpModule = project.getPhpModule();
- for (PhpTestingProvider testingProvider :
project.getTestingProviders()) {
+ /**
+ * Get test methods for the first available testing provider.
+ *
+ * @return test methods
+ */
+ private List<TestMethod> getTestMethods() {
Review Comment:
I am not sure about this change, the previous code made more sense to me.
The reason is the "lifecycle" - I mean, we detect a possible document to
process, so we schedule processing for this particular document. If the focused
document already changed, we stop the processing and schedule a new one for
this new document.
With this change, the `handledDocument` can change, no? Or is it ensured
that we are using the very _same_ instance on line 187 and 195?
--
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