neilcsmith-net commented on issue #4199:
URL: https://github.com/apache/netbeans/issues/4199#issuecomment-2145368629
I had a quick look at this. Even I don't think reverting this is a feasible
solution! :smile:
Just null'ing the `instDelegate` in `delegate0` like @eirikbakke patch fails
a bunch of tests. (I had to move the test file into the right folder too to
check that). Looking at @sdedic comments on that JIRA report, I tried adding
an `int hash;` field to the `Performer` class and then doing -
```java
private Object delegate0(Lookup.Provider everything, List<?> data, boolean
getAction) {
int dataHash = data.hashCode();
if (hash != dataHash) {
hash = dataHash;
instDelegate = null;
}
Object d = instDelegate != null ? instDelegate.get() : null;
////
```
That seems to (partially) fix the terminal tab title issue for me, and all
the tests still pass. Not sure if that works for @eirikbakke other cases. The
data list appears to be the key to invalidating things. The idea of actions
listening on the `everything` lookup appears to be a red herring, as that is
recreated on every call with fixed contents from the data list. Holding a
strong reference to the data list might be a bad idea though. I hate code that
relies on weak references for "correct" behaviour.
I say partially fix the title issue, as there seems to be a secondary issue
with the context not changing to an unfocused tab when invoking the menu on it?
--
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