Community
Participate
Working Groups
For the following declarations: class Bar { } class Foo extends Bar { } Foo foo = ...; Bar bar = ...; foo = bar; will trigger a quick fix with possibilities of Add cast to Integer Change type of foo to ... Change type of bar to ... This is all fine. I think a special case of String type variables should also be handled e.g. in the following case: String barString = bar; an additional possibility of: Get the string value of 'bar' using bar.toString() If the user selects this the code changes to: String barString = bar.toString(); Another possibility is: Get the string value of 'bar' using String.valueOf(bar) If the user selects this the code changes to: String barString = String.valueOf(bar); This will work even when bar is not a Class or Interface. These f course could be lower priority quick fixes.
Additional coersive Quick Fixes could be supported between Striung type, basic types and their Object counterparts using the valueOf(), parse<blah>() methods.
Moving to JDT UI for comments