aBothe / Mono-D

D Add-In for MonoDevelop
http://wiki.dlang.org/Mono-D
Other
113 stars 26 forks source link

Rename (F2) does not work #610

Closed dsoronda closed 9 years ago

dsoronda commented 9 years ago

Renaming variable does not work. Steps to reproduce:

  1. Create/open win32 demo app.
  2. Press F2 on variable (ie hWnd)
  3. Rename dialog is displayed
  4. Refactoring Preview window is empty and nothing changes after pressing OK button.

Expected behavior :

  1. Refactoring Preview window shows new code and after pressing OK button code is renamed.

Enviroment : Windows 8.1 x64, Xamarin studio 5.9, D

aBothe commented 9 years ago

Which XamarinStudio version do you've got installed? I just tried to reproduce it with the win32 template project on a linux installation - it worked properly.

aBothe commented 9 years ago

When references can't be found it's ususally the case the document hasn't been parsed properly - but under current conditions, this issue shouldn't occur. If you can reproduce this all the time, please have a check in the logs (accessible via 'Help'-menu > Open Log Directory)

dsoronda commented 9 years ago

This one looks like Xamarin bug. I restarted Xamarin studio and I couldn't rename (F2) msg in :

int myWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow)
{
    string caption = "The Hello Program";
    string className = "DWndClass";
    HWND hWnd, btnClick, btnDontClick;
    MSG  msg;

So I tried code change in Console application. After few minutes I switched back to Win32 application and then F2 worked properly.

Looks like it takes some time for XamarinStudio to parse whole solution.

So, I'll close this issue. Sorry for the inconvenience.