NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
"Find declaration" function changed?? -> makes


Joined: 03 Jun 2008
Posts: 76
Location: Bavaria, Germany
Reply with quote
Hi there,

is it just me or did the 'find declaration' (Shift F12) change at some build (using build 14024 right now)?

Former behavior was, that when cursor was standing on a variable (e.g. $somevar in file1.php) and hitting Shift+F12, PhpED was looking for the declaration in workspace:

file1.php
Code:
echo $somevar

-> config-file.php
Code:
$somevar = "somevalue"



New behavior is, that you´re getting a list of files, where $somevar is used, but not where it´s declared Confused

For that i could use 'find usage' (Ctrl F7)

Would like to have back the old behaviour Rolling Eyes


greets


Last edited by bitseeker on Fri Jul 11, 2014 2:08 am; edited 1 time in total
View user's profileFind all posts by bitseekerSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
I'm using a beta version 14 and whilst Find Declaration from the popup menu works (the way I normally use it) if I press shift+F12 then PhpED crashes.

Pressing shift+F12 even without a file/project open still crashes my PhpED, even if just after starting it and sitting at the startup project list page. I'll check with the latest beta and if still crashing then I'll report it as a bug.

According to my PhpED settings for IDE shortcuts, shift+F12 should do Find Declaration.

Does the popup menu work for you as a temporary solution?
View user's profileFind all posts by plugnplaySend private message


Joined: 03 Jun 2008
Posts: 76
Location: Bavaria, Germany
Reply with quote
@plugnplay
using shift+F12 works fine - no crashes - neither in build 14024 nor in newest build 14029, which i just installed. Runnin Win7 Pro x64 using x64 version of PhpED.

Quote:
Does the popup menu work for you as a temporary solution?


Popup makes no sense to me, when a list of files is shown, where the variable is found, but not declared.
My variable is declared in ONE file (config.inc.php), but i get a list of all files (including config.inc.php), where e.g. $butt_top_img is echoed.
I expect the old behavior, where Editor jumps directly in the config.inc.php file and sets cursor on this particular line.

Hope this can be fixed soon ...

greets
View user's profileFind all posts by bitseekerSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
Sorry, I meant the popup context menu that you see when you right-click the variable name; there should be a Find Declaration option at the top of that menu.
View user's profileFind all posts by plugnplaySend private message


Joined: 03 Jun 2008
Posts: 76
Location: Bavaria, Germany
Reply with quote
@plugnplay
- popup context menu - no crashes
- menubar Search>Find Declaration - no crashes
- shift+F12 - no crashes
View user's profileFind all posts by bitseekerSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
PHP has no such thing as "point where variable is declared"
and indeed, current version shows all points where the variable is used, instead of previous versions that showed an arbitrary place among them.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Jun 2008
Posts: 76
Location: Bavaria, Germany
Reply with quote
@dmitri
ahh - ok, that makes sense. Thanks for clearing this up. Idea
View user's profileFind all posts by bitseekerSend private message
Find declaration weird behavior


Joined: 31 Oct 2012
Posts: 16
Location: Canada
Reply with quote
"Find declaration" functionality, from right click, works great on php files.
Popup opens with a choice of files where it is either declare or use.

When you do it on a javascript files, it doesn't work.

It doesn't show any popup, and it directly opens the file where the variable or function was
declared, the first time...

As an example, I have a function "myFunct" which can be found in common.js
the last version of common.js, which is currently open in the IDE, also have older versions
in "_archives" directory and since myFunct was declared in the first version of common.js,
the IDE will open "_archives/version1/common.js".

Since the last version of the file is open, it would be wise to select this one, or at least,
to show the popup with all available choice of files...

Any thoughts on that?
View user's profileFind all posts by fledSend private message
"Find declaration" function changed?? -> makes
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic