The Platform Ends Here
I apologize for the somewhat grim title. I just couldn't help it. I'm working on my Eclipse plug-in, deep into shaping my UI. Working with SWT is fine, I don't have many complaints. Well, until I reached the border. SWT controls have many limitations. It's natural for a framework to have limitations. However, SWT is a framework suited for running on multiple platforms, which means it's the lowest common denominator.
I reached one of these borders this week - I found out that I cannot have a list with variable row height. All rows must be of the same height. Since I want a list with fixed width and word wrap and this is simply impossible without having huge gaps between the lines (each line will have the height of the tallest line). It's not the first time I come across such a limitation. For example, a few weeks ago I found that I cannot have a list without scrollbars. Yep. Even if I don't need them, they will always be there.
Each time I encounter such a block, it usually takes me time just to understand that this is a platform limitation. These limitations are tucked inside the Eclipse Bugzilla or in the Eclipse discussion forums (both not indexed by Google regular search, by the way). It is very time consuming.
My main option now is to simply create a list myself by using more basic controls. This means I'm going to have to write a lot of code which is already written inside the framework. That's mostly because the framework is very hard to extend. Most of the classes implementing the controls are specifically marked as "do not extend". That's mainly because of the implementation which is platform specific. I can understand the rationale.
What I can't understand is JFace. JFace is a neat little framework that works on top and with SWT to provide common tasks like working with lists, trees, etc. There are many important features there. However, this framework simply cannot be extended. It is fixed to the SWT widgets, which cannot be extended, so extending it is out of the question. Needless to say, there is no documentation what so ever on the topic.
Designing a reusable framework is a delicate task. It is far more complex than designing a framework which is to be used as is, without extensions. A reusable framework is measured by the amount of code you have to rewrite. In the case of JFace, it simply failed.