lahodaj commented on code in PR #9650:
URL: https://github.com/apache/netbeans/pull/9650#discussion_r4167956275
##########
ide/projectapi.nb/src/org/netbeans/modules/projectapi/nb/NbProjectManager.java:
##########
@@ -489,11 +518,29 @@ public void clearNonProjectCache() {
LoadStatus.NO_SUCH_PROJECT.wrap(),
LoadStatus.SOME_SUCH_PROJECT.wrap(),
}));
- // XXX remove everything too? but then e.g.
AntProjectFactorySingleton
- // will stay while its delegates are changed, which does no good
- // XXX should there be any way to signal that a particular
- // folder should be "reloaded" by a new factory?
}
+ MUTEX.postWriteRequest(() -> {
+ synchronized (dir2Proj) {
+ // check if FallbackProject is still needed
+
+ Iterator<Map.Entry<FileObject, Union2<Reference<Project>,
LoadStatus>>> it = dir2Proj.entrySet().iterator();
Review Comment:
> @lahodaj has
[suggested](https://github.com/apache/netbeans/pull/9650#issuecomment-5936102979):
...
> > if there were explicit actions to open a folder as a workspace/add
folder to a workspace, we wouldn't probably need the fallback API -
>
> * the "explicit action" proposed by this PR is to call
`ProjectManager.findProjectOrFallback`
>
> * e.g. the new _API method is the "explicit action"_
>
> * such an approach has the benefit of **not prescribing the UI** how
it should look like
...
What I meant was "explicit action by the user", i.e. in the UI. The action
may be implemented by `ProjectManager.findProjectOrFallback`, or something else.
--
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