Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Netbeans PHP if you control + mouse1 click on an object or variable it will go to the initial declaration, if it's in the same script.

But is there any way to make it go to the initial declaration if it was made inside a previously included script?

share|improve this question
add comment

1 Answer 1

There may be a better way to do this, but this is my work around:

  1. Select or highlight the variable.
  2. Right click > Refactor > Rename...
  3. Change the name.
  4. Click the Preview button

Netbeans will then list all the occurrences of the variable within your project. From this list, you should be able to find where you initialized it.

Be sure to click the Cancel button, if you do not mean to rename the variable.

For the same results without refactoring, you can also use Edit > Find Usages.

share|improve this answer
    
hi thanks for your reply. Your method is a bit like the 'find usages' option, and would probably work in most instances but I have an enormous framework here with a number of global variables being used hundreds of times across numerous scripts, and working out where each had been instantiated is proving to be problematic. –  Spoonface Jan 17 '12 at 18:29
    
Ah. The Edit > Find Usages option is much simpler than what I suggested, although the result is effectively the same. –  iglvzx Jan 17 '12 at 18:32
    
hmm looks like it's not possible, so I might consider changing IDE's as this is a pretty big issue for me at the moment –  Spoonface Jan 19 '12 at 11:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.