On 10/25/2020 3:15 AM, Jaroslav Tulach wrote:
Dne neděle 25. října 2020 1:47:03 CET, Ernie Rael napsal(a):
I wasn't under the impression that adding a client property to a
JComponent is considered API. Is this a new/extended definition of API?
I'd say that "API is everything somebody else can depend on": http://
wiki.apidesign.org/wiki/APITypes
I can assure you that jVi would not "depend" on this:-) Were it to
disappear from NetBeans, things would simply revert to the somewhat
flaky behavior. (There are a variety of things that jVi and my personal
netbeans.conf use that are probably not documented. Perhaps I'm the only
one.)
I was thinking of adding, to BaseCaret class javadoc, something like
If there is a client property of "HACK_CARET_MIN_WIDTH" with a value
of the correct type then it /might/ be used; see source code for
details.
But it was pointed out that there's '<api group="property"' in arch.xml
(who knew? or is it who remembered).
Some investigation reveals that the problem was most likely introduced
in 2010. The BaseCaret was superseded in 2015 by something without the
capability of drawing a custom caret (some details below).
-ernie
Someone noticed the existing comment
// [TODO] Temporary fix - impl should remember real bounds computed
by paintCustomCaret()
which came from the commit
$ hg log -r 162415
changeset: 162415:656a27790c32
date: Thu Mar 04 20:36:57 2010 +0100
summary: #121357 - New Editor View Hierarchy - initial commit.
which only adds the comment and the hack of using min with a constant of 2.
And there's
$ hg log -r 09ad7431da9a
changeset: 295468:09ad7431da9a
branch: editor_multi_caret
date: Wed Dec 16 02:20:44 2015 +0100
summary: BaseCaret functionality merged into EditorCaret.
BaseCaret reverted into original state.
Further fixes required.
I didn't even know there was a new EditorCaret. The timeframe suggests
this is one of those newer things before Oracle nuked NetBeans.
A quick look at EditorCaret source code shows some private, non
documented, stuff (see BLOCK_CARET) that might be useful for drawing a
custom caret, but as mentioned, it's private and not documented. My
guess is that this stuff never had the opportunity to mature.
As the whole purpose of the change is to let jVi use it, it is clearly an API
according to my definition.
-jt
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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