NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
PHP class namespaces in tab titles


Joined: 30 Jun 2009
Posts: 79
Reply with quote
I'd really love to see class namespaces displayed instead of PHP file names in the tabs (of course, when the tab contains just one class AND it is namespaced).

I could have 100 "Abstract.php" files in my project. Seeing that in tab names does not help me much.

Alternatively, class name (namespaced or not) could be displayed on hover.

Thoughts?

Thx,
Temuri
View user's profileFind all posts by temuriSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
With what you suggested, there are some problems. Namespaces may exist in php files only and phped is aware of namespaces only after the file is parsed and may not be known at the time you open the file (the time where the IDE makes decision what to show in the tab)

Why not to have directories following the namespace names?

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


Joined: 30 Jun 2009
Posts: 79
Reply with quote
dmitri,

I understand the problem. Well, even if you prefix file names with directory that would be much better than what we have. The only question is - how many dirs up are you gonna show?

How about this:

What if you added another tab which lists all open files and displays full class names & paths? Maybe you could expand existing CTRL+TAB popup and add class names there?

I often have up to twenty files open at the same time and finding the right tab is always a problem. Solving this would make PHPEd much better software.

Thanks,
Temuri
View user's profileFind all posts by temuriSend private message


Joined: 30 Jun 2009
Posts: 79
Reply with quote
I was looking at existing CTRL+TAB popu panel. What if instead of omitting the middle part of the path and replacing it with "..." you'd replace the START of the path, which is common for all scripts of the project? That way you will see filename preceded by a couple of directories up, unabridged. And instead of filenames you'd display containing PHP class name (namespaced or not, and the topmost if more than one class is found in a file).

Thoughts?

Thanks.
View user's profileFind all posts by temuriSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Sorry, this can hardly be changed. That's how FilenameShorten() works. Alternative to it is StringShorten() which would cut from the end -- which is even worse for your case. Regarding filenames, it's unclear from the function perspectives what part of filename is meaningful for the user. Sometimes, it's important to see the beginning and the end. Sometimes only the end. If we change the logic, it will affect all parts where filenames are displayed, like for example log and search results.
Perhaps we'd better allow to make the window wider a bit so you'll see the name a bit more complete.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
PHP class namespaces in tab titles
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