Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-dev] how to create new junit test

Hi Ari

Please try again with eclipse-dev or even better platform-dev. I can see a message from you on eclipse-dev: I also verified that the moderator queue is empty.


From:        Ari Kast <arikast@xxxxxxxxx>
To:        "Eclipse JDT general developers list." <jdt-dev@xxxxxxxxxxx>
Date:        22.06.2020 05:35
Subject:        [EXTERNAL] Re: [jdt-dev] how to create new junit test
Sent by:        jdt-dev-bounces@xxxxxxxxxxx

Thanks Lars and Mickael,

I submitted a bug for the behavior I'm investigating here

My thought was to change the "layouts" field to some kind of circular buffer or something that's more agnostic about the direction in which it grows -- or maybe even just a simple hashmap with a bit of decoration to prevent it from growing larger than CACHE_SIZE, and an eviction policy that calls dispose() when something gets replaced.  One way or another I'd like to find a way to keep that cache full, which I assume would yield benefits beyond just this one bug (for example currently typing one letter into a 200-tall block selection takes abt 45 seconds on my machine, so I'd like to see what impact this has on that and then investigate that further assuming it's still slow after this fix).

Is it preferable to write my own cache utility as opposed to using 3rd party libs?

BTW I tried first sending this reply to the suggested eclipse-dev mailing list but I think that message has been awaiting moderator approval for several days now. 

Thanks for any tips/suggestions/guidance.


On Thu, Jun 18, 2020 at 3:53 PM Mickael Istria <mistria@xxxxxxxxxx> wrote:

On Thu, Jun 18, 2020 at 9:26 PM Ari Kast <arikast@xxxxxxxxx> wrote:
I'm doing some work inside org.eclipse.swt.custom.StyledTextRenderer to improve the cache hit ratio for the "layouts" field, and I wanted to write test cases for my work.

Did you open a bug on bugs.eclipse.orgabout this work? It would improve collaboration opportunities.

To my surprise though, at the top of the test class when I import org.eclipse.swt.custom.StyledTextRenderer, some Eclipse rule seems to kick in and immediately delete my import statement.

If this StyledTextRenderer type isn't used anywhere in the code, the import is just cleaned up.
Also, the StyledTextRenderer is "package" visible only, so it's not really possible to interact with it from the tests bundle.. So please open a bug with more details about what you're trying to achieve and we'll discuss there what's doable.


jdt-dev mailing list

To unsubscribe from this list, visit
jdt-dev mailing list
To unsubscribe from this list, visit

Back to the top