Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] [CN] New support for overriding existing extensions


In order to support the JDT extension, which wanted to reshape the existing
resource content contributed to a viewer, new functionality has been added
to allow clients to explicitly override an existing content extension.

The implementation allows clients to "pipeline" the contributions to the
tree to reshape them into their own models. This allows an extension (like
JDT) to contribute model elements that override contributed resources (like
returning Java elements for source folders and suppressing existing
IFolders). Other clients may come along and also override the resource
extension, in which case the contributions are "pipelined" through all
overriding extensions by priority.

Please take a look at https://bugs.eclipse.org/bugs/show_bug.cgi?id=126508
if you are interested in this capability.

A patch of the JDT extension has been posted to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=126507 which takes advantage
of this capability.

The API has been defined, but the implementation is not yet complete.
Currently, only intercepting requests for children is supported. Soon the
implementation will support intercepting direct requests to add, remove, or
refresh elements in the tree. (The API is available for review in
org.eclipse.ui.navigator.IPipelinedTreeContentProvider).

Some internal methods had to be reshaped to support this capability as the
computation for the appropriate extension is now considerably more complex.
In this process, API methods that were not in use were also removed to
shrink the API surface area. No Platform-level clients should be broken
with these changes (at least as of the latest version in HEAD).




-------------------------------------------------------------------------
Kind Regards,

Michael D. Elder
Rational Studio / Services Tools Development
IBM RTP Lab
Ext: (919) 543-8356
T/L:  441-8356
mdelder@xxxxxxxxxx





Back to the top