New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NETBEANS-5209] Document switcher popup not grouping by project on first use. #3299
Conversation
@mbien I filed this issue some time ago as https://issues.apache.org/jira/browse/NETBEANS-5209 |
@mbien I tested this fix with PHP project - it fixes first use after loading IDE. |
@KacerCZ ah interesting. Going to take a look at this case tomorrow. I might just add another commit which removes the async code. I could probably test it by putting a project on a usb drive or something similar. Thanks for linking the issue to the PR. |
ca3c620 has the async logic removed. Updated PR text. |
I'm happy to confirm that after last commit the issue seems to be fixed. |
rebased onto delivery, since I saw there will be a RC 3 |
@mbien I'm not sure about integrating this in to the 12.6 release, but also not investigated the changes in detail. Does this move the project resolution via FileOwnerQuery on to the EDT? |
yes. but at this point everything should be already in the cache. I had about 100 projects open and opened one file per project and the switcher appeared basically right away after IDE start. If you look at the doc of FileOwnerQueryImplementation: netbeans/ide/projectapi/src/org/netbeans/spi/project/FileOwnerQueryImplementation.java Lines 27 to 29 in c084119
If it is still determined that it still needs to be off EDT i would probably try to decouple it a few layers higher, e.g netbeans/platform/core.multitabs/src/org/netbeans/core/multitabs/impl/ButtonPopupSwitcher.java Line 455 in cf6c1a8
to avoid getting barraged by property change events fired from inner loops. |
Yes, I read the docs and looked at a couple of the implementations. I'm not sure if there might be edge cases that could lock up the EDT or not here. I presume it was made async for a reason. I also agree that moving up a few layers would make more sense. In terms of 12.6, going to request review - I'm not making the call on whether to merge, but it seems a slightly risky one to me at this stage when we're hoping this will be the final release. |
no need to rush anything. I rebased most of my bugfix PRs just in case someone wants to integrate them while i am not available. Lets get 12.6 released ;) |
OK, punting this to NB13 as no-one has reviewed. |
Great, finally you pick NETBEANS-3752 up. |
I was using NetBeans with this fix daily for one week without any problems. |
- file owner query is now a blocking opperation with timeout - under normal conditions the query returns a result right away - if it doesn't for whatever reason it won't block the EDT - it fixes the issue as side effect + avoids repaint flickering
changed the impl as previously discussed to make it less risky. (decoupled from EDT on a higher level, one task for all tabs with timeout) edit: for manual testing try to set a breakpoint inside the task, eg. there: https://github.com/apache/netbeans/pull/3299/files#diff-793eded4bbc5a3b7a16c8d300f53f467eb7538137d6d7338a36c433cf11473daR73 and then open the tab switcher. |
@matthiasblaesing @neilcsmith-net @timboudreau any opinions on this. The code which unblocks the EDT is here 92619c9#diff-793eded4bbc5a3b7a16c8d300f53f467eb7538137d6d7338a36c433cf11473daR80 The task is usually done in <10ms. Fallback would be no groups in the popup on time out - but this does not happen under normal operation. This is purely there to ensure that the EDT can in fact not be blocked indefinitely, without having to review the entire implementation behind the project lookup logic for this minor fix (there is a lot of caching going on there). |
@mbien merging so we get it in 13-rc1. I would normally be inclined to trigger back to the EDT via invokeLater with something like this. But here, this should be fine, and I suspect with any open tabs the information is already calculated as you said earlier. |
issue:
fix for document switcher popup not grouping by project on first use: