sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/jackpot/EnhancedFor.hint
branchdonation_review
changeset 1043 57843026e60b
parent 1027 205b7632914c
parent 1040 f7b6892fd754
child 1044 7feb751ba76b
     1.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/jackpot/EnhancedFor.hint	Mon Dec 19 11:37:36 2016 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,43 +0,0 @@
     1.4 -'Convert to Enhanced For':
     1.5 -for(int $i = 0; $i < $array.length; $i++) {
     1.6 -    $T $var = ($T) $array[$i];
     1.7 -    $stmts$;
     1.8 -} :: !referencedIn($i, $stmts$) && sourceVersionGE(SourceVersion.RELEASE_5)
     1.9 -=>
    1.10 -for($T $var : $array) {
    1.11 -    $stmts$;
    1.12 -}
    1.13 -;;
    1.14 -
    1.15 -'Convert to Enhanced For':
    1.16 -for(int $i = 0; $i < $array.length; $i++) {
    1.17 -    $T $var = $array[$i];
    1.18 -    $stmts$;
    1.19 -} :: !referencedIn($i, $stmts$) && sourceVersionGE(SourceVersion.RELEASE_5)
    1.20 -=> 
    1.21 -for($T $var : $array) {
    1.22 -    $stmts$;
    1.23 -}
    1.24 -;;
    1.25 -
    1.26 -'Convert to Enhanced For':
    1.27 -for($I $i = $iterable.iterator(); $i.hasNext();) {
    1.28 -    $T $var = ($T)$i.next();
    1.29 -    $stmts$;
    1.30 -} :: $iterable instanceof java.lang.Iterable && !referencedIn($i, $stmts$) && sourceVersionGE(SourceVersion.RELEASE_5)
    1.31 -=>
    1.32 -for($T $var : $iterable) {
    1.33 -    $stmts$;
    1.34 -}
    1.35 -;;
    1.36 -
    1.37 -'Convert to Enhanced For':
    1.38 -for($I $i = $iterable.iterator(); $i.hasNext();) {
    1.39 -    $T $var = $i.next();
    1.40 -    $stmts$;
    1.41 -} :: $iterable instanceof java.lang.Iterable && !referencedIn($i, $stmts$) && sourceVersionGE(SourceVersion.RELEASE_5)
    1.42 -=>
    1.43 -for($T $var : $iterable) {
    1.44 -    $stmts$;
    1.45 -}
    1.46 -;;