eclipse-pdt / pdt

PHP Development Tools project (PDT)
https://eclipse.org/pdt
Eclipse Public License 2.0
188 stars 46 forks source link

'Open declaration' action does not 'open' vars declared in foreach() #249

Open litdevel opened 1 year ago

litdevel commented 1 year ago

Describe the bug Open declaration action (default key F3) does not 'open' vars declared in foreach()

Describe the eclipse environment Eclipse PDT 8.1.0.202307051059

To Reproduce Steps to reproduce the behavior:

  1. Copy and paste in IDE
    
    <?php
    $array=array();
    //$strange_value = null;
    foreach ($array as $strange_key => $strange_value) {
    //
    // ...
    // A lot of new lines here
    // ...
    $strange_value;
    }

2. Mouse right click on '$strange_value' + Open declaration
3. Open variable declaration failure

**Expected behavior**
Focus on foreach() line