NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
On the very rare occasion I need to filter for specific file name(s) I do a Find in files, give it the filename and search for blank text. It then lists all the matching files so I can pick and choose what I want.
View user's profileFind all posts by plugnplaySend private message


Joined: 11 Sep 2012
Posts: 17
Location: Nottingham, UK
Reply with quote
plugnplay wrote:
On the very rare occasion I need to filter for specific file name(s) I do a Find in files, give it the filename and search for blank text. It then lists all the matching files so I can pick and choose what I want.


Well yes, there are plenty of ways it can be done, but the idea is to have it as a quick access thing (much like Eclipse). I've seen it asked for loads of times on here so I'm not the only one either.
View user's profileFind all posts by cemersonSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
I'm not saying it wouldn't be a nice feature, I would like something better myself. I'm just giving advice to people who read the forum and might not be aware of an alternative method Smile
View user's profileFind all posts by plugnplaySend private message


Joined: 11 May 2008
Posts: 78
Reply with quote
plugnplay, you seem to misunderstand the cemerson's idea and what the function in question does in other IDEs.
We don't want to filter by file names.
This function filters by symbol names declared/defined in files.
For example I want to open the file where the class ABCD was declared. The file might be named XYZ.php.
Also needless to say it should respect namespaces as well. For example I might have two XYZ.php files in the poject with class ABCD but in different namespaces (ns1, ns2). When I enter ns1\ABC, it should propose just the XYZ.php file with the ABCD class from the corresponding namespace.
There is no good alternative method for this. Navigating the workspace can be a nightmare for all but a small 5-pages hobby project.

When you ctrl+click on a symbol in the editor (for example on a class name) it opens the file that contains its declaration. So the IDE already has the prerequisites/database to allow for an easy implementation of this most-wanted feature.
View user's profileFind all posts by tedychSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
Maybe I have misunderstood, but having just re-read what cemerson wrote, he does appear to be referring to file search/filtering. I thought he was referring to the ability to for example click it at the root of the explorer tree and start typing a filename, which is finding rather than filtering. In response to a previous suggestion that I made, cemerson confirmed that I was thinking along the correct tracks.

Overall, there is no doubt that PhpED is behind in some of the features of other IDEs.
View user's profileFind all posts by plugnplaySend private message
Re: Suggestions
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
cemerson wrote:
It appears to me that all the 'Find Usage' does is a search for the identifier in question. I've just tried it on a private variable in a class, and it's found a load of variables with the same name in other classes which have nothing to do with this one! That clearly isn't the usage of the same thing.

You're still wrong here. Unlike Find dialog, it looks for identifiers in certain source context. With your example -- it's correct to find variables in other classes too but wouldn't be correct to find global or local variables with the same name. This happens because php is a highly dinamic language and it's not always possible to say if classA and classB have a common ancestor and therefore the variable is derived from it. Moreover it's not always possible detect the class the variable is taken from without running the code. Probably in a future version, we'll implement this feature a better way. Meanwhile we settled that it's safer to show all including potentially wrong occurences than miss some due to unknown/unresolved classes.

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


Joined: 11 Sep 2012
Posts: 17
Location: Nottingham, UK
Reply with quote
tedych wrote:
plugnplay, you seem to misunderstand the cemerson's idea and what the function in question does in other IDEs.
We don't want to filter by file names.
This function filters by symbol names declared/defined in files.
For example I want to open the file where the class ABCD was declared. The file might be named XYZ.php.
Also needless to say it should respect namespaces as well. For example I might have two XYZ.php files in the poject with class ABCD but in different namespaces (ns1, ns2). When I enter ns1\ABC, it should propose just the XYZ.php file with the ABCD class from the corresponding namespace.
There is no good alternative method for this. Navigating the workspace can be a nightmare for all but a small 5-pages hobby project.

When you ctrl+click on a symbol in the editor (for example on a class name) it opens the file that contains its declaration. So the IDE already has the prerequisites/database to allow for an easy implementation of this most-wanted feature.


No, it is filenames I was talking about, though your other idea sounds nice too. Basically, a copy of the 'Find Resource' dialog in Eclipse.
View user's profileFind all posts by cemersonSend private message


Joined: 11 Sep 2012
Posts: 17
Location: Nottingham, UK
Reply with quote
Another example of the 'Find Usage' not being too clever: I just tried it on a __construct method in a (eg) Product class. It came back with __construct methods for hundreds of unrelated objects, yet not a single '$var = new Product()' was found.
View user's profileFind all posts by cemersonSend private message


Joined: 09 Oct 2012
Posts: 2
Reply with quote
I have to agree that the abscence of the feature #1 is something like discouraging in order to adopt phpED. Just the folks that never used eclipse or an IDE with this feature cannot understand its importance. Very diffuclt to navigate needing to click 10 times on the tree browser or to wait minutes on a search... THe most curiosity thing is that it only need an index to the files to implement this feature...

I believe with this feature phpED would be my only choice for php projects.

Best Regards,
View user's profileFind all posts by bruno.arrudaSend private message


Joined: 09 Oct 2012
Posts: 2
Reply with quote
just to illustrate the feature there is a guy who posted it:
http://forum.nusphere.com/fast-file-search-similar-to-eclipse-ndash-open-resource-t8395.html
View user's profileFind all posts by bruno.arrudaSend private message


Joined: 11 May 2008
Posts: 78
Reply with quote
bruno.arruda wrote:
THe most curiosity thing is that it only need an index to the files to implement this feature...,

The most curious thing is another thing - it HAS the index already Smile . As I mentioned, when you Ctrl+Click on a symbol it already has this functionality. All it has to be done to implement the feature is a simple UI to this database.

I have another proposition for a feature.
MRU section (configurable) in the code completion windows. When I type for example $this->getRe, it shows tens of methods that start with getRe. In a current session/file I only use 2 or 3 of them and it is annoying to either type almost to the end of the method or choose with arrows the 9th method from the list. Other IDEs have a small 3 or 4 (or so) items section on top, separated from the rest with a dash with the most recently used "getRe" etc. methods, intelligently computed.
View user's profileFind all posts by tedychSend private message


Joined: 11 Sep 2012
Posts: 17
Location: Nottingham, UK
Reply with quote
The really annoying things about what is there currently:

- No keyboard shortcut to put your mouse in the box
- Doesn't filter the list as you type, so you can't easily see all matching files
- Difficult to see what has highlighted
- Occasionally hangs mid typing
- Even worse, after recovering from a hang (or search), the cursor is often put back in the editor, so if you carry on trying to type the search it comes out in the file you are editing!

Totally not fit for purpose as it is at the moment.
View user's profileFind all posts by cemersonSend private message
Suggestions
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 2 of 3  

  
  
 Reply to topic