|
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. |
||||||||||||||
|
Guru master
|
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
|
||||||||||||
|
|
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. |
||||||||||||
|
Guru master
|
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. |
||||||||||||
|
Re: Suggestions |
Site Admin
|
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 |
|
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. |
||||||||||||||
|
|
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.
|
||||||||||||
|
|
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, |
||||||||||||
|
|
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 |
||||||||||||
|
|
The most curious thing is another thing - it HAS the index already . 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. |
||||||||||||||
|
|
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. |
||||||||||||
|
Suggestions |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by