Several problems

1. Highlighting eror:

this.MyTextBox.MouseDown += new MouseEventHandler(MyTextBox_MouseDown);

Wrong highlight for "MyTextBox_MouseDown". It says "Use of method
MyTextBox_MouseDown without ()". Compiler says everything is ok.

2. If one of two projects (library) uses System.Windows.Forms assembly from
the .NET 1.0 and the main project uses System.Windows.Forms assembly from
the .NET 1.1, there are many error highlights (mostly about enums assignment
in InitializeComponent method), even if the code is completely compilable. I
cannot switch library from .NET 1.0 to 1.1 to solve this problem because of
library project requirements.

3. Is it OK, that code completion says "Constant" about enums?

4. Why smart code completion for enums is broken? It was very useful.
TextBox.TextAlign property, for example, doesn't offer me values from
System.Windows.Forms.HorizontalAlignment.* and so on.

Problems tested with the build 105.

BTW, thanks for delay for large files problem solved! Now it's works much
better :)

WBR, Andrey


3 comments
Comment actions Permalink

1. Highlighting eror:

this.MyTextBox.MouseDown += new
MouseEventHandler(MyTextBox_MouseDown);

Wrong highlight for "MyTextBox_MouseDown". It says "Use of method
MyTextBox_MouseDown without ()". Compiler says everything is ok.


I could not reproduce this. It seems to be a pretty standard coding pattern and we use it ourself widely. No errors are highlighted of course. Could you please send a sample file on which it is reproduced?


2. If one of two projects (library) uses System.Windows.Forms assembly
from the .NET 1.0 and the main project uses System.Windows.Forms
assembly from the .NET 1.1, there are many error highlights (mostly
about enums assignment in InitializeComponent method), even if the
code is completely compilable. I cannot switch library from .NET 1.0
to 1.1 to solve this problem because of library project requirements.


It's a known problem. We will fix it in the next version.


3. Is it OK, that code completion says "Constant" about enums?


You probably mean enum members, not enums. Do you think "enum member" would be a better term?


4. Why smart code completion for enums is broken? It was very useful.
TextBox.TextAlign property, for example, doesn't offer me values from
System.Windows.Forms.HorizontalAlignment.* and so on.


I could not reproduce this. I typed

TextBox box;
box.TextAlign =

And pressed Ctrl-Shift-Space. HorizontalAlignment members are suggested.

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


1. Highlighting eror:

this.MyTextBox.MouseDown += new
MouseEventHandler(MyTextBox_MouseDown);

Wrong highlight for "MyTextBox_MouseDown". It says "Use of method
MyTextBox_MouseDown without ()". Compiler says everything is ok.

2. If one of two projects (library) uses System.Windows.Forms assembly
from the .NET 1.0 and the main project uses System.Windows.Forms
assembly from the .NET 1.1, there are many error highlights (mostly
about enums assignment in InitializeComponent method), even if the
code is completely compilable. I cannot switch library from .NET 1.0
to 1.1 to solve this problem because of library project requirements.

3. Is it OK, that code completion says "Constant" about enums?

4. Why smart code completion for enums is broken? It was very useful.
TextBox.TextAlign property, for example, doesn't offer me values from
System.Windows.Forms.HorizontalAlignment.* and so on.

Problems tested with the build 105.

BTW, thanks for delay for large files problem solved! Now it's works
much better :)

WBR, Andrey


0
Comment actions Permalink


"Valentin Kipiatkov" <valentin@intellij.com> wrote in message
news:cg4r44$1i0$1@is.intellij.net...
>> 1. Highlighting eror:
>>
>> this.MyTextBox.MouseDown += new
>> MouseEventHandler(MyTextBox_MouseDown);
>>
>> Wrong highlight for "MyTextBox_MouseDown". It says "Use of method
>> MyTextBox_MouseDown without ()". Compiler says everything is ok.
>

I could not reproduce this. It seems to be a pretty standard coding
pattern and we use it ourself widely. No errors are highlighted of course.
Could you please send a sample file on which it is reproduced?


I know it's usually OK. MouseDown event is the only one I have that is
highlighted as an error. I've checked again. Just create a new Form, add a
Button to it and assign a handler to it like this:

this.button1.MouseDown += new MouseEventHandler(button1_MouseDown);
and you'll see the problem.


>> 3. Is it OK, that code completion says "Constant" about enums?
>

You probably mean enum members, not enums. Do you think "enum member"
would be a better term?


Sorry, enum members of course. Now I understand the problem ;) "Enum member"
or "Enum entry" (shorter a bit) will be OK, I think.

>>
>> 4. Why smart code completion for enums is broken? It was very useful.
>> TextBox.TextAlign property, for example, doesn't offer me values from
>> System.Windows.Forms.HorizontalAlignment.* and so on.
>

I could not reproduce this. I typed

>

TextBox box;
box.TextAlign =

>

And pressed Ctrl-Shift-Space. HorizontalAlignment members are suggested.


I've checked it once more and still can see the problem. I got
textBox1.TextAlign = RtlTranslateAlignment();

Sometimes for other properties it was something like widget.Property =
System_Windows_Forms1

(yes, with underscores instead of dots and "1" instead of enum/class name),
but I'm not sure what build it was.

My VS version: 7.1.3088

Resharper version: build 105

WBR, Andrey


0
Comment actions Permalink

I know it's usually OK. MouseDown event is the only one I have that is
highlighted as an error. I've checked again. Just create a new Form,
add a Button to it and assign a handler to it like this:

this.button1.MouseDown += new MouseEventHandler(button1_MouseDown);
and you'll see the problem.


I still could not reproduce the problem. My code looks like this:

private System.Windows.Forms.Button button1;

public Form1()
{
InitializeComponent();

this.button1.MouseDown += new MouseEventHandler(button1_MouseDown);
}

private void button1_MouseDown(object sender, MouseEventArgs e)
{
throw new NotImplementedException();
}

No errors highlighted.

Sorry, enum members of course. Now I understand the problem ;) "Enum
member" or "Enum entry" (shorter a bit) will be OK, I think.


Ok, we will change that.

I've checked it once more and still can see the problem. I got
textBox1.TextAlign = RtlTranslateAlignment();

Sometimes for other properties it was something like widget.Property =
System_Windows_Forms1

(yes, with underscores instead of dots and "1" instead of enum/class
name), but I'm not sure what build it was.



Very strange. No ideas what can be the reason.

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


"Valentin Kipiatkov" <valentin@intellij.com> wrote in message
news:cg4r44$1i0$1@is.intellij.net...

>>> 1. Highlighting eror:
>>>
>>> this.MyTextBox.MouseDown += new
>>> MouseEventHandler(MyTextBox_MouseDown);
>>> Wrong highlight for "MyTextBox_MouseDown". It says "Use of method
>>> MyTextBox_MouseDown without ()". Compiler says everything is ok.
>>>
>> I could not reproduce this. It seems to be a pretty standard coding
>> pattern and we use it ourself widely. No errors are highlighted of
>> course. Could you please send a sample file on which it is
>> reproduced?
>>

I know it's usually OK. MouseDown event is the only one I have that is
highlighted as an error. I've checked again. Just create a new Form,
add a Button to it and assign a handler to it like this:

this.button1.MouseDown += new MouseEventHandler(button1_MouseDown);
and you'll see the problem.

>>> 3. Is it OK, that code completion says "Constant" about enums?
>>>
>> You probably mean enum members, not enums. Do you think "enum member"
>> would be a better term?
>>

Sorry, enum members of course. Now I understand the problem ;) "Enum
member" or "Enum entry" (shorter a bit) will be OK, I think.

>>> 4. Why smart code completion for enums is broken? It was very
>>> useful. TextBox.TextAlign property, for example, doesn't offer me
>>> values from System.Windows.Forms.HorizontalAlignment.* and so on.
>>>
>> I could not reproduce this. I typed
>>
>> TextBox box;
>> box.TextAlign =
>> And pressed Ctrl-Shift-Space. HorizontalAlignment members are
>> suggested.
>>

I've checked it once more and still can see the problem. I got
textBox1.TextAlign = RtlTranslateAlignment();

Sometimes for other properties it was something like widget.Property =
System_Windows_Forms1

(yes, with underscores instead of dots and "1" instead of enum/class
name), but I'm not sure what build it was.

My VS version: 7.1.3088

Resharper version: build 105

WBR, Andrey


0

Please sign in to leave a comment.