History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-64689
Type: New Feature New Feature
Status: Open Open
Priority: Critical Critical
Assignee: Ilya Ryzhenkov
Reporter: Stéphane Malbéqui
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
ReSharper

Improve the functionality "Create class 'foo'"

Created: 12 Apr 08 01:56   Updated: 19 May 08 21:25
Component/s: Quick Fixes
Fix Version/s: 4.5
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
First off all, sorry for my english.

The implemented user story explained below is painful whe you really do "Test Driven Developpement". Reshaper can do it better :

Preconditions

  • I have a solution MyPrj with 5 projects : MyPrj.Domain, MyPrj.Data, MyPrj.Service, MyPrj.Data.Tests, MyPrj.Service.Tests
  • Default Namespace are respectively MyPrj.Domain, MyPrj.Data, MyPrj.Service, MyPrj.Data.Tests, MyPrj.Service.Tests
  • Source organization under the solution and projects are very standard
  • The following guidelines are respected : only one class per .cs file, folders under projects coresponding to namespace, etc.

Scenario

  1. I am writing a unit test called MyPrj.Data.Tests.Administration.Users.UserDaoTests in the file UserDaoTests.cs of the folder Administration\Users of the project MyPrj.Data.Tests
  2. I instantiate the class UserDao with the code IUserDao userDao = new UserDao(); (UserDao class does not exist yet)
  3. Reshaper suggest to "Create the class 'UserDao'", I select this action in the actions list
  4. Reshaper create for me the internal class MyPrj.Data.Tests.Administration.Users.UserDao in the same file
  5. I use the "Move Type" functionality (F6 key), choose the option "An other file" and click "Next"
  6. Reshaper create for me the file MyPrj\MyPrj.Data.Tests\Users\Administration\UserDao.cs with the class MyPrj.Data.Tests.Administration.Users.UserDao in it
  7. I create by hand the folder structure Administration\Users under the project MyPrj.Data
  8. I drag and drop the file MyPrj.Data.Tests\Users\Administration\UserDao.cs to the folder Administration\Users of the project MyPrj.Data
  9. Reshaper suggest to "Move to namespace 'Prj.Data.Administration.Users' because the actual namespace doe not correpond to the file location
  10. I select this action in the action list and Reshaper change the namespace of the class

I think Reshaper has all informations to do the job with less user actions.

Please :

  • don't create the new class in the same file and open by defaut the "Create the class 'xxx'" dialog box. "In the same file" could be an option in this dialog box
  • not very expensive, give the possibility to choose the projet too and not only the namespace in the "Create the class 'xxx'" dialog box
  • create the folder structure corresponding to the class's namespace
  • In fact, Reshaper knows the default namespace of all projects, so when I give the namespace "Prj.Data.Administration.Users" in the "Create the class 'UserDao'" dialog box, It's easy for Reshaper to understand I want to create the class Prj.Data.Administration.Users.UserDao in the folder Administration\Users under the project Prj.Data

Thanks for all, Visual Studio is so poor without Reshaper.

Stéphane.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.