Community
Participate
Working Groups
Fix the compiler warnings in package org.eclipse.jface.bindings caused by moving to Java 1.5
The bindings package is very hard to fix. Especial the org.eclipse.jface.bindings.BindingManager class which has a lot of maps with values of different types in it which were evaluated by runtime. if (existingMatch instanceof Binding) { //.. } else if (existingMatch instanceof Collection) { //.. } This makes it hard to define a correct type. Also some of the types from the parameter description can't be right. For example the Method computeBindings has a parameter triggersByCommandId which is describt with "command identifiers (<code>String</code>) to triggers (<code>TriggerSequence</code>)". But it adds ParameterizedCommand and TriggerSequence to that map.
I suggest to skip it and focus on the viewers.
*** This bug has been marked as a duplicate of bug 428355 ***
.
Simon, can you have a look at this?
(In reply to Lars Vogel from comment #5) > Simon, can you have a look at this? Lars, I found more than 200 warnings on this package. Most of them seems to be related to this issue. I thought a handy hand to Simon could be useful. If there's no problem, I would like to continue helping on this issue. Here is a fix for ControlDecorationSupport, SWTObservables, JFaceProperties, ViewerLabelProvider Patch: https://git.eclipse.org/r/33291
> Lars, I found more than 200 warnings on this package... Sorry, I mean on this *project*
(In reply to Jeanderson Candido from comment #6) > Patch: https://git.eclipse.org/r/33291 Thanks Jeanderson. Applied with https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=721a97a0400700e1836ef59737e844e66475f4c3
I was browsing some code from databinding. Most warnings are caused by Raw types and I think there are two possible solutions for that: As a matter of example, consider the following declaration: public class ViewerElementSet implements Set { ... } 1 - We could add support to Generics to databinding data structures public class ViewerElementSet<E> implements Set<E> { ... } 2 - Remove raw types using Object and wildcards when possible: public class ViewerElementSet implements Set<Object> { ... } I honestly think that using the second approach will be easier to fix the issue and have less impact to the project. The first approach seems to be more complete and flexible but as someone who was working with generification, I think it will require some extra effort generify databinding. Also, we will be breaking the public API and generating more warnings. Opinions and suggestions?
I see lots of warnings in lots of plug-ins, does not make sense to have a bug report for individual plug-ins. Marking as fixed, as we fix several warnings in this plug-in.