Hitting Enter key in a XML Comment
I am getting an odd behavior with ReSharper 2.0 (build 203) with Visual Studio
2003. When I am editing an XML comment for a C# method and I hit the enter
key the editor starts the new line with a "*" instead of the normal "///".
Example:
///
/// Typing some comment text and then hit the enter key here...
///
///
///
private bool exampleMethod(String exampleParameter)
{
becomes this:
///
/// Typing some comment text and then hit the enter key here...
/// /// /// private bool exampleMethod(String exampleParameter) { } instead of this: ///
private bool exampleMethod(String exampleParameter)
{
}
This did not happen with ReSharper 1.3. I submitted a request into the tracker
for this but it was marked as not repeatable. Is this happening for anybody
else?
Please sign in to leave a comment.
I've marked this request as unrepeatable because it couldn't be reproduced
at any of our computers, both at VS2003 and VS2005.
If this behavour could be reproduced by anybody else, please let us know.
BTW, do you have any other VS addins installed on you computer?
--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
On Tue, 09 Aug 2005 17:51:34 +0300, Eugene Pasynkov (JetBrains)
<Eugene.Pasynkov@jetbrains.com> wrote:
>
>> I submitted a request into the tracker for this but it was marked as not
>> repeatable.
>
>
>
Not Reproduced build 203 on vs2003
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
The only add-ons that I have currently enabled right now is ReSharper 2.0.
The disabled ones include: "Code]]> For Visual Sudio .NET", "RegionsAddIn"
and "Control Outline Powertoy". Also for some reason in addition to the
enabled "ReSharper 2.0.203.88" add-in, I have a disabled "Resharper" (no
version number) listed.
I did some testing and I have some more information for you. First of all
this appears to happen in code-behind classes for ASP.NET web pages ("SomePage.aspx.cs").
In stand-alone class files ("SomeClass.cs") when I hit the enter key in
an XML comment it works as expected (starting the new line with "///"), however
I also noticed that in the stand-alone class files if I hit the enter key
while editing a C# multiline comment (/.../) it does not start the new
line with an asterisk. It just enters the new line and places the input
caret at the first character position:
/* Typing some comment text and then hit the enter key here...
*/
becomes this:
/* Typing some comment text and then hit the enter key here...
*/
instead of this:
/* Typing some comment text and then hit the enter key here...
*/
However when I am editing the code-behind class file for a web page and hit
enter on a C# multiline comment it works as expected.
So in summary: For .aspx.cs files enter in an XML comment does not work but
enter in a C# multiline comment does. For .cs files enter in an XML comment
does work, but enter in a C# multiline comment does not.
Thanks,
Cody
>> I submitted a request into the tracker for this but it was marked as
>> not repeatable.
>>
Thank you for the detailed clarification.
I will continue on investigating this problem
--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Cody" <ctownwest@msn.com> wrote in message
news:fb5379d269498c76ae954711e70@news.jetbrains.com...
>
>
>
>
>
>
>
>>> I submitted a request into the tracker for this but it was marked as
>>> not repeatable.
>>>
>> I've marked this request as unrepeatable because it couldn't be
>> reproduced
>> at any of our computers, both at VS2003 and VS2005.
>> If this behavour could be reproduced by anybody else, please let us
>> know.
>> BTW, do you have any other VS addins installed on you computer?
>>
>
Hello Cody,
I get the problem with the
/* Comment:X
*/
becoming
/*
X
*/
where X shows the cursor position.
BUT:
The /// comments work fine!
>>> I submitted a request into the tracker for this but it was marked as
>>> not repeatable.
>>>
>> I've marked this request as unrepeatable because it couldn't be
>> reproduced
>> at any of our computers, both at VS2003 and VS2005.
>> If this behavour could be reproduced by anybody else, please let us
>> know.
>> BTW, do you have any other VS addins installed on you computer?
And that was in a regular class file (not an ASP.NET code-behind class file)?
>> The only add-ons that I have currently enabled right now is ReSharper
>> 2.0.
>> The disabled ones include: "Code For Visual Sudio .NET", >> "RegionsAddIn" >> and "Control Outline Powertoy". Also for some reason in addition to >> the >> enabled "ReSharper 2.0.203.88" add-in, I have a disabled "Resharper" >> (no version number) listed. >> I did some testing and I have some more information for you. First >> of >> all >> this appears to happen in code-behind classes for ASP.NET web pages >> ("SomePage.aspx.cs"). >> In stand-alone class files ("SomeClass.cs") when I hit the enter key >> in >> an XML comment it works as expected (starting the new line with >> "///"), however >> I also noticed that in the stand-alone class files if I hit the enter >> key >>]]> while editing a C# multiline comment (/.../) it does not start the
>> new
>> line with an asterisk. It just enters the new line and places the
>> input
>> caret at the first character position:
>> /* Typing some comment text and then hit the enter key here...
>> */
>> becomes this:
>> /* Typing some comment text and then hit the enter key here...
>> */
>> instead of this:
>> /* Typing some comment text and then hit the enter key here...
>> *
>> */
>> However when I am editing the code-behind class file for a web page
>> and hit enter on a C# multiline comment it works as expected.
>> So in summary: For .aspx.cs files enter in an XML comment does not
>> work but enter in a C# multiline comment does. For .cs files enter
>> in an XML comment does work, but enter in a C# multiline comment does
>> not.
>>
>> Thanks,
>> Cody
>>>> I submitted a request into the tracker for this but it was marked
>>>> as not repeatable.
>>>>
>>> I've marked this request as unrepeatable because it couldn't be
>>> reproduced
>>> at any of our computers, both at VS2003 and VS2005.
>>> If this behavour could be reproduced by anybody else, please let us
>>> know.
>>> BTW, do you have any other VS addins installed on you computer?
Hello Cody,
Correct
>> Hello Cody,
>>
>> I get the problem with the
>> /* Comment:X
>> */
>> becoming
>> /*
>> X
]]>
I get the exact same behavior as Cody. It is with build 203 in 2003. I have a fresh install of VS and ReSharper is the only add-in.
I am getting the behavior in all class library files. I have not been doing any Asp.Net work recently, so I don't know if it would happen in CodeBehinds.
I also submitted a tracker that was marked as duplicate.
Just installed build 205 and tested this and from what I have seen so far
hitting Enter in an XML comment works fine in both .cs and aspx.cs files
now, however Enter in a C# multi-line comment does NOT work in either.
Thanks,
Cody
FYI ReSharper team, the issue with C# multi-line comments is still not working
in build 213.
Thanks,
Cody
>> Thank you for the detailed clarification.
>> I will continue on investigating this problem
What do you mean by issue with C# multi-line comments? Is it Visual Studio's
feature?
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
>> Just installed build 205 and tested this and from what I have seen so
>> far hitting Enter in an XML comment works fine in both .cs and
>> aspx.cs files now, however Enter in a C# multi-line comment does NOT
>> work in either.
>>
>> Thanks,
>> Cody
>>> Thank you for the detailed clarification.
>>> I will continue on investigating this problem
Hello Valentin,
What I mean is this. Enter the following mult-line comment into a .cs file
(the "|" indicates the current input caret position):
-
Code Example----
1 using System;
2
3 namespace ExampleApp
4 {
5 public class ExampleClass
6 {
7 public ExampleClass()
8 {
9 string testVar;
10
11 /*
12 * Example C# Multi-line comment|
13 */
14
15 string anotherTestVar;
16 }
17 }
18 }
-
Code Example----
With Visual Studio 2003 and ReSharper not installed (or disabled through
the Add-in manager), If I have the input focus at the "|" indicator above
and hit the enter key, VS enters a new line and automatically continues the
formatting of the comment by matching up the new lines indentation with the
previous lines and starting the line with an asterisk ("*") which is lined
up under the the asterisks on the previous line, as indicated here:
-
Code Example----
1 using System;
2
3 namespace ExampleApp
4 {
5 public class ExampleClass
6 {
7 public ExampleClass()
8 {
9 string testVar;
10
11 /*
12 * Example C# Multi-line comment
13 * |
14 */
15
16 string anotherTestVar;
17 }
18 }
19 }
-
Code Example----
With ReSharper 2.0 (Build 213) installed or enabled, if I do the same thing
I get this instead:
-
Code Example----
1 using System;
2
3 namespace ExampleApp
4 {
5 public class ExampleClass
6 {
7 public ExampleClass()
8 {
9 string testVar;
10
11 /*
12 * Example C# Multi-line comment
13 |
14 */
15
16 string anotherTestVar;
17 }
18 }
19 }
-
Code Example----
The new line (13) is entered but it is missing the asterisk and the input
caret is at column 1 instead of being indented to the same level as the previous
line. I have to then use the tab key to indent the line and then enter the
" * " manually.
Please let me know if you need anything else.
>> FYI ReSharper team, the issue with C# multi-line comments is still
>> not working in build 213.
>>
>> FYI ReSharper team, the issue with C# multi-line comments is still
>> not working in build 213.
>>
>> Thanks,
>> Cody
>>> Just installed build 205 and tested this and from what I have seen
>>> so far hitting Enter in an XML comment works fine in both .cs and
>>> aspx.cs files now, however Enter in a C# multi-line comment does NOT
>>> work in either.
>>>
>>> Thanks,
>>> Cody
>>>> Thank you for the detailed clarification.
>>>> I will continue on investigating this problem
Thanks, we'll fix it.
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
>>> FYI ReSharper team, the issue with C# multi-line comments is still
>>> not working in build 213.
>>>
>> What do you mean by issue with C# multi-line comments? Is it Visual
>> Studio's feature?
>>
>> Valentin Kipiatkov
>> Chief Scientist, Vice President of Product Development
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>>> FYI ReSharper team, the issue with C# multi-line comments is still
>>> not working in build 213.
>>>
>>> Thanks,
>>> Cody
>>>> Just installed build 205 and tested this and from what I have seen
>>>> so far hitting Enter in an XML comment works fine in both .cs and
>>>> aspx.cs files now, however Enter in a C# multi-line comment does
>>>> NOT work in either.
>>>>
>>>> Thanks,
>>>> Cody
>>>>> Thank you for the detailed clarification.
>>>>> I will continue on investigating this problem