Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 refactor -> create declaration

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
eco Posted - Oct 05 2009 : 03:39:15 AM
build 1738, in c++

1. If the class is declared directly in the .cpp file and having a corresponding .h file, the declaration is inserted at the end of the .h file (outside the namespace), not in the correct place in the .cpp file.

2. The class name is also inserted, that's not the thing I need.
ex.
class xxx
{
void xxx::refactored_method( );
     ~~~~~
};

3. I cannot change the VA snippet for the declaration.
6   L A T E S T    R E P L I E S    (Newest First)
support Posted - Aug 09 2012 : 01:58:06 AM
case=33389 is fixed in build 1912
accord Posted - Oct 07 2009 : 3:17:04 PM
quote:

with a VA snippet I should comment my .h file


You mean you would write a description template, something like "Document Method" refactoring does?
accord Posted - Oct 07 2009 : 3:03:39 PM
I am seeing the same thing here. Thank you for the clear description.

case=33389

The problem is caused by the macro before the typename in the class forward declaration.
eco Posted - Oct 06 2009 : 08:18:15 AM
sorry, i forget a response:
with a VA snippet I should comment my .h file
eco Posted - Oct 06 2009 : 04:19:25 AM
VA_X.dll file version 10.5.1738.0 built 2009.10.01
Licensed to:
VA X: xxxxxxxxxxxxxxxxxx (17-user license) Support ends 2010.04.09
DevEnv.exe version 9.0.21022.8
msenv.dll version 9.0.21022.8
Font: Courier New 13(Pixels)
Comctl32.dll version 6.10.6001.18000
Windows Vista 6.0 Build 6001 Service Pack 1
2 processors (x86-64; WOW64)

Platform: Custom
Stable Includes:
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\include;
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.1\\include;

Other Includes:

Stable Source Directories:

------------------------------------------------------

ok, create a va.h with that content:

#define THEAPI

namespace blah
{
class THEAPI xxxx;
}


now, create a va.cpp with that content

#include "va.h"


namespace blah
{
class THEAPI xxxx
{
public:
};


void xxxx::test( )
{

}
}

create a console project with the 2 files.

now go on the line (in va.cpp)
void xxxx::test( )

right click on 'test' and select refactor->create declaration.
you will get the problem

by the way (I think there is a relationship), when you click on the same line on xxxx and select 'go to declaration', the cursor is going inside the va.h file, not on the class


accord Posted - Oct 05 2009 : 4:38:04 PM
Can you please provide a more specific description? I wasn't able to reproduce this with the following code snippet:

code in the cpp file:

namespace nTest {
	class cTest
	{
	};
}

void nTest::cTest::TestMethod() {}

If I use Create Declaration on the last line, I get this:

namespace nTest {
	class cTest
	{

		void TestMethod();
	};
}

void nTest::cTest::TestMethod() {}

I also get the correct result, when I place the definition into the namespace, but outside the class.
Can you please try this simplified example in a new win32 test project just to see if this work on your computer?

What IDE do you use?

What modification would you do if we had a snippet for Create Declaration?

© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000