Reporter |
|
---|---|
Created | Aug 11, 2015 1:35:01 AM |
Updated | Aug 12, 2015 11:45:27 AM |
Assignee | Alexander Shvedov (shvedov) |
Priority | Normal |
State | Submitted |
Type | Bug |
Target Wave | wave04 |
Fixed In Wave | Undefined |
Affected Wave | No affected wave |
Subsystem | Code Style |
Fix versions | No Fix versions |
Affected versions | 9.2, 9.1.2 |
Fixed in builds | No Fixed in build |
VsVersion | VS 2013 RTM |
When using completion in C#, ReSharper will not insert this. or static member qualifiers into the generated code, even though I have both options set to "everything" in code (Notify with is set to "warning"). After generating the code, ReSharper will correctly underline the code and tell me that the qualifier is missing.
The Arranging Optional Member Qualifiers help page states that:
It seems this is not the case.
Current behavior:
Expected behavior:
ReSharper options:
Code Editing > C# > Code Style:
Instance members qualification: | Warning
Use "this." qualifier for: Field, Property, Event, Method | Warning
Qualify members declared in: Same class, base class | Warning
Static members qualification | Warning
Qualify with the name of: Declared-in type | Warning
Members to qualify: Field, Property, Event, Method | Warning
The Arranging Optional Member Qualifiers help page states that:
ReSharper helps you add or remove optional member qualifiers in the existing code and applies your preferences when it produces new code with code completion and code generation features, applies code templates and performs refactorings.
It seems this is not the case.
Current behavior:
public class TestClass
{
private string GetString() { return "this is a string"; }
private void Process(string str) { /* do something with string */ }
public void Test() {
this.Process(… // (smart) completion inserts GetString()
}
}
Expected behavior:
public class TestClass
{
private string GetString() { return "this is a string"; }
private void Process(string str) { /* do something with string */ }
public void Test() {
this.Process(… // (smart) completion inserts this.GetString()
}
}
ReSharper options:
Code Editing > C# > Code Style:
Instance members qualification: | Warning
Use "this." qualifier for: Field, Property, Event, Method | Warning
Qualify members declared in: Same class, base class | Warning
Static members qualification | Warning
Qualify with the name of: Declared-in type | Warning
Members to qualify: Field, Property, Event, Method | Warning