Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] About API Tools results analysis

João Arthur <joaoarthurbm@xxxxxxxxx> wrote on 07/25/2013 02:33:14 PM:
> Would you say that these the problems (internal or friend clients)
> are less relevant than the others? 

> is there any way to exclude them from the restrictions?

Yes internal references are fine, and they can be excluded from report using API tools filters. That is probably what happened in 4.2 when you saw a large number of these problems "fixed".

>
> About 2. Fantastic explanation! :)

>
> Let me ask you, is there any other way to get advantage
> of TreeViewer without extending it? I'm trying to understand whether
> the restriction should be changed or the way developers
> use TreeViewer should change.


JFace viewers are probably a good case study all by themselves. As Boris mentioned it has many "approved" ways for clients to customize it. The Strategy pattern is used to allow clients to change what items appear, how they are displayed, sorted, filtered, etc. A listener can be attached that can be used for other kinds of custom behaviour. However because the API itself is a hierarchy of various levels of specialized Viewers, it offers much more control to subclasses than to clients. I.e., subclasses within the JFace framework need to customize much more than a typical client. Since the classes are not final it is tempting for clients to use subclassing to get that extra level of control for cases that are not supported by the official API.

John

Back to the top