Bug 247630 - Block comment: input // inner
Summary: Block comment: input // inner
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Roy Ganor CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-09-17 07:09 EDT by Anton Danilchenko CLA
Modified: 2020-05-14 11:07 EDT (History)
5 users (show)

See Also:
ganoro: iplog+


Attachments
pactch solving the problem with slash typing in block comment (3.04 KB, patch)
2009-01-20 09:13 EST, Vadim Punski CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Danilchenko CLA 2008-09-17 07:09:06 EDT
1. Type clock comment:

/**
 *Result text.
 */
 
2. Set mouse pointer after "text." and press ENTER key. In new line type text "//". Slash be delete space and add to "*" character. This is bug!
Comment 1 Anton Danilchenko CLA 2008-09-17 11:53:03 EDT
I have this

/**
 * Result text.
 * // test (with spase before)
 */

Actual result
/**
 * Result text.
 *// test (without spase before)
 */
Comment 2 Anton Danilchenko CLA 2008-11-04 05:08:41 EST
Please, fix this bug.
Comment 3 Vadim Punski CLA 2009-01-19 06:36:54 EST
Hi,
From the PHP Docs,
http://www.php.net/manual/en/language.basic-syntax.comments.php

… Make sure you don't nest 'C' style comments…(!!!)

JDT behavior is absolutely the same about nested java comments.

Seems like not a bug ...
Comment 4 Roy Ganor CLA 2009-01-19 07:24:40 EST
seems like not a bug, per Vadim's comment
Comment 5 Toshihiro Izumi CLA 2009-01-19 08:05:49 EST
If we want to type like as
|/*
| * /foo/bar
| */
we have to type "/",left-arrow,space,right-arrow,"f","o","o"...
Don't ask me why "/foo/bar". We can describe ANY strings in comment.
IMO, automatic-closing-comment-block functionality[*] should not be applied inside the closed comment block at least. Even though JDT do it.

* org.eclipse.php.internal.ui.autoEdit.PhpDocAutoIndentStrategy.indentAfterCommentEnd(IDocument, DocumentCommand)
Comment 6 Vadim Punski CLA 2009-01-20 09:13:44 EST
Created attachment 123078 [details]
pactch solving the problem with slash typing in block comment 

I've created the patch that solves this issue.
It's possible to type slashes in the body of the comment block.
In case slash typed in a last line of not closed comment block, it will be translated to comment block closing by deleting the space, as it was before.

Initial state:
/*
 *
 * |  //< pressing "/" at |

Result:
/*
 *
 */
Comment 7 Roy Ganor CLA 2009-01-21 10:02:38 EST
fixed in HEAD (2.1)

Comment 8 Gadi Goldbarg CLA 2009-02-04 06:45:05 EST
Not a bug.
Fixed accordingly to Vadim's patch.
pdt-all-in-one
2.1.0M4
N20090203

Kalin Yanev 
kalin.a@zend.com