EXECUTE: Open HQL Editor, and type some long query using tabs (\t) instead of usual whitespaces.
EXECUTE: Send the query into Hibernate Query Result view.
ASSERT: New tab folder is added to the view in 1-2 seconds even for queries as long as 1000 characters.
ASSERT: Resize of the view goes without delays.
FAILURE: For a query of 120 characters, including 15 \t characters, creation of new tab folder, and each subsequent resize of the view takes 7 seconds. Doubling text size increases time 8 times.
SWT methods CTabFolderRenderer.shortenText(GC, String, int, String), TextLayout.getPreviousOffset(int,int), GC.textExtent(String,int) have poor performance for long strings with \t characters. I have created issue https://bugs.eclipse.org/bugs/show_bug.cgi?id=374987
Class HQLQueryPage sets tab name as
This issue may be solved by modifying it as