Bug 470536 - Expression is always hidden away by ellipses, even if there is enough room to show entire expression
Summary: Expression is always hidden away by ellipses, even if there is enough room to...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.4.2   Edit
Hardware: PC Windows 8
: P3 normal (vote)
Target Milestone: 4.7 M5   Edit
Assignee: Ralf Petter CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2015-06-18 23:34 EDT by Taro Kyo CLA
Modified: 2017-01-24 00:21 EST (History)
5 users (show)

See Also:


Attachments
Expressions are being hidden away by ellipses, even if there is enough room to fit all expressions. (16.77 KB, image/png)
2015-06-18 23:34 EDT, Taro Kyo CLA
no flags Details
This is still an issue in Eclipse Neon 4.6.0, Build ID: 20160613-1800. Maybe there are changes? (29.41 KB, image/png)
2017-01-01 11:24 EST, Taro Kyo CLA
no flags Details
Example of an expression before and after this fix is applied (25.13 KB, image/jpeg)
2017-01-09 13:24 EST, Ralf Petter CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Taro Kyo CLA 2015-06-18 23:34:55 EDT
Created attachment 254560 [details]
Expressions are being hidden away by ellipses, even if there is enough room to fit all expressions.

In the Expressions view in Eclipse, no matter how wide the view is, it will always hide away long expressions with ellipses. This is unnecessary, especially when I need to use the expressions I type in to determine what was wrong with the data.

I have attached a snapshot of the Expressions view hiding away expressions with ellipses, using a few expressions as examples. In reality, I would have tens of the expressions, all of which I need to look over them as I debug my way through.

It's worth noting that my monitor is 1080p, there's just way too much empty space that the Expressions view can utilize.
Comment 1 Taro Kyo CLA 2015-06-28 21:11:42 EDT
Changing this from Debug to UI, as it's more of a UI problem.

Sorry about that.
Comment 2 Dani Megert CLA 2015-07-23 10:05:39 EDT
Sarika, please check whether this is Debug or Platform UI.
Comment 3 Sarika Sinha CLA 2015-07-27 05:09:43 EDT
Looks Like Debug issue.
Comment 4 Taro Kyo CLA 2017-01-01 11:19:38 EST
Hello, it's the first day of year 2017. Has this issue been resolved?
Comment 5 Taro Kyo CLA 2017-01-01 11:24:08 EST
Created attachment 266081 [details]
This is still an issue in Eclipse Neon 4.6.0, Build ID: 20160613-1800. Maybe there are changes?
Comment 6 Sarika Sinha CLA 2017-01-02 04:23:30 EST
(In reply to Taro Kyo from comment #4)
> Hello, it's the first day of year 2017. Has this issue been resolved?

Unfortunately, no one is working on this issue. If someone can provide a good quality patch, we can look at it.
Comment 7 Ralf Petter CLA 2017-01-09 06:21:11 EST
The root cause of this bug lies in the getWatchExpressionName() method in org.eclipse.debug.internal.ui.model.elements.ExpressionLabelProvider. There is a hard coded 30 characters limit for the expression Name. I think on the very big monitors today this limit makes no sense anymore.

There are some possible solutions for this problem.

1. Remove the limit completely and let SWT limit the text in the table cell.
2. Lift the limit to 256 characters because this is the maximum value a table column can view properly in Windows (other platforms have higher limits so should be no problem with them)
3. Make the limit configurable in the preferences of Debug.

I can provide a patch on gerrit, but it will be really nice if anyone with commit rights in the debug project will tell me which solution i should create, because i do not want to spend time on a patch which will never be committed.
Comment 8 Andrey Loskutov CLA 2017-01-09 06:56:22 EST
(In reply to Ralf Petter from comment #7)
> The root cause of this bug lies in the getWatchExpressionName() method in
> org.eclipse.debug.internal.ui.model.elements.ExpressionLabelProvider. There
> is a hard coded 30 characters limit for the expression Name. I think on the
> very big monitors today this limit makes no sense anymore.
> 
> There are some possible solutions for this problem.
> 
> 1. Remove the limit completely and let SWT limit the text in the table cell.

On older GTK 2/3 versions huge text/table widgets size could lead to unpredictable results up to UI freeze.

> 2. Lift the limit to 256 characters because this is the maximum value a
> table column can view properly in Windows (other platforms have higher
> limits so should be no problem with them)

Please do this. The change would be small & I could merge this without fear to break something.

> 3. Make the limit configurable in the preferences of Debug.

Nice to have.

> I can provide a patch on gerrit, but it will be really nice if anyone with
> commit rights in the debug project will tell me which solution i should
> create, because i do not want to spend time on a patch which will never be
> committed.

Thank you to step in!
Comment 9 Eclipse Genie CLA 2017-01-09 07:14:19 EST
New Gerrit change created: https://git.eclipse.org/r/88263
Comment 10 Ralf Petter CLA 2017-01-09 07:25:45 EST
Hm looks like the source of ExpressionLabelProvider is indented using whitespace characters and not using tabs. Is this a problem? I can reconfigure my eclipse editor to use whitespace and upload a new patch set if this is needed. 

Would be really nice, if all eclipse projects would have the same formatting policy.
Comment 11 Andrey Loskutov CLA 2017-01-09 07:33:36 EST
(In reply to Ralf Petter from comment #10)
> Hm looks like the source of ExpressionLabelProvider is indented using
> whitespace characters and not using tabs. Is this a problem? I can
> reconfigure my eclipse editor to use whitespace and upload a new patch set
> if this is needed. 
> 
> Would be really nice, if all eclipse projects would have the same formatting
> policy.

The org.eclipse.debug.ui project preferences are set to use tabs, the code historically seem to use spaces, and the current code is a happy mix of both, so I would not care in your case.

However (and I guess I will be in minority here) I would prefer to clean the whitespace issues in org.eclipse.debug.ui by:
1) Remove all trailing white space
2) Add preference to run save action to cleanup white space on save
3) Convert all code to use tabs

@Dani, Markus: I guess you have objections to 3), but what about 1) and 2)?
Comment 13 Andrey Loskutov CLA 2017-01-09 08:31:48 EST
Thanks Ralf! I think your smallest possible patch fixes the issue for most users, entering/viewing an expression longer then 254 characters is not of a fun anymore anyway.
Comment 14 Ralf Petter CLA 2017-01-09 13:24:34 EST
Created attachment 266198 [details]
Example of an expression before and after this fix is applied
Comment 15 Sarika Sinha CLA 2017-01-24 00:21:08 EST
Verified using
Eclipse SDK

Version: Oxygen (4.7)
Build id: I20170123-2000