Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] Opening up the PropertySheetView "API"

We need to display custom text, fonts, colors, and images in *both* columns 
of the PropertySheetViewer. As the PSV currently doesn't seem to support 
this, we have instead modified the class as follows:

private void updateEntry(IPropertySheetEntry entry, TreeItem item) {
        // ensure that backpointer is correct
        item.setData(entry);

        // update the name and value columns
        item.setText(0, entry.getDisplayName());
        item.setText(1, entry.getValueAsString());
        Image image = entry.getImage();
        if (item.getImage(1) != image)
            item.setImage(1, image);

        if (entry instanceof IItemDecorator) // modified by us
            ((IItemDecorator) entry).decorate(entry, item); // modified by 
us

        // update the "+" icon
        updatePlus(entry, item);
    }

The problem with our approach is that we need to take over the whole 
org.eclipse.ui.views plugin, as opposed to simply sublclassing a couple of
classes (due to the "privateness" of the PS classes), and this is causing
problems for example when trying to support multiple versions of Eclipse.

What would be a good/preferred way of adding custom rendering support to the

property sheet view (I suspect there may be some resistance to simply making
the PSV class and some of its methods non-private)?

Thanks, John




Back to the top