If i use the fore-each-template for the following values using
- foreCtrl+SpaceEnterEnter in line 5
- foreCtrl+SpaceEnterTabTabDownEnter in line 8
- foreCtrl+SpaceEnterTabTabDownDownEnter in line 11
the following code will be produced (by Eclipse 4.2)
01 public static String[] c = new String[]{"hi"};
02 public static void test() {
03 String[] a = new String[]{"hi"};
04 int[] b = new int[]{2};
05 for (String string : a) {
06 // 1. fine
07 }
08 for (int i : b) {
09 // 2. fine too
10 }
11 for (iterable_type iterable_element : c) {
12 // 3. not resolved?
13 }
14 }
Now the question:
- Why cant the Array
c
resolve it's Array-Type and name? - May this be a bug in Eclipse?