1

The properties view is not wrapping the text that is inside the cells in column "Value", so if the field has a big string, it isn't shown entirely.

My question is how can I wrapp the text in the cells?

I think I need to create a new PropertySheet, get the table and change the columns/cells setting to wrap the text.

So I created a new PropertySheet, added as an extension point and do the changes here.

public class RunnerPropertyView extends PropertySheet {

    @Override
    public void createPartControl(Composite parent) {
        super.createPartControl(parent);
        //not sure how to get the table instance here...

    }

}

Am I thinking right? How can I get the table instance?

amp
  • 9,710
  • 15
  • 67
  • 118
  • All rows in a SWT table must have the same height so wrapping a single entry isn't really possible. – greg-449 Nov 28 '16 at 13:55
  • @greg-449 Didn't know that... Do you know an option to accomplish something like that? I mean, I would like to be able to see the full content of the cell (I can manually resize the view container but if the content is big enough, and it can, I will have the same problem). – amp Nov 28 '16 at 14:14
  • A double click event opening a popup with the full Value would be acceptable... Or a tooltip when hovering the value. Do you know How can any of this options be achieved? – amp Nov 28 '16 at 14:30
  • Perhaps use the [Tabbed Properties View](https://www.eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html) – greg-449 Nov 28 '16 at 14:34
  • @greg-449 Not sure if this is an option. Are you suggesting to put the property name as the text of the tab and the property value the content (right side)? This wouldn't work for me because I would like to be able to see multiple all the properties at the same time, even if I can't see all the content... Did I get correctly your suggestion? – amp Nov 28 '16 at 14:51
  • The tabbed properties view is a complete replacement for the normal properties view which might be more suitable since it gives you a lot more control over how values are displayed. – greg-449 Nov 28 '16 at 14:58
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/129255/discussion-between-amp-and-greg-449). – amp Nov 28 '16 at 15:42

1 Answers1

0

Unfortunately it seems that this is not possible for SWT tables because all rows should have the same height. If the content has '\n' characters the row might have different heights, but this is not an option...

Let me know if you find a good approach to solve that.

amp
  • 9,710
  • 15
  • 67
  • 118