Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] E4-Workbench needs a new plugin


Making the workbench code widget 'agnostic' is a good (perhaps necessary) thing. The most inportant part of a model-driven UI is the model, not the elements that are used to reflect it in a particular environment. The concepts captured in the model are at an architectural level far above that of SWT (stacks, activation/dirty states...) and can have many different but valid representations even when sticking with SWT. This most cetainly does not mean that we're moving away from SWT as the base implementation, just that we dont' want to paint ourselves into that particular corner for all time...

As an illistration picture a 'renderer' that simply emits a string for each element in the model. This would be quite useful when writing test code that is only interested in whether the strucure of the model is correct. Tests for whether or not event 'x' does 'y', these tests would be part of the particular renderer's test suite. Even these cases should take as much advantage of the separation afforded by databinding as possible ( we should be able to share a fiar bit of 'controller' logic this way, even with different underlying widgets),

The idea of revamping JFace to pick up on some of the advancements (databinding, new widgets, better editing support)  we've made since it came into being seems to be a natural thing to do. When we do this is also makes sense to ensure that we abstract away the implementation control to the extent possible, allowing viewers to work against different implementation controls without affecting the client's code.

This might mean (for example) that the viewer's 'getControl()' method should return Object (and that even then it would be nice if we could somehow tool up a 'portability' warning when it's used). The current 3.x view implementations are full of casting code that prevents any hope of their actually running on anything except SWT (indeed anything except an SWT Tree) even though a high percentage of the code is not directly UI related. We'd like to get away from this habit and udating JFace is a start.

Eric

P.S. just for fun I did a text search for "import org.eclipse.swt.widgets.Tree" in the org.eclipse.ui.navigator (aka Project Exlorer) project and found (to my great surprise) that the -only- hit was in the "NavigatorSiteEditor". Perhaps it's a good candidate for an 'agnostic' viewer testbed?



Ralf Sternberg <rsternberg@xxxxxxxxxxxxxxxxx>
Sent by: e4-dev-bounces@xxxxxxxxxxx

03/04/2009 06:46 AM

Please respond to
E4 Project developer mailing list <e4-dev@xxxxxxxxxxx>

To
E4 Project developer mailing list <e4-dev@xxxxxxxxxxx>
cc
Subject
Re: [e4-dev] E4-Workbench needs a new plugin





Hi Tom,

thanks for explaining. I think the split is indeed an advantage to RAP.

On the other hand, the more I think about it, I wonder whether I like
the idea of an abstraction from SWT, which is in itself a (pretty good)
abstraction already. For example, won't splitting JFace make things
horribly complicated? And what is the benefit of your approach compared
to the longed for SWT/Qt port? I'm just asking - and sorry if this has
been discussed a hundred times before.

Ralf

Tom Schindl wrote:
> Hi Ralf,
>
> Yes this is the intenion and if I manage to commit the patch from
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=266533 into the codebase
> it is completely free of SWT and only one reference is left because of
> IStructuredSelection (which will eventually go away too someday).
>
> I already exchanged the underlying platform using UFaceKit [1] and
> yesterday in the night succeeded running on QT(Jambi) today.
>
> There are 2 intenions currently:
> a) Remove SWT from the core of the workbench to make it completely
>    widget-toolkit agnostic
>
> b) Move the Renderers (the part which is responsible to translate an
>    Workbench-Model-Object into a visual representation) out and
>    replaceable because this is how themeing will work in E4
>
> Tom
>
> [1]http://tom-eclipse-dev.blogspot.com/2009/03/give-your-e4-application-modern-look.html
>
>
> Ralf Sternberg schrieb:
>> Hi Tom,
>>
>> Tom Schindl wrote:
>>> Just to inform you I've today factored out some code from the
>>> "org.eclipse.e4.ui.workbench into" an new bundle
>>> "org.eclipse.e4.ui.workbench.renderers.swt".
>>
>> Is it the intention to remove all dependencies to SWT from the workbench
>> eventually? I noticed that only a few classes still contain references
>> to SWT/JFace.
>>
>> This would be good news for RAP since we could easily exchange the
>> renderers with RWT ones and leave the workbench as is.
>>
>> Ralf
>> _______________________________________________
>> e4-dev mailing list
>> e4-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/e4-dev
>
> _______________________________________________
> e4-dev mailing list
> e4-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/e4-dev
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev


Back to the top