errael commented on pull request #2482: URL: https://github.com/apache/netbeans/pull/2482#issuecomment-717300266
> What I'm missing is an analysis what is the underlying the problem See the first statement of this github PR thread; and dev list thread `Re: API is ... was: https://github.com/apache/netbeans/pull/2482` has some historical information about the NetBeans evolution related to this issue. To summarize: ModelToView returns bounding box with width 1 for a tab (_New Editor View Hierarchy_ introduced in 2010), the BaseCaret changes this to 2. This becomes the clip for drawing the caret in BaseCaret#update which ends with `c.repaint(caretBounds)`. > and why it can only be solved by providing a new property, Only? It was not my intention to say this PR was the only solution. > that we might need to support for a long time. This change is marked in arch.xml as "devel" and it's in a "devel" module. No commitment/suggestion of long term support. > I read through `paintCustomCarent` and indeed the caret size is not set there. This would be easier, if the code would even be exercised. In the IDE the `BaseCaret#paint` method is never hit, so it is difficult to see what is really the problem. I didn't realize until this week that BaseCaret was no longer used by the Standard IDE editors. But since you now know that the new (2015) EditorCaret exhibits the same problem, you could probably look there. There are probably other plugins around that use BaseCaret, but if you're really interested in seeing the code action, you could install jVi. > > Is it right, that you provide a custom caret and override `painCustomCarent`? > Yes. And by this time it's too late, the clip is set. > Am I right that the problem you are seeing is caused by the repaint call in `actionPerformed` being invoked with a too small area? repaint is called from a variety of places. The setting of the clip region is through BaseCaret#updateCaretBounds, which is primarily called through BaseCaret#update ---------------------------------------------------------------- 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. 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
