2

How can I add comments in PHP eclipse? I'm trying by selecting few lines of code, then right click, On menu, "Source" and then I have tried all these options there "general element comment", "toggle comment", "Add block comment". None of them works. PS. I just downloaded latest eclipse PHP version.

sabba
  • 23
  • 1
  • 3

4 Answers4

2

Try Ctrl+Shift+/

The question is similair to How to comment a block in Eclipse?

Community
  • 1
  • 1
silex
  • 4,312
  • 4
  • 22
  • 27
  • It is strange, but neither Ctrl-Shift-/ nor Ctrl-/, both don't work in my Eclipse anymore. Although they did before some update. – akond May 25 '11 at 12:44
  • Hmm... So try to do this world better and send bugreport to Eclipse developers ;) – silex May 25 '11 at 12:51
  • It seems somebody already did that. Here is the solution: http://www.eclipse.org/forums/index.php?t=msg&goto=660274&S=89c1a463415c57c8bf9e4146b335f9e1 Worked like a charm. – akond May 25 '11 at 13:06
2

Why don't you just try adding /** + enter? It will produce something like

/**
 * Comment here
 */

Remember to follow the doc order

/**
 * Description
 * @param argument/parameter
 * @return
 */
0

It`s a bug in latest PHP eclipse. Fix is here.

gaRex
  • 4,144
  • 25
  • 37
0

I was using single line comments on my eclipse php project. When i uploaded it to server ,some obfuscation has been applied automatically.Hence all the line breaks are removed and it treating the whole program as a single line. so i am getting an END OF STATEMENT error on server.So its better to use /--/ instead of //---- while commenting.

Lavy John
  • 59
  • 7