NuSphere Forums Forum Index
NuSphere Forums
Reply to topic

would you like this to?
It would be awsome
100%
 100%  [ 1 ]
i did not even know this option exists...
0%
 0%  [ 0 ]
Total Votes : 1

bether variable documentation


Joined: 14 Jan 2010
Posts: 11
Reply with quote
When you use a syntax like
Code:

/**
* some texts above a var
*/
$var blaBLA  = ....


later when you use that var it shows the tool tip WHICH IS AWESOME!!! but if o do it like this
Code:


// some texts above a var
$var_blabla  = ....


it duos not do a thing! QQ and this is really convenient!

I know you process the // comments to but for some reason it duos not proc when you use it for description because when i use // @todo:bla it works....

this could be really usfull i dont ahve time to make /** for every damn var.... it is just to long and hard to keep track in big classes..... i have aclass which has 700 lines without
/**
*
*/
comments it would have 1400 with it... and i really miss the functionality to make short comments....
View user's profileFind all posts by sangokuSend private message


Joined: 11 Apr 2010
Posts: 90
Location: Prague, Czech Republic
Reply with quote
Hi!

Perhaps you are not aware, that the /** ... */ is so called phpDoc syntax (note the two starting * asterisks). It is intended to separate function-related and variable-related comments and some minor in-comment functionalities (like what parameters a function use, what variable type it returns, etc.) from normal comments, which could be either multiline /* ... */ (note the one starting * asterisk) or in-line // ... (starting with two slashes). That's why it shows function or variable description as a tooltip, because the phpDoc syntax allows it. It would not be wise to display all comments, because in general they have no fixed inside syntax. I suggest you to google more information on phpDoc to understand it better, because the phpDoc will add some extra functionalities to the IDE and you can also easily generate documentation automatically with phpDoc tools, if the phpDoc is used properly.

The "parsing" of // @todo:bla comment is not really a parsing of the comment, but rather parsing of the whole file in search of special tags like @todo: and @fixme: - the fact that they are often used in comments might be confusing, but you can also put them in the phpDoc /** ... */ syntax.

And as for the code length because of the phpDoc comments, there is an option to collapse the comments by default when you open the file in Tools > Settings > Editor > Code Folding > Auto-collapse on open - check this option and you can select to collapse the comments when you open a file.
View user's profileFind all posts by fibizaSend private message
bether variable documentation
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