Community
Participate
Working Groups
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
New Gerrit change created: https://git.eclipse.org/r/136600
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!
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>.
(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
(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.
(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.
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.)
Thanks, Jens.
Gerrit change https://git.eclipse.org/r/136600 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.tools.git/commit/?id=c180e32861879a5d585404642f63d90f8448fdc3