Bug 265591 - StyledText text layout extensibility
Summary: StyledText text layout extensibility
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 enhancement with 11 votes (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 264601
  Show dependency tree
 
Reported: 2009-02-19 23:44 EST by David Green CLA
Modified: 2019-09-06 15:30 EDT (History)
8 users (show)

See Also:


Attachments
screenshot of wrapped text (11.14 KB, image/png)
2009-02-19 23:47 EST, David Green CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Green CLA 2009-02-19 23:44:50 EST
StyledText should provide a mechanism to affect the layout of text.  Such a mechanism would enable text positioning within a line.  The primary use cases for this enhancement are:

# affecting the indent of text from the left margin, including indenting lines that may be wrapped so that the wrapped portion of the text is also indented
# positioning of text to fit into logical table cells or boxes

Currently StyledText has no such extensibility
Comment 1 David Green CLA 2009-02-19 23:47:03 EST
Created attachment 126258 [details]
screenshot of wrapped text

Attached a screenshot showing how wrapped text is not indented.  A means of controlling text layout would allow client code to affect the positioning of the wrapped text to avoid this problem.
Comment 2 Jörg Thönnes CLA 2009-02-20 01:53:51 EST
I find this feature very useful since it would allow full WikiText markup including tables. Lists with wrap around
would also look much better.

+1 and voting for it. David, please also vote.
Comment 3 Pavel Petrochenko CLA 2009-02-24 05:29:15 EST
In our project we have experimental fragment which extends SWT StyledText to provide basic positioning(it solves some basic problems), but in real we are also starving for such API
Comment 4 Jörg Thönnes CLA 2009-02-24 08:47:02 EST
(In reply to comment #3)
> In our project we have experimental fragment which extends SWT StyledText to
> provide basic positioning(it solves some basic problems), but in real we are
> also starving for such API

So please vote on this bug.

Spasibo, Jörg

Comment 5 Felipe Heidrich CLA 2009-02-24 17:05:47 EST
You have two requests in one bug.

The first request, set the indent for wrapped lines, depends on Bug 115432. Expect by carbon, it can be done.

The second request, table support, is much harder and not supported by any of the underlying technologies we use. It is very unlikely this will ever be fixed. Bug 115432 is also blocked by the lack of table support on StyledText.


One problem about having more than one request per bug is that I don't know if people here are voting for the 1st request or the 2nd.
Comment 6 David Green CLA 2009-02-24 18:16:46 EST
(In reply to comment #5)
> You have two requests in one bug.

Not quite, read on:

> The first request, set the indent for wrapped lines, depends on Bug 115432.
> Expect by carbon, it can be done.
> 
> The second request, table support, is much harder and not supported by any of
> the underlying technologies we use. It is very unlikely this will ever be
> fixed. Bug 115432 is also blocked by the lack of table support on StyledText.

You've made some assumptions about this request that are generally incorrect.  Bug 115432 is not the same as this request, since this request is about text layout extensibility, not platform-supported indentation.  The reason that this distinction is important is as follows:

Suppose that you want numeric bullets with indented text.  Bullets as supported by StyledText are not used in this example because they don't copy as characters to the clipboard.  So the bullets in use are actually just the same as any other text in the widget.

In this case you want the indented text to appear indented by 30px, but not the numeric bullet: that you want indented by 15px.  So one line that is indented and wrapped would have different indent settings for the wrapped portion of the line and every subsequent line.

This was posted as a single request because text layout extensibility as it is envisioned here would enable other possibilities (other than indentation), such as positioning of text to fit into logical boxes (such as those used by a table).
Comment 7 Mike Wilson CLA 2009-05-05 13:46:43 EDT
Changing Version tag to something more believable. Note that this is not a statement about when the enhancement request will be addressed (the Target Milestone field is used for that); the Version tag should be set to the version of Eclipse you were using when you saw the need for the enhancement.
Comment 8 Susan McCourt CLA 2009-10-21 11:54:29 EDT
(In reply to comment #5)
> You have two requests in one bug.
> 
> The first request, set the indent for wrapped lines, depends on Bug 115432.
> Expect by carbon, it can be done.

Do we get any relief from Cocoa on this issue?
We have a request in platform UI to wrap the detail text in the error dialog.  It is more difficult to read the status messages (and unpolished looking) when the wrap for the trace does not indent.  And the indent is needed to capture the multi-status parent/child relationship.

See the screen cap in https://bugs.eclipse.org/bugs/attachment.cgi?id=149318
Comment 9 Felipe Heidrich CLA 2009-10-22 10:32:26 EDT
David, I'm not sure I understand your last comment.
You are asking for a generic/flexible API to allow control over the text layout in StyledText. The indent for wrapped lines would be just one of the problems that can solved by this API, therefore, we don't need to design a specific API to solve this one problem.

Is that your point ?
Comment 10 David Green CLA 2009-10-22 11:58:53 EDT
(In reply to comment #9)
> David, I'm not sure I understand your last comment.
> You are asking for a generic/flexible API to allow control over the text layout
> in StyledText. The indent for wrapped lines would be just one of the problems
> that can solved by this API, therefore, we don't need to design a specific API
> to solve this one problem.

Sounds like you understood it perfectly: we need a generic API for controlling text layout.  One of the problems that it could solve is line indentation, however its applicability is more general.
Comment 11 Susan McCourt CLA 2009-10-22 15:45:25 EDT
Felipe, our dependent bug (bug 288767) only depends on the ability to achieve setLineWrapIndent(int value).  

This is mentioned in both this bug and in bug 115432.  Which bug should we attach to (both discuss the wrap indent in addition to other requirements.  All we need is wrap indent).

This is affecting the usability of the error dialog.  Clients are asking us to wrap the error dialog text, but due to the nested nature of the status/exception traces, we need wrapping to respect previous indention.
Comment 12 Felipe Heidrich CLA 2009-10-23 09:05:25 EDT
This problem is major work item and most unlikely to happen for 3.6 (something this big would need to be in plan in order to happen, and this bug is not in the 3.6 plan).

Bug 115432, in the order hand, has better chances. I'll _try_ to fix it for 3.6 M4. Bug 115432 is much simpler and more important at this time, and a simple feature should have a simple API, so separating this request in two just makes sense to me (sorry David).
Comment 13 Susan McCourt CLA 2009-10-23 12:15:30 EDT
thanks, Felipe.  I'll move the error dialog dependency to Bug 115432 and comment there.
Comment 14 David Green CLA 2009-10-23 14:16:15 EDT
(In reply to comment #12)
> sense to me (sorry David).

I understand... it makes sense to me.  Note the Mylyn WikiText can benefit from a fixed bug 115432 as well, just not as much ;)
Comment 15 Felipe Heidrich CLA 2009-10-30 14:01:28 EDT
FYI Bug 115432 is fixed.
Comment 16 Jörg Thönnes CLA 2010-03-05 20:00:56 EST
Any news here?

This blocks any useful table rendering in WikiText.

Not that it should be perfect, but some to control alignment of table entries.

This is open for more than 1 year now and 3.6 is getting close.

Thanks, Jörg
Comment 17 Felipe Heidrich CLA 2010-03-08 16:10:13 EST
Sorry Jörg, this item is not in the 3.6 plan.
It is already too late for 3.6 as the API freeze is this Friday and we already submit all the code, testing starts tomorrow.
Comment 18 Jörg Thönnes CLA 2010-03-10 07:42:32 EST
(In reply to comment #17)
> Sorry Jörg, this item is not in the 3.6 plan.
> It is already too late for 3.6 as the API freeze is this Friday and we already
> submit all the code, testing starts tomorrow.

That's a pity. What could be done here to address this earlier, i.e. for 3.7?
Comment 19 Felipe Heidrich CLA 2010-03-10 08:40:49 EST
(In reply to comment #18)
> That's a pity. What could be done here to address this earlier, i.e. for 3.7?

This bug is a good candidate for a contribution from the community.
It would also be a good idea to try to include it in the plan for the next release.
Comment 20 Eclipse Webmaster CLA 2019-09-06 15:30:12 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.