Skip to main content

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


Making the property sheet public would be bad. Once people start subclassing it, trying to add new features without breakage would become too hard.

If you think your changes would be generally useful, I'd suggest creating an enhancement request in bugzilla and attach your patch to the PropertySheetView (add me to the CC list if you do). If you can include examples, JavaDoc, and test suites for the new APIs, there's a decent chance your changes will make it into head.

  - Stefan




"John Ruud" <jruud@xxxxxxxxxxxx>
Sent by: platform-ui-dev-admin@xxxxxxxxxxx

02/28/2005 04:57 PM

Please respond to
platform-ui-dev

To
<platform-ui-dev@xxxxxxxxxxx>
cc
Subject
[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


_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ui-dev


Back to the top