Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » why is not JFace based on generics?
why is not JFace based on generics? [message #637789] Mon, 08 November 2010 20:37 Go to next message
Luca Ferrari is currently offline Luca FerrariFriend
Messages: 159
Registered: November 2009
Senior Member
Hi,
I'm just curious to understand why JFace does not exploit generics for viewers related classes (e.g., label providers and so on). I know that SWT uses arrays instead of collections for backward compatibility, but generics after all produces code that can be run even in jre < 1.5, and maybe using generics could give some advantages.
I guess there is a really good reason I cannot see here, after all I believe that other GUI libraries do not use generics too. What am I missing?

Thanks.
Re: why is not JFace based on generics? [message #637828 is a reply to message #637789] Tue, 09 November 2010 04:50 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
On 09/11/10 2:07 AM, Luca Ferrari wrote:
> Hi,
> I'm just curious to understand why JFace does not exploit generics for
> viewers related classes (e.g., label providers and so on). I know that
> SWT uses arrays instead of collections for backward compatibility, but
> generics after all produces code that can be run even in jre < 1.5, and
> maybe using generics could give some advantages.
> I guess there is a really good reason I cannot see here, after all I
> believe that other GUI libraries do not use generics too. What am I
> missing?
>
> Thanks.

Because all of the Platform UI code is still on Java 1.4

--
- Prakash
Platform UI Team, IBM

www.eclipse-tips.com
Re: why is not JFace based on generics? [message #637954 is a reply to message #637789] Tue, 09 November 2010 12:58 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

In addition to Prakash's comment, most of JFace was already written
before 1.5 came on the scene, and up until recently we still had a
requirement that JFace be mobile device compatible (which meant
Foundation 1.0 or more recently 1.1).

It would be a lot of work to go back and retro-fit the API with 1.5
features (Iterable, generics, Enums, etc).

It could be done ... if someone wants to spend the time to get it right
and do it :-)

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Expand Mac application menu with custom MenuItem
Next Topic:How to Crop/Trim Image/ImageData
Goto Forum:
  


Current Time: Thu Oct 19 12:49:59 GMT 2017

Powered by FUDForum. Page generated in 0.01805 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software