lkishalmi commented on PR #4549:
URL: https://github.com/apache/netbeans/pull/4549#issuecomment-1250421625

   Well, `WeakReference` hide a caching issue (well not hide entirely, just 
made it difficult to tackle), where the cache entry validity has been evaluated 
on the `FileObject` modification date. That made go to source behave funny if 
there are two or more dependent grammars live in the editor modified but not 
saved.
   
   In that case when we had a cache hit, the data was not invalidates as it was 
only available in the editor not on disk, so we got a wrong result back. 
Actually the cache should be updated whenever the source in the editor would 
change. The parsing API would call the parser in that case so we would have the 
result. So I made the cache and it's update to the responsibility of 
`AntlrParser`, so whenever a parsing is requester, it would update the cache.
   
   


-- 
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

Reply via email to