Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / October 2006

Tip: Looking for answers? Try searching our database.

Reverse assignment shortcut

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Some Bloke - 10 Oct 2006 11:48 GMT
Hi,

I'm working on an ASP.net project that uses typeconverters to save the
state of a page to a Data transfer object and also uses typeconverters
elsewhere.

I'm finding that I'm writing an awful lot of control.value =
dto.property in page load and dto.property = control.value on a
postback. This is less common than it used to be with old ASP because
of data binding but one thing that would still save a lot of time and
tedium would be a quick shortcut in Visual studio that just swapped the
code on either side of an '=' assignment so that you could just select
all the lines that map the properties of the page and object and get
the code to do the opposite in one click instead of 2 cut'n'pastes on
every line.

Does anyone know a tool or perhaps an addin to Visual Studio 2005's
refactor tool that does this?

I'd would SO appreciate it.
Carlos J. Quintero [VB MVP] - 10 Oct 2006 14:53 GMT
My MZ-Tools add-in (below) has a "Switch Assignment" feature to do that.

http://www.mztools.com/v5/features.htm#SwitchAssignment

It's not free but you get tons of other features.

Signature

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

> Hi,
>
[quoted text clipped - 16 lines]
>
> I'd would SO appreciate it.
Ilya Ryzhenkov - 10 Oct 2006 15:38 GMT
Hello Some,

ReSharper (www.jetbrains.com/resharper) is capable of doing this kind of
refactoring, and much-much more.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

SB> Hi,
SB>
SB> I'm working on an ASP.net project that uses typeconverters to save
SB> the state of a page to a Data transfer object and also uses
SB> typeconverters elsewhere.
SB>
SB> I'm finding that I'm writing an awful lot of control.value =
SB> dto.property in page load and dto.property = control.value on a
SB> postback. This is less common than it used to be with old ASP
SB> because of data binding but one thing that would still save a lot of
SB> time and tedium would be a quick shortcut in Visual studio that just
SB> swapped the code on either side of an '=' assignment so that you
SB> could just select all the lines that map the properties of the page
SB> and object and get the code to do the opposite in one click instead
SB> of 2 cut'n'pastes on every line.
SB>
SB> Does anyone know a tool or perhaps an addin to Visual Studio 2005's
SB> refactor tool that does this?
SB>
SB> I'd would SO appreciate it.
SB>
Some Bloke - 11 Oct 2006 12:24 GMT
Thanks,

My company has a Resharper license already so I've used that. I just
didn't know it was in the large list of features.
Some Bloke - 17 Oct 2006 15:52 GMT
Actually, Having tried out ReSharper and MZ-Tools I find ReSharper
causes too many problems not recognising namespaces and overiding too
many Visual studio short cuts.

MZ-Toolz is much cleaner and less intrusive and I highly recommend it
if anyone's interested.
Ilya Ryzhenkov - 18 Oct 2006 08:37 GMT
Hello Some,

Could you please tell us what are problems with namespaces?

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

SB> Actually, Having tried out ReSharper and MZ-Tools I find ReSharper
SB> causes too many problems not recognising namespaces and overiding
SB> too many Visual studio short cuts.
SB>
SB> MZ-Toolz is much cleaner and less intrusive and I highly recommend
SB> it if anyone's interested.
SB>
Dustin Campbell - 10 Oct 2006 15:49 GMT
Our CodeRush tool can perform assignment inversions like that.

http://www.devexpress.com/Products/NET/IDETools/CodeRush/Index.xml

Best Regards,
Dustin Campbell
Developer Express Inc.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.