Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Create From Usage sneak peek
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jun 15 2009 :  2:57:24 PM  Show Profile
Build 1727 has the start of some Create From Usage functionality. This is a work in progress and by default, you will see no sign of it.

Here are directions to enable the appearance of a new command in the menu of the hovering Refactor button (the button with the down arrow as seen in the screenshot at the top of http://www.wholetomato.com/products/features/createDeclaration.asp).

To enable:
Exit all instances of Visual Studio.
Open regedit.
Create a binary value named "AllowCreateFromUsage" at:
HKEY_CURRENT_USER\\Software\\Whole Tomato\\Visual Assist X\\VANet9
(use VANet8 for VS2005, VANet for VS2003, VANet7.0 for VS2002, VA6 for VC6)
Set the value to 01.
Start Visual Studio.
Ensure that "Show icon to open refactoring menu when hovering" in "VA Options | Advanced | Refactoring" is enabled.


The idea behind this feature is to better support top down programming (http://en.wikipedia.org/wiki/Top_down_programming).

So, for example, you can call an object method which hasn't yet been declared/defined. At the call site, hover over the method name and display the VA Refactor menu by clicking on the arrow button. Select Create method. VA will display a signature which you can edit. When accepted, the declaration and implementation stub will be generated for you.

In build 1727, we have preliminary support for this in C/C++ and C#. As already noted though, this is a work in progress. As an example, the stub implementation that VA generates is empty; this is not the expected final behavior. Another example is the creation of variables. If VA can create an object member, it will do so; otherwise it will create a global variable. As the feature gets further along, you will have more input over where variables are declared.

If you try out Create From Usage, please report bugs and requests in this beta forum. In particular, we would like to see sample code which demonstrates where default function signatures and variable declarations can be improved (cases where you need to modify the types in the VA prompt). If you have opinions about what the default code in stub implementations should be, please voice them in this forum.

Edited by - sean on Aug 19 2009 10:51:37 PM
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000