|T O P I C R E V I E W
||Posted - Feb 11 2008 : 7:55:35 PM
It would be nice if one could create implementations for all class methods in one shot.
Perhaps this could be done by adding a refactoring option to Class objects like "Create Implementations" which would call "Create Implementation on each method in the class.
Refactoring on the class "Node" would give the option "Create Implementions" which would implement the constructor, the destructor, Next() and Blah().
A second request to make this even better:
It would be nice if Create Implementation could detect if there was already an implementation created for a method. If not it functions as normal, else it does not create an implementation but rather it moves to the cursor to the existing implementation.
This would enhance the above request by allowing the global Create Implementations to be used to only create newly added, un-implemented class methods.
Could these things be done via scripting in VS.NET 2005? A script would need to be able to iterate through class methods and check if an implementation for a method already exists.
|15 L A T E S T R E P L I E S (Newest First)
||Posted - Oct 29 2012 : 11:08:09 AM
case=68802 is fixed in build 1918
||Posted - Aug 25 2012 : 11:08:57 PM
I am seeing the same effect here. Thank you for the clear description and the instructions:
||Posted - Aug 24 2012 : 02:31:54 AM
File->New->Project: "MFC Application" and <Finish> the Wizard Dialog.
Navigate to "class CViewTree : public CTreeCtrl" and call "Refactor Create Implementation": you will see "GetMessageMap" and "GetThisMessageMap".
Those methods are coming from the "DECLARE_MESSAGE_MAP"-macro.
||Posted - Aug 21 2012 : 11:15:40 PM
Personally I don't know anything about MFC, so can you help me set up a test case for this? I have created a new, default MFC application in VS2010, but doing a find in files for "CObject" does not find any matches. So if any of the generated classes are derived from CObject, it is not immediately obvious.
||Posted - Aug 17 2012 : 2:02:30 PM
I like this new feature, but there is one issue I have with it. I work with a lot of MFC based projects and if a class is indirectly derived from CObject and has one of the typical MFC macros like DECLARE_MESSAGE_MAP or DECLARE_DYNCREATE then the class level Create Implementation feature will implement all of the functions that are actually defined by the macros like:
static CRuntimeClass* PASCAL _GetBaseClass()
static CObject* PASCAL CreateObject()
virtual const AFX_MSGMAP* GetMessageMap() const
These functions already have implementations via the IMPLEMENT_xxx type macros in the source file. As a result you will get unnecessary and duplicate definitions.
Otherwise this feature seems to work great.
||Posted - Aug 09 2012 : 04:13:21 AM
||Posted - Aug 09 2012 : 01:46:43 AM
case=1120 is implemented in build 1912
||Posted - Aug 09 2012 : 01:43:53 AM
case=49162 replaces case=1092 and is implemented in build 1912
||Posted - Jan 06 2011 : 04:10:52 AM
Best wishes for you guys! Keep up the good work!
If there's one feature I'd love to see added this year, this would be it ;-) Hope you find some time to do this.
||Posted - Dec 08 2010 : 1:39:01 PM
Unfortunately this has not yet been done, but we are still looking to add this feature. As you say, it should be quite helpful, and VA Outline is a good way of specifying the methods for refactoring to work on.
||Posted - Dec 06 2010 : 11:42:00 AM
just checking in again, as I've been doing a lot of "define class functionality in .h" --> "now implement it in .cpp" action.
Is this something that is being worked on?
Selecting the functions in the VA Outline view and then calling "create implementation" on each one of them would be very useful.
||Posted - Jun 24 2010 : 09:51:06 AM
that would be fine yes.
I usually work from the code text, but VA Outline is good too.
Thanks! I subscribed to this topci so I will know when it's there.
||Posted - Jun 24 2010 : 09:09:07 AM
No progress yet unfortunately, but we are hoping to do this fairly soon. One idea is to use VA Outline, so you can select the methods you want to act on in the outline, and then trigger the refactoring command.
||Posted - Jun 24 2010 : 08:14:42 AM
has there been any progress on case 1092?
I was just thinking the exact same thing.
I usually start with laying out my header files, and then start putting the implementations in the corresponding .cpp file.
Now, I need to do this one by one using VAX "Create implementation" on each mehtod.
Would be very nice if I could just do "Create implementation" on either the new class, or on a selection containing multiple methods. The last one would probably be the most flexible (in case you add a set of new methods to your header after you already made some).
||Posted - Feb 12 2008 : 1:47:44 PM
We are considering allowing Create Implementation to operate on multiple methods at once:
We are also looking into having Create Implementation check if the implementation already exists. This is slightly difficult, due to overloaded functions currently confusing VA's parser, it cannot reliably tell them apart.