NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
PHPdoc feature (bug?) and fast Run to cursor


Joined: 15 Aug 2006
Posts: 21
Reply with quote
PHPEd is wonderful product. This features may make it even better Smile

1) PHPdoc should look like this

Code:
/**
 * @desc
 */


but when I type /**, I get this (without spaces):

Code:
/**
* @desc
*/


(and what about code completion for PHPdoc, popup with @desc, @param, @author,... and help)

2) Run to cursor (F4) command is available only in debug mode. If I want to start debuging from current line, I must press F9, than focus moves to the first line, so I must find the "current" line (or file) and press F4. Sure, it is possible to mark the line as breakpoint (F5) and press F9 & F9, but single F4 is better, isn't it?

3) Possibility to change hidden characters color (or/and style, see Aptana). Gray or silver may be better.
View user's profileFind all posts by dgxSend private messageVisit poster's website


Joined: 08 Mar 2006
Posts: 63
Reply with quote
Seconded. Actually, what you get now is
Code:
/**
*@desc
*/
with no spaces whatsoever.

Please change this to a properly aligned comment.

Since peoples expectations for how the completion should work varies a lot, I think it is best to let them implement it themselves with templates and macros. I am using a PHP program to auto generate a suitable Doc comment from the selected class or function definition. Given this
Code:
function smarty_function_readit($params, &$smarty)
for instance, it would generate this comment
Code:
/**
 * Comment
 * @param $params [type] Description
 * @param &$smarty [type] Description
 */
where you then fill in the blanks. The code for this is available in a previous thread somewhere.
View user's profileFind all posts by svenaxSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
2) Run to cursor (F4) command is available only in debug mode. If I want to start debuging from current line, I must press F9, than focus moves to the first line, so I must find the "current" line (or file) and press F4. Sure, it is possible to mark the line as breakpoint (F5) and press F9 & F9, but single F4 is better, isn't it?


right, but what if you need to start debugging in file b.php and main file is a.php which includes b.php?
If F4 was enabled, you would be confused by the IDE which would certainly run b.php as a main file Smile

Quote:
3) Possibility to change hidden characters color (or/and style, see Aptana). Gray or silver may be better

they are colored as White Space/foreground color, actually. So you can change it.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 15 Aug 2006
Posts: 21
Reply with quote
ddmitrie wrote:
right, but what if you need to start debugging in file b.php and main file is a.php which includes b.php?
If F4 was enabled, you would be confused by the IDE which would certainly run b.php as a main file Smile


Why run b.php? Run main file and goto to current line in b.php. PHPed is written in Borland IDE, right? Try this behaviour there - put cursor on any line in any file and press F4.

Quote:
they are colored as White Space/foreground color, actually. So you can change it.


Thank you!
View user's profileFind all posts by dgxSend private messageVisit poster's website
Re: PHPdoc feature (bug?) and fast Run to cursor


Joined: 09 Jul 2006
Posts: 15
Reply with quote
dgx wrote:

2) Run to cursor (F4) command is available ......


add one more line where you want to stop:
debugbreak();
this solves your problem. this is the most powerful function for me, always works.

regards.
View user's profileFind all posts by ppvSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
Why run b.php? Run main file and goto to current line in b.php. PHPed is written in Borland IDE, right? Try this behaviour there - put cursor on any line in any file and press F4

If it was C, we would look for main() function and run it Smile, but it's php and it's unknown what to run.

Quote:
add one more line where you want to stop:
debugbreak();
this solves your problem

Right, but F4 has one little advantage - you don't need to modify code. By modifying code you add just two problems Smile
a) you may forget and push a file with this call into production server b) if you debug on a production or development server (it happens sometimes), such calls may interfere with clients or other developers respectively.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 15 Aug 2006
Posts: 21
Reply with quote
ddmitrie wrote:

If it was C, we would look for main() function and run it Smile, but it's php and it's unknown what to run.


Probably you don't understand me. The requested feature is: to act [F4] exactly like sequence [F9] + [F4], when debugging is off. Pressing [F9] & [F4] is unconfortable due one problem: after pressing [F9] I lost focus so I must scroll window (very annoying) or select previous tab by Ctrl-TAB (when default file is defined). That's all.
View user's profileFind all posts by dgxSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Sorry if I didn't make it clear enough before.

With F9 + F4 sequence you normally do the following:
Run file A.php (say it's the main file) then open file B.php, scroll to the line of interest and press F4.
How would IDE do everything for you at once?

Say, I've enabled F4 when debugger is not started. You open B.php, scroll to the line, press F4 and
for sure IDE will start B.php instead of A.php.

Is it a bit clearer example?
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 15 Aug 2006
Posts: 21
Reply with quote
ddmitrie wrote:

Say, I've enabled F4 when debugger is not started. You open B.php, scroll to the line, press F4 and
for sure IDE will start B.php instead of A.php.


Yes, it's exactly what I except. When I press F4 on B.php and default file of project is not defined, IDE should start debuging file B.php. That's right. If I'd like to start with A.php, I must use F9 or define defalt project's file.

But there is big advantage. When I am debuggin only one file (1) or project with defined default file (2), I don't have to find losted "current" line (1) or current tab (2) every time I press F9.
View user's profileFind all posts by dgxSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
okay. I agreed Smile
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Re: PHPdoc feature (bug?) and fast Run to cursor


Joined: 02 Aug 2006
Posts: 5
Reply with quote
dgx wrote:
PHPEd is wonderful product. This features may make it even better Smile

1) PHPdoc should look like this

Code:
/**
 * @desc
 */


but when I type /**, I get this (without spaces):

Code:
/**
* @desc
*/


(and what about code completion for PHPdoc, popup with @desc, @param, @author,... and help)


It will be nice to fix this Smile

Thanks.
View user's profileFind all posts by ixolabsSend private message
PHPdoc feature (bug?) and fast Run to cursor
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