Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all 106942 articles
Browse latest View live

RSRP-254671: Context Action to change string format (convert case)

$
0
0
Reporter Alex Berezoutsky (fergard) Alex Berezoutsky (fergard)
Created Apr 11, 2011 4:41:38 PM
Updated Oct 16, 2018 5:04:35 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 5.1.3, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
I would like to select quoted strings and identifiers in Visual Studio and be able to right-click, changeCase:
ToPascal
toCamel
TOUPPER
tolower
To Word Separated (not for identifiers)
To_Underscore_Separated

RSRP-256212: Ability to swap casting operator and 'as'

$
0
0
Reporter Phi Le (Phi.Le) Phi Le (Phi.Le)
Created Apr 14, 2011 2:20:24 AM
Updated Oct 16, 2018 5:06:21 PM
Resolved Oct 16, 2018 5:06:21 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Fixed
Type Feature
Fix version Unidentified prior version
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
MyClass myObj= (MyClass) obj;

to

MyClass myObj= obj as MyClass;

and vice versa.

RSRP-256411: When implementing interface, generated code should respect code annotations

$
0
0
Reporter Vitaliy K (shatl2) Vitaliy K (shatl2)
Created Apr 14, 2011 3:58:51 PM
Updated Oct 16, 2018 5:08:16 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
For ex., given interface with annotations.

    public interface IModelValidator
{
ModelStateDictionary Validate([NotNull] object context, [NotNull] ModelStateDictionary modelState);
}

Code generated with Create derived class and Implement members should look like this

    class ModelValidator : IModelValidator
{
public ModelStateDictionary Validate([NotNull] object context, [NotNull] ModelStateDictionary modelState)
{
if (context == null)
throw new ArgumentNullException("context");
if (modelState == null)
throw new ArgumentNullException("modelState");
throw new NotImplementedException();
}
}

not like
    class ModelValidator : IModelValidator
{
public ModelStateDictionary Validate(object context, ModelStateDictionary modelState)
{
throw new NotImplementedException();
}
}

RSRP-258857: Context Action for String.Compare

$
0
0
Reporter Alex Berezoutsky (fergard) Alex Berezoutsky (fergard)
Created Apr 22, 2011 6:45:08 PM
Updated Oct 16, 2018 5:12:02 PM
Resolved Oct 16, 2018 5:12:01 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Fixed
Type Feature
Fix version Unidentified prior version
Affected versions 5.1.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
I recently found a code written as: "roleName.ToLowerInvariant() == cr.Name.ToLowerInvariant()"
I think you could add a new refactor option which converts that kind of code to something like "string.Compare(roleName, cr.Name, StringComparison.OrdinalIgnoreCase)" or "string.Compare(roleName, cr.Name, true)", which would have the same result, but in a more correct way.

RSRP-260251: Context action "Iterate collection via foreach" is not enabled for important use cases

$
0
0
Reporter Dmitry Osinovsky (Dmitry.Osinovsky) Dmitry Osinovsky (Dmitry.Osinovsky)
Created Apr 28, 2011 4:07:04 PM
Updated Oct 16, 2018 5:17:05 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
1. For constructors like
 new List<string> {"dsddssd", "jhkjh"}{caret} 
2. For single variables, like this (because they are red?):
var list = new List<string> {"dsddssd", "jhkjh"};
list{caret}

RSRP-262331: [VB] 'Split into separate declarations' works wrong

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created May 7, 2011 2:41:56 AM
Updated Oct 16, 2018 5:19:31 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Module M
Sub Main()
Dim a = Sub() If True Then Dim x, y
End Sub
End Module

Invoke 'Split into separate declarations' at 'Dim x, y'. Actual result:

Module M
Sub Main()
Dim a = Sub() If True Then Dim x Dim y
End Sub
End Module

Expected:

Module M
Sub Main()
Dim a = Sub() If True Then Dim x : Dim y
End Sub
End Module

RSRP-265573: Use 'var' context action should insert an explicit cast when there's an implicit cast in original code

$
0
0
Reporter Andrew Serebryansky (marcus23) Andrew Serebryansky (marcus23)
Created May 20, 2011 11:38:17 AM
Updated Oct 16, 2018 5:23:08 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Improvement
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions

RSRP-471866: ReSpeller suggests incorrect spelling "occured"

$
0
0
Reporter Christian Schlotter (schlotter) Christian Schlotter (schlotter)
Created Oct 16, 2018 5:46:00 PM
Updated Oct 16, 2018 5:46:54 PM
Subsystem ReSpeller
Assignee Artem Bukhonov (Artem.Bukhonov)
Priority Normal
State Submitted
Type Bug
Fix version No Fix versions
Affected versions 2018.2, 2018.2.3
Fixed In Version ReSharper Undefined
VsVersion All Versions

ReSpeller suggests misspelled word occured (instead of occurred)

occured is suggested as a correct spelling by ReSpeller. According to the following sources, this is a misspelling of the word occurred:
https://en.oxforddictionaries.com/spelling/common-misspellings
https://www.grammarly.com/blog/occurred-occured-ocurred/
https://www.grammar.com/occurred-correct-spelling


RSRP-274740: Merge variables does not work in presence of const

$
0
0
Reporter Michael (mteper) Michael (mteper)
Created Aug 5, 2011 9:39:20 PM
Updated Oct 16, 2018 5:53:09 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 6.0, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Try the following:

public void Test()
{
if (true)
{
const string foo = "test";
}

string foo = (2 * 3).ToString();
}

RSRP-471838: Call in VB is not found when it is chained to ctor creation

$
0
0
Reporter Sergey Kuks (coox) Sergey Kuks (coox)
Created Oct 14, 2018 12:03:44 PM
Updated Oct 16, 2018 5:57:44 PM
Subsystem Structured Patterns (SSR)
Assignee Vadim Lomshakov (Vadim.Lomshakov)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Imports ConsoleApp2

Module Module1
Sub Main()
Call New Foo().ObsoleteMethod(4) ' not found by SSR
End Sub
End Module

Imports ConsoleApp2

Module Module1
Sub Main()
Dim foo = New Foo()
Call foo.ObsoleteMethod(4) ' found
End Sub
End Module

C# Source
namespace ConsoleApp2
{
public class Foo
{
public int ObsoleteMethod(int x)
{
return 42 + x;
}

public int ModernMethod()
{
return 42;
}
}
}

RSRP-275239: Some new actions for working with strings (VB)

$
0
0
Reporter Egor Malyshev (megor) Egor Malyshev (megor)
Created Sep 1, 2011 1:14:12 PM
Updated Oct 16, 2018 5:58:34 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Open
Type Feature
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Would be nice to have this in VB support:

1. Convert code like this st += pItem.AsHelpTopic.FileName + vbCrLf to this st=Concat(st, pItem.AsHelpTopic.FileName, vbCrLf)

2. Convert code like this MsgBox("There are "+i.ToString()+" files in "+j.ToString()+" folders.") to this: MsgBox(Format("There are {0} files in {1} folders.", i, j)) -> make sure that "Use format string for all arguments" CA is working in VB.NET

RSRP-427415: External Annotations in source control.

$
0
0
Reporter micah (micah) micah (micah)
Created Nov 6, 2014 11:56:58 PM
Updated Oct 16, 2018 6:00:18 PM
Resolved Sep 13, 2018 5:03:40 PM
Subsystem Code Analysis - Annotations
Assignee Slava Trenogin (derigel)
Priority Show-stopper
State Fixed
Type Feature
Fix version 2018.3
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Currently (according to documentation) if I want to add some external annotations to third party code that I have proven out the files need to be placed next to the assembly or in R# install directory. The first doesn't work for things installed to the GAC (e.g., .NET Framework) nor for things installed via NuGet. The second only affects my machine.

Our team all uses R# static analyzer to do possible NRE checks and I don't mind the fact that the entire .NET Framework isn't covered. However, I need a way to be able to add the appropriate annotations for my entire team. This means I need a way to check in an annotation file to source control along side the project and have their R# pick up those annotations automatically.

An example scenario:
I have some code that looks like:
var assembly = Assembly.Load(assemblyName);
var type = assembly.GetType(className);
The second line gets an R# warning about possible NRE, which is reasonable. So I do some investigation and find that Assembly.Load will always throw an exception or return non-null. I do not want to require my team to repeat this process and I do not want to (nor can I) push changes to files installed to their computers. I need a way to tell R# that Assembly.Load won't return null and have anyone who checks out my repository and opens it in VS (with R#) receive the same benefits of my investigation.

RSRP-471229: Prevent redundant check not null

$
0
0
Reporter Min Peng (pm9551) Min Peng (pm9551)
Created Aug 23, 2018 5:07:48 PM
Updated Oct 16, 2018 6:05:33 PM
Resolved Oct 16, 2018 6:05:33 PM
Subsystem Code Analysis - Annotations
Assignee Alexander Shvedov (shvedov)
Priority Normal
State Answered
Type Bug
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
I have a method in the class:
class Some {
public HasSomething() => SomeType != null && Something != null
...
}

And I called it:
void SomeFunc() {
if (!some.HasSomething) { return; }
Func(some.Something); // Resharper warn me here: Possible null
}

And resharper suggest me to check it not null again.

Could I prevent it?

RSRP-275508: Ternary expression to null-coalescing conversion

$
0
0
Reporter Alex Berezoutsky (fergard) Alex Berezoutsky (fergard)
Created Sep 12, 2011 5:30:58 PM
Updated Oct 16, 2018 6:07:08 PM
Resolved Oct 16, 2018 6:07:08 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Bug
Fix version Backlog
Affected versions 6.0
Fixed In Version ReSharper Undefined
VsVersion All Versions
I think there is a very trivial bug with the "'?;' expression can be rewritten as '??' expression" suggestion; it's not Earth-shatteringly urgent but I thought I'd best point it out.

Given the following code Resharper will not suggest the rewrite:

        public void Method(int? value)
{
var result = value == null ? 0 : value.Value;
}
However if I change the code to the following then Resharper will suggest a rewrite:

  public void Method(int? value)
{
var result = value == null ? 0 : value;
}
If executed then the code will be rewritten to:

  public void Method(int? value)
{
var result = value ?? 0;
}
In the first piece of code the ternary operator resolves to an int type.
In the second piece of code the ternary operator actually resolves to an int? type.
In the reformatted code the result is an int type.

RSRP-471782: Object reference not set to an instance of an object.

$
0
0
Reporter Tatyana Lunegova (lunega) Tatyana Lunegova (lunega)
Created Oct 8, 2018 4:16:13 PM
Updated Oct 16, 2018 6:10:08 PM
Subsystem UI
Assignee Daniel Degtyarev (daniel.degtyarev)
Priority Normal
State Submitted
Type Exception
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharperPlatformVs15 Wave 183 Hive _cfcc61ab — JetBrains ReSharper Ultimate 2018.3 EAP 2 D Build 183.0.20181008.52751-eap02d

JetBrains dotCover 2018.3 EAP 2 D Build 2018.3.20181008.54209-eap02d
JetBrains dotMemory 2018.3 EAP 2 D Build 2018.3.20181008.54742-eap02d
JetBrains dotTrace 2018.3 EAP 2 D Build 2018.3.20181008.54205-eap02d
JetBrains ReSharper 2018.3 EAP 2 D Build 2018.3.20181008.54358-eap02d
JetBrains ReSharper C++ 2018.3 EAP 2 D Build 2018.3.20181008.54739-eap02d

SubProducts.0 = JetBrains dotCover 2018.3 EAP 2 D Build 2018.3.20181008.54209-eap02d
SubProducts.1 = JetBrains dotTrace 2018.3 EAP 2 D Build 2018.3.20181008.54205-eap02d
SubProducts.2 = JetBrains ReSharper C++ 2018.3 EAP 2 D Build 2018.3.20181008.54739-eap02d
SubProducts.3 = JetBrains ReSharper 2018.3 EAP 2 D Build 2018.3.20181008.54358-eap02d
SubProducts.4 = JetBrains dotMemory 2018.3 EAP 2 D Build 2018.3.20181008.54742-eap02d

Object reference not set to an instance of an object.

— EXCEPTION #1/2 [NullReferenceException]
Message = “Object reference not set to an instance of an object.”
ExceptionPath = Root.InnerException
ClassName = System.NullReferenceException
HResult = E_POINTER=COR_E_NULLREFERENCE=80004003
Source = JetBrains.ReSharper.Features.Internal
StackTraceString = “
 at JetBrains.ReSharper.Features.Internal.ReSharper.Options.InternalPage.<.ctor>b__2_5()
 at JetBrains.ReSharper.Features.Internal.ReSharper.Options.InternalPage.<.ctor>b__2_5()
 at JetBrains.Util.Logging.Logger.Catch(Action action)


— Outer —

— EXCEPTION #2/2 [LoggerException]
Message = “Object reference not set to an instance of an object.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
Data.LastExtension = cs
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2018.3 EAP 2 D Build 183.0.20181008.52751-eap02d”
Data.SubProducts.#0 = “JetBrains dotCover 2018.3 EAP 2 D Build 2018.3.20181008.54209-eap02d”
Data.SubProducts.#1 = “JetBrains dotTrace 2018.3 EAP 2 D Build 2018.3.20181008.54205-eap02d”
Data.SubProducts.#2 = “JetBrains ReSharper C++ 2018.3 EAP 2 D Build 2018.3.20181008.54739-eap02d”
Data.SubProducts.#3 = “JetBrains ReSharper 2018.3 EAP 2 D Build 2018.3.20181008.54358-eap02d”
Data.SubProducts.#4 = “JetBrains dotMemory 2018.3 EAP 2 D Build 2018.3.20181008.54742-eap02d”
Data.SccRevisionEnv = “
Platform\Core\Shell:
    git::refs/heads/183::b75ce5f3ddc9fcaf8271084383142645117824fd


Platform\VisualStudio:
    git::refs/heads/183::db57f5344bde841f69261cfa30f49bb580b232ec

Data.VsVersion = 15.8.28010.2041
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at JetBrains.ReSharper.Features.Internal.ReSharper.Options.InternalPage..ctor(Lifetime lifetime, OptionsSettingsSmartContext optionsSettingsSmartContext, IOptionsDialogViewOwner optionsDialogOwner, IMultiCoreFibersPoolStrategyOptionsProvider multiCoreFibersPoolStrategyOptionsProvider)
 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
 at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
 at JetBrains.Application.Components.SingletonTypeComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
 at JetBrains.Application.Components.SingletonTypeComponentDescriptor.CreateInstance(IValueResolveContext context)
 at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
 at JetBrains.Application.Components.SingletonDescriptor.GetValue()
 at JetBrains.Application.Components.InitializationStrategyDefault.Schedule(Lifetime lifetime, ICollection`1 dscs, IComponentContainer container)
 at JetBrains.Application.Components.ComponentStorage.ComposeDescriptors(ICollection`1 descriptors)
 at JetBrains.Application.Components.ComponentStorage.Compose()
 at JetBrains.Application.Components.FactoryComponentContainer.CreateInstanceCore(Lifetime lifetime, Type type, IComponentContainer parent, Object[] args)
 at JetBrains.Application.Components.FactoryComponentContainer.CreateInstance(Lifetime lifetime, Type objecttype, IComponentContainer parent, Object[] args)
 at JetBrains.Application.UI.Options.OptionsDialog.OptionsPageFactory.CreateOptionsPage(OptionsPageDescriptor pagedescriptor, IComponentContainer containerParent, OptionsSettingsSmartContext injectSettingsStoreSmartContext, IShellLocks locks)
 at JetBrains.Application.UI.Options.OptionsDialog.OptionsPageInOptionsContextAutomation.GetOrCreateOptionsPage()
 at JetBrains.Application.UI.Options.OptionsDialog.OptionsPageInOptionsContextAutomation.GetControlFromExistingOptionsPage()
 at JetBrains.Application.UI.Options.OptionsDialog.OptionsAutomation.GetSearchablePage(OptionsPageWithoutContextAutomationFactory factoryPagesWithoutContext, OptionsPageWithoutContextAutomation node, OptionsPageInOptionsContextAutomationFactory fact, UserFriendlySettingsLayer optContext, IContextBoundSettingsStoreLive trans)
 at JetBrains.Application.UI.Options.OptionsDialog.OptionsAutomation.<>c__DisplayClass12_0.<HandleSearchRequest>b__0()
 at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
 at JetBrains.Threading.ReentrancyGuard.TryExecute(String name, Action action)
 at JetBrains.Threading.ReentrancyGuardEx.ExecuteOrQueue(ReentrancyGuard thіs, Lifetime lifetime, String name, Action F, TaskPriority priority)
 at JetBrains.Application.Threading.IThreadingEx.ExecuteOrQueue(IThreading thіs, Lifetime lifetime, String name, Action action, TaskPriority priority)
 at JetBrains.Application.UI.Options.OptionsDialog.OptionsAutomation.HandleSearchRequest(Lifetime currentSearchLifetime, OptionsModel model, IShellLocks locks, String searchText, IProperty`1 propFactoryPagesInContext, OptionsPageWithoutContextAutomationFactory factoryPagesWithoutContext, StaticKeywordsPerPageKeeper staticKeywordsPerPageKeeper, UsageStatistics activityTracking)
 at JetBrains.Application.UI.Options.OptionsDialog.OptionsAutomation.<>c__DisplayClass11_4.<.ctor>b__33(LifetimeDefinition definition, Lifetime currentSearchLifetime)
 at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILog logger)
 at JetBrains.DataFlow.SequentialLifetimes.DefineNext(Action`2 FNext)
 at JetBrains.Application.UI.Options.OptionsDialog.OptionsAutomation.<>c__DisplayClass11_1.<.ctor>b__22(String args)
 at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
 at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
 at JetBrains.DataFlow.Signal`1.Fire(TValue value)
 at JetBrains.UI.Options.OptionsDialog2.OptionsView.<>c__DisplayClass14_0.<CreateTemplate_PagesTree>b__6(Object o, SearchViewEventArgs e)
 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
 at System.Delegate.DynamicInvokeImpl(Object[] args)
 at System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
 at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
 at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
 at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
 at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
 at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
 at JetBrains.UI.Controls.Misc.SearchTextBox.RaiseSearchEvent()
 at JetBrains.UI.Controls.Misc.SearchTextBox.OnSeachEventDelayTimerTick(Object o, EventArgs e)
 at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
 at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
 at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
 at System.Windows.Threading.DispatcherOperation.InvokeImpl()
 at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
 at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
 at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
 at System.Windows.Threading.DispatcherOperation.Invoke()
 at System.Windows.Threading.Dispatcher.ProcessQueue()
 at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
 at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
 at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
 at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
 at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
 at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
 at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
 at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
 at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
 at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
 at System.Windows.Window.ShowHelper(Object booleanBox)
 at System.Windows.Window.Show()
 at System.Windows.Window.ShowDialog()
 at JetBrains.UI.Extensions.WindowUtil.<>c__DisplayClass15_2.<ShowDialogWithGuardedCreation>b__5()
 at JetBrains.Application.UI.Components.UIApplication.ApplicationModalStateEx.<>c__DisplayClass0_0`1.<WithModalState>b__0(Lifetime lifetime)
 at JetBrains.DataFlow.Lifetimes.Using[TRetVal](Func`2 λ)
 at JetBrains.Application.UI.Components.UIApplication.ApplicationModalStateEx.WithModalState[T](IApplicationModalState appModalState, Func`1 modalAction)
 at JetBrains.UI.Extensions.WindowUtil.ShowDialogWithGuardedCreation(Lifetime lifetime, WindowModality modality, Func`3 FCreateView, IThreading threading, Object ownerwindow, IApplicationModalState applicationModalState)
 at JetBrains.UI.Extensions.WindowUtil.<>c__DisplayClass15_0.<ShowDialogWithGuardedCreation>b__1()
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at JetBrains.Application.Threading.IThreadingEx.<>c__DisplayClass18_1.<ExecuteOrQueueWhenNotGuarded>b__4()
 at JetBrains.Threading.JetDispatcher.Closure.Execute()
 at JetBrains.Util.Concurrency.WinJetDispatcher.ProcessQueue(Int32 nMinBucket)
 at JetBrains.Util.Concurrency.WinJetDispatcher.<>c__DisplayClass18_0.<BeginInvokeCore>b__0()
 at System.Windows.Threading.DispatcherOperation.InvokeDelegateCore()
 at System.Windows.Threading.DispatcherOperation.InvokeImpl()
 at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
 at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
 at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
 at System.Windows.Threading.DispatcherOperation.Invoke()
 at System.Windows.Threading.Dispatcher.ProcessQueue()
 at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
 at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
 at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
 at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
 at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
 at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
 at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

RSRP-471868: Value tracking: improve "Go to Next Item" with dead usages

$
0
0
Reporter Alexander Shvedov (shvedov) Alexander Shvedov (shvedov)
Created Oct 16, 2018 6:12:44 PM
Updated Oct 16, 2018 6:25:05 PM
Subsystem Inspect This - Value Tracking
Assignee Alexander Ulitin (alexander.ulitin)
Priority Major
State Submitted
Type Usability Problem
Fix version 2018.3
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
1. I've opened Value Origin and found a few usages (literal arguments) represented as nodes (not leaf ones, with > available).
2. I used "Go To Next Item" tab bar item to navigate to next node and changed the code of this particular value origin.
3. I switched back to Value Tracking tree and pressed "Go To Next Item" again.

Expected: navigation to the next value origin represented by the next leaf node in Value Tracking tree.
Actual result: current node in tree changes text style to strike-out and nothing else happens.

RSRP-275923: put into using breaks code

$
0
0
Reporter mark van tilburg (mark.van.tilburg) mark van tilburg (mark.van.tilburg)
Created Sep 21, 2011 2:10:59 PM
Updated Oct 16, 2018 6:26:42 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 5.1.3, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
private void jaap_Click(object sender, EventArgs e)
{
Response.Write("ajaj caramba");
}

Page_Load:

Button bt = new Button();
bt.Click += this.jaap_Click;
form1.Controls.Add(bt);


Then hover bt, "put into using construct"

using (Button bt = new Button())
{
bt.Click += this.jaap_Click;
form1.Controls.Add(bt);
}

Et voila, my button is broken

RSRP-276843: Make Convert to For intention a bit smarter (VB)

$
0
0
Reporter Egor Malyshev (megor) Egor Malyshev (megor)
Created Oct 6, 2011 5:53:34 PM
Updated Oct 16, 2018 6:31:11 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Usability Problem
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
I have this code:
For Each s As String In src.Split(",")
s = s.Trim()
If Not result.Contains(s) Then result.Add(s)
Next

If I use R# offer to convert it to For, I get the following:

For i As Integer = LBound(src.Split(",")) To UBound(src.Split(",")) Step 1
Dim s As String = src.Split(",")(i)
s = s.Trim()
If Not result.Contains(s) Then result.Add(s)
Next

This is not really good, because I get two of these: src.Split(","), which first makes program do extra work, and second it's not safe because src might have changed between calling LBound and UBound, not to mention during cycle. Why don't this intention do this:

Dim arr as String() = src.Split(",")
For i As Integer = LBound(arr) To UBound(arr) Step 1
Dim s As String = arr(i)
s = s.Trim()
If Not result.Contains(s) Then result.Add(s)
Next

Of course, I can call Extract Variable refactoring on this, but that's one extra move that I'd like saved; also, this would add a sure +1 to the overall product experience—the fact that R# produces really sharp code.

RSRP-466028: TypeScript definition errors with intellisense and code checking

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Aug 28, 2017 2:24:32 PM
Updated Oct 16, 2018 6:38:36 PM
Resolved Oct 16, 2018 6:38:35 PM
Subsystem TypeScript
Assignee Alex Berezoutsky (fergard)
Priority Critical
State Incomplete
Type Task
Fix version 2017.3
Affected versions 2017.2
Fixed In Version ReSharper Undefined
VsVersion All Versions
It seems as though when ReSharper is enabled, Resharper cannot find typing definitions. The project builds fine, no errors there, it's only really annoying to have the red squiggly lines under CORRECT types. Also, Intellisense can't find the types either. It seems this problem is recurrent but I still haven't found a fix, for now, I just disabled ReSharper for typescript, resorting to the default Visual Studio IntelliSense and code checking.
See attached pictures for details.
Note: Everything works fine without ReSharper.

Nope, still not working. My package was installed through npm @types regular directives. It's located under node_modules. I installed resharper EAP 2017.2 13. I tried clearing caches without success. All my packages are somewhat referenced in my tsconfig files through the types, typeRoots and include directives. Package I'm trying to use: https://www.npmjs.com/package/mysql typings: https://www.npmjs.com/package/@types/mysql

RSRP-277321: CA to convert invocation of inline lambda to plain code: (() => Foo())() --> Foo()

$
0
0
Reporter Drew Noakes (drewnoakes) Drew Noakes (drewnoakes)
Created Oct 20, 2011 2:20:55 PM
Updated Oct 16, 2018 6:38:47 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 6.0, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
I had some code:

Action foo = () => Foo();
foo();

After inlining foo you get:

(() => Foo())();

It'd be good to suggest converting code of this form this via a CA to:

Foo();
Viewing all 106942 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>