Bug 544303 - Add type arguments to e4 Tools databinding
Summary: Add type arguments to e4 Tools databinding
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.11   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.12 M3   Edit
Assignee: Jens Lideström CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 531748
Blocks:
  Show dependency tree
 
Reported: 2019-02-09 06:17 EST by Jens Lideström CLA
Modified: 2019-04-26 05:49 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Lideström CLA 2019-02-09 06:17:22 EST
Type parameters have been added to Eclipse databinding classes, but the code in e4 tools has not been updated to take advantage of this.

It is mainly the code in bundle org.eclipse.e4.tools.emf.ui that needs to updated.

This work is performed as part of the work to add type parameters to JFace and Beans databinding. See this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=531748

The original work to add type parameters to Core databinding is described here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=335792
Comment 1 Eclipse Genie CLA 2019-02-09 07:07:32 EST
New Gerrit change created: https://git.eclipse.org/r/136600
Comment 2 Jens Lideström CLA 2019-02-09 07:24:31 EST
I uploaded a changeset where the majority of the work on this is complete. Please have a look at it and see if it looks okay!
Comment 3 Jens Lideström CLA 2019-02-12 06:27:33 EST
The current solution adds a type parameter the AbstractComponentEditor.

That is a public type, which is also used in the extension point org.eclipse.e4.tools.emf.ui.editors.

It is okay to change the interface of that class?

The main point of having the type parameter is to give the getMaster method a type:

    WritableValue<M> getMaster()

The only way to not change the public interface would be to leave the return value type of getMaster with a raw type:

    WritableValue getMaster()

But get master could also get the types WritableValue<?> or WritableValue<Object>.
Comment 4 Wim Jongman CLA 2019-02-12 06:36:42 EST
(In reply to Jens Lideström from comment #3)

> 
> It is okay to change the interface of that class?

does it break binary compatibility? 

https://wiki.eclipse.org/Evolving_Java-based_APIs#General_Rules_for_Contract_Compatibility
https://wiki.eclipse.org/Evolving_Java-based_APIs_2
Comment 5 Jens Lideström CLA 2019-02-12 06:39:29 EST
(In reply to Wim Jongman from comment #4)
> does it break binary compatibility? 

I'm almost certain it will all be erased away so it will be binary compatible. But I'll double check.
Comment 6 Jens Lideström CLA 2019-04-14 14:07:54 EDT
(In reply to Wim Jongman from comment #4)

> does it break binary compatibility? 

No, it should not break binary compatibility. (That is, client code that is compiled for an old version of AbstractComponentEditor should work together with the compiled version of the updated version of that class.)

The change should also be mostly source compatible: The ordinary way for clients to use AbstractComponentEditor is to extend it. In that situation clients should only get warnings after the updates.
Comment 7 Jens Lideström CLA 2019-04-14 14:08:26 EDT
Sorry that I'm been inactive with this. I wanted to do some more testing, but it's been hard to find the time.

Now I spent more time just trying through much of the e4 editor, and I haven't found anything that isn't working.

I guess this is done.

(Note that these changes will not compile against the current platform UI master. They require the updated databinding bundles.)
Comment 8 Lars Vogel CLA 2019-04-26 05:49:29 EDT
Thanks, Jens.