jtulach commented on code in PR #9650:
URL: https://github.com/apache/netbeans/pull/9650#discussion_r4156334854
##########
ide/projectapi.nb/src/org/netbeans/modules/projectapi/nb/NbProjectManager.java:
##########
@@ -212,6 +212,17 @@ public Mutex getMutex(
*/
@Override
public Project findProject(final FileObject projectDirectory) throws
IOException, IllegalArgumentException {
+ return findProjectImpl(projectDirectory, false);
Review Comment:
> The Java single-file support needs `FileOwnerQuery.getOwner(file) == null`
(`SingleSourceFileUtil.isSupportedFile`, and `MultiSourceRootProvider` for the
classpath). So loose `.java` files in an opened folder would lose Run/Debug and
their editor classpath, exactly in the "open any folder" scenario. It also
leaves `isProject(dir) == false` while `findProject(dir) != null`.
- If the _Java single-file_ support checks for
`FileOwnerQuery.getOwner(file) == null` then it is likely disabled in (for
example) PHP projects
- checking that I am in _no projects_ is probably not the right check and
has to be changed
- the right question is: **Am I outside of a Java project**? What's the
right check for that?
- but is a great catch, thanks! some fix is needed
- as [Neil
puts](https://github.com/apache/netbeans/pull/9650#discussion_r4156403274) it:
> Anything not in a project or not inside a Java SourcesGroup
- if the source is outside of a Java `SourceGroup`, then it is probably not
handled by a Java project
- that shall work as the _fallback project_ intentionally only provides
`TYPE_GENERIC` source group
--
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