0

I need a way to make eclipse IDE suggest a unique number among the current PHP file while I'm coding.

for example if I write somewhere in the code "unique-inCode-Sign-1" and elsewhere "unique-inCode-Sign-2", I need the IDE to suggest for me the next unique number which is "3" , something like this image


enter image description here

I need to do this because when I prepare the file to record and log errors and events that might happen, I need a way to uniquely find an in-code sign that uniquely identify the piece of code that logged the error for later code debugging. I was doing that when I was using notepad++ which suggests the string literals inside his autocomplete functionality. but I can't find a similar feature in eclipse. and obviously I can't depend on my memory to remember the last number specially when I have more than 50 unique in-code signs in the source file.

I'm using eclipse mars for PHP developers

Accountant م
  • 6,975
  • 3
  • 41
  • 61
  • I'm not particularly familiar with PHP, but have you considered instead calling an object that just increments and then prints your debug string with the number, perhaps [including your calling function](http://stackoverflow.com/q/2110732/4541045). – ti7 Dec 27 '16 at 18:04
  • @ti7 thanks for your time, but I need to produce a fixed **in-text** unique number inside the source file to record it -the unique number- along with the error or the whatever I need to log, so when review the application logs I see which piece of code logged that error. I don't need to produce a run time unique number. – Accountant م Dec 27 '16 at 18:25

0 Answers0