Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #287123 +++ Support is missing for primitives.
The fix for Bug 287123 was to offer 'Join variable declaration' quick assist when the initializer is *null*. If the initializer is not null then the quick assist is not offered, because the initializer may be important to the user and we do not want to delete it silently/without warning. So what needs to be done for primitive types ? Offer the quick assist when the variable is initialized to the default value of the primitive type ? e.g. int i= 0; or boolean b= false; In my opinion we should not do this, as this would be confusing.
> So what needs to be done for primitive types ? Offer the quick assist when the > variable is initialized to the default value of the primitive type ? e.g. int > i= 0; or boolean b= false; Yes. > In my opinion we should not do this, as this would be confusing. Why should we treat the default value for objects different from the primitive ones?
Double d= 0d; Double d= 0.0d; Double d= 0.00d; - In which case is the quick assist offered? (rhetorical question) - And from a user perspective there is no scope of confusion here?
(In reply to comment #3) > Double d= 0d; > Double d= 0.0d; > Double d= 0.00d; > - In which case is the quick assist offered? (rhetorical question) In none, as those assign real objects which are different from the object default ('null'). > - And from a user perspective there is no scope of confusion here? Why?
oops.. the D is double was supposed to be lower case double d= 0d; double d= 0.0d; double d= 0.00d;
> double d= 0d; > double d= 0.0d; > double d= 0.00d; Those are all identical to the default (0.0d) and hence the quick assist should be there.