Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 346579

Summary: [php5.3]add click for goto label
Product: z_Archived Reporter: Zhongwei Zhao <zhaozhongwei>
Component: PDTAssignee: PHP UI <php.ui-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: Laurent.Lyaudet, thierryblind, wywrzal, zulus
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
See Also: https://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=99415f05dc157cfd16063ca3acf7e128e77fda84
https://git.eclipse.org/r/112352
Whiteboard:

Description Zhongwei Zhao CLA 2011-05-20 01:21:31 EDT
namespace a;
NSLABEL:
echo a;
GOTO NSLABEL;

when user click on the second NSLABEL,it should navigate to its declaration.
Comment 1 Michal Niewrzal CLA 2016-06-13 06:45:44 EDT
Unnecessary improvement in my opinion.
Comment 2 Dawid Pakula CLA 2016-06-13 06:55:33 EDT
On monster procedural code (more than 1k lines) might be very usable for navigation ;) Occurrence for matching labels also.
Comment 3 Laurent Lyaudet CLA 2017-11-24 08:10:27 EST
Hello,
A sample file to test it works in and outside function scope ><
<?php

function foo($b){
  $a = null;
  if($b){
    goto bar;
  }

  //do something
  $a = 'a';

  bar:

  //do something
  $c = 'c';
  return [$a, $c];
}//fin fonction foo()


//do something
$b = true;

bar:
list($a, $c) = foo($b);

if($a === null){
  $b = false;
  goto bar;
}

var_dump($a);

?>

Best regards,
   Laurent Lyaudet
Comment 4 Thierry BLIND CLA 2017-11-27 13:32:41 EST
https://git.eclipse.org/r/#/c/112352
Comment 5 Thierry BLIND CLA 2017-11-27 13:36:29 EST
Merged.
Comment 7 Eclipse Genie CLA 2017-11-27 14:05:28 EST
New Gerrit change created: https://git.eclipse.org/r/112352