Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Eclipse Platform: Implementing generic in JFace viewers

This project is part of Google Summer of Code 2012.

  • Student: Hendrik Still
  • Mentor(s): Lars Vogel, John Arthorne, Markus Alexander Kuppe


Abstract

Currently the JFace UI Toolkit still supports language features of Java 1.4. With moving JFace to the language features of Java 1.5 it would be able to take use of Java generics. I will implement the generics feature for the viewers part of the JFace Toolkit. This helps the users of JFace to avoid casting of data objects and detect more type failures at compile-time.

Description

This proposal is based on the Feature Request/Bug no. 402445(“Add generics to the JFace Viewer framework”) for the JFace Toolkit. As mentioned in the abstract I will implement the generics language feature of Java 1.5 to the viewers of the UI Toolkit. From these changes the users will benefit from the stronger typing of objects as result of the use of generics. A very important issue for this change of the JFace API would be the backwards compatibility to the current API, to provide a fast integration into the next Eclipse Versions.

Deliverables

The goal would be to offer an API, that allows the user to access JFace in the following way:

TableViewerColumn<Person> col = new TableViewerColumn<Person>(viewer, SWT.NONE);
col.getColumn().setWidth(200);
col.getColumn().setText("Firstname:");
col.setLabelProvider(new ColumnLabelProvider<Person>() {
  @Override
  public String getText(Person element) {
    //Person p = (Person) element; This line should not be required
    return element.getFirstName();
  }
});

The changes of the API would also require changes of the Unittests (including backwards compatibil tests) and changes of the API Documentation.

Milestones

Coming Soon


Bugs

Bugzilla Bug Gerrit Status
bug 412273 [Viewers] Add generics to the ComboViewer https://git.eclipse.org/r/#/c/14941/ New
bug 411383 Fix compiler warnings caused by moving JFace to Java 1.5 New
bug 413611 Fix compiler warnings in org.eclipse.jface.bindings caused by moving JFace to Java 1.5 https://git.eclipse.org/r/#/c/14941/ New
bug 413649 Fix compiler warnings in org.eclipse.jface.layout caused by moving JFace to Java 1.5 https://git.eclipse.org/r/#/c/14824/ New
bug 413685 Fix compiler warnings in org.eclipse.jface.preference caused by moving JFace to Java 1.5 https://git.eclipse.org/r/14853 New
bug 413688 Fix compiler warnings in org.eclipse.jface.util caused by moving JFace to Java 1.5 https://git.eclipse.org/r/14875 New
bug 413499 Fix compiler warnings in org.eclipse.jface.commands caused by moving JFace to Java 1.5 https://git.eclipse.org/r/#/c/14771/ Merged
bug 413529 Fix compiler warnings in org.eclipse.jface.action caused by moving JFace to Java 1.5 https://git.eclipse.org/r/#/c/14779/ Merged
bug 413686 Fix compiler warnings in org.eclipse.jface.resource caused by moving JFace to Java 1.5 https://git.eclipse.org/r/14866 Merged
bug 413689 Fix the compiler warnings in package org.eclipse.jface.window caused by moving to Java 1.5 https://git.eclipse.org/r/14852 Merged


Resource

- Related Bug: [1] , [2]

- Google Summer of Code Proposal: [3]

Back to the top