Reformat Remove Redundant this. Does Not

Running version 213 on VS2005 and VS2003. Tested in both.

Code simular to the following does not have the "this." removed after reformating.

6 comments
Comment actions Permalink

I could not reproduce it. Is "Remove redundant this qualifier" checkbox checked
in the Reformat Code dialog?

Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Running version 213 on VS2005 and VS2003. Tested in both.

Code simular to the following does not have the "this." removed after
reformating.

 do {
> this.ultraProgressBar1.PerformStep();
> System.Threading.Thread.Sleep(10);
> } while( this.ultraProgressBar1.Value != 10000 );]]>



0
Comment actions Permalink

Yes. I have confirmed this behaviour on several different projects. Also had co-workers running 213 confirm.

0
Comment actions Permalink

Please could you provide a short example showing this problem?
I can't reproduce it

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"David Williams" <no_mail@jetbrains.com> wrote in message
news:31377091.1137161114611.JavaMail.itn@is.intellij.net...

Yes. I have confirmed this behaviour on several different projects. Also
had co-workers running 213 confirm.

>



0
Comment actions Permalink


In this function, when reformating (all checkboxes selected), the this.value.Visible and this.value.Enabled are not removed, but are still marked as redundant.

0
Comment actions Permalink

I put the code which you provided into an empty class, created field "value"
there and ran Reformat Code with all options checked. "this." are removed.
Doesn't work for you if you paste it into an empty class with only one field
"value"?

Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

 private void OnSelectedOperatorsIndexChange(object sender,
> EventArgs e) {
> if( operators.SelectedIndex < 1 ) {
> valueControl.Text = string.Empty;
> valueControl.Enabled = false;
> browse.Enabled = false;
> return;
> }
> OperatorItem item = (OperatorItem) operators.SelectedItem;
> 
> if( item.Operator != "blank" ) {
> CreateValueControl(item);
> }
> else {
> this.value.Visible = false;
> this.value.Enabled = false;
> }
> browse.Enabled = true;
> }
> ]]>

In this function, when reformating (all checkboxes selected), the
this.value.Visible and this.value.Enabled are not removed, but are
still marked as redundant.



0
Comment actions Permalink

I have not been able to duplicate outside of the main solution that we use. Somethings that might help: The solution contains some thing over 40 projects. This seems to appear only in classes that are code inherted from an usercontrol. Controls that inherit directly from UserControl or do not inherit from UserControl do not have the issue. The majority of classes were converted from VS2003.

I will take sometime this weekend and see if I can determine the direct set of conditions that cause this to happen.

0

Please sign in to leave a comment.