Author |
Topic |
|
__Daniel__
Senior Member
Poland
36 Posts |
Posted - Sep 11 2009 : 05:58:22 AM
|
Hello. I can't reproduce it in "simple test project" but in my "real" projects: Listboxes not show all method during writing code. For "hided" method not work refactoring ( methods are underline ). When i go to header class refactoring working on all methods. When i enable "Get content from default Intellisense" then during write code in listboxes appears all methods, but on some methods ( the same as before ) refactoring still not work. ( vs2005sp1, latest relase/beta visual assistx ). Regards. |
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Sep 11 2009 : 4:55:53 PM
|
Something probably confuses VA parser in your source code.
Would it be possible to get a copy of these two files, the cpp and .h, so I can try and reproduce the problem here? It would only be used for testing this problem, and would be kept private.
I understand this is often not possible, but it is worth asking.
If you can send the files please submit them via the form:
http://www.wholetomato.com/support/contact.asp
including this thread ID or URL in the description, so we can match it up.
If it isn't possible, I will ask questions to try hunting down the problem. |
|
|
__Daniel__
Senior Member
Poland
36 Posts |
Posted - Sep 14 2009 : 03:12:42 AM
|
Hello. One problem is resolved :) ( i used keyword abstract, after add it to vax stdafx.h is ok ).
But second problem:
this code not work: #define EXT_FUNC(f) void f(); #define FUNC EXT_FUNC FUNC(fun)
this code work: #define EXT_FUNC(f) void f(); #define FUNC(f) EXT_FUNC(f) FUNC(fun)
i can't "repair" macros because it is from external ( not my ) library. |
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Sep 14 2009 : 3:29:10 PM
|
This FAQ entry will help with your problem:
http://docs.wholetomato.com?W363
I've just tested and it worked with your code snippet under "this code not work:" |
Edited by - accord on Sep 14 2009 3:31:49 PM |
|
|
__Daniel__
Senior Member
Poland
36 Posts |
Posted - Sep 14 2009 : 5:10:42 PM
|
code for testing: FUNC(fun) void testfun1() { fun(); } int testfun2() { fun(); } int _tmain(int argc, _TCHAR* argv[]) { fun(); return 0; }
1) #define EXT_FUNC(t) void t(); #define FUNC(t) EXT_FUNC(t) work(+) not work(-) +/- find references
- in main - find only in main
- in other function - find all references without from main
+/- rename ( problem like in "find reference" ) +/- document method ( "-" because documentation is added after function, not before ) - create declaration - change signature
2) #define EXT_FUNC(f) void f(); #define FUNC EXT_FUNC and registry "fix" +/- find reference
- in main work ( with "?" mark for references in other functions in dialog find ) but not find references in macro
- in macro sometimes not work, sometimes work like in main but with "please place the caret on a symbol..."
- in other function work like in main ( but is underlined )
3) #define EXT_FUNC(f) void f(); #define FUNC EXT_FUNC add registry "fix" add #define FUNC(f) EXT_FUNC(f) to stdafx.h better ( still not "the best" ), but still problem with find reference ( and other ) in main function Edit: In real project ( big ) i see: in code "find references" not work ( also alt+g etc ) but: go to header with "function in macro", press "find references" - ok ( rename etc ), return to code and press "find references", appears dialog "please place the caret on a symbol..." but also dialog with references :)
Maybe i have problem in real code because: #ifdef EXTERN #define EXT_FUNC(f) void f(); #define FUNC EXT_FUNC #else #define DEF_FUNC(f) ....... ( another code ) #define FUNC DEF_FUNC #endif and in project in some project i have: #define EXTERN ... and sometimes not so some code works as DEF_FUNC and some as EXT_FUNC how it add to stdafx.h??
|
Edited by - __Daniel__ on Sep 15 2009 04:12:19 AM |
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Sep 15 2009 : 4:29:38 PM
|
Visual Assist parses both branches: the code after #ifdef and also the code after #else. This is by design to provide suggestions and other informations from both branches. So if you are working on RELEASE configuration you can use VA's help to write code that are active only in the DEBUG configuration. This is the background. Now let's see your case:
#ifdef EXTERN
#define EXT_FUNC(f) void f();
#define FUNC EXT_FUNC
#else
#define DEF_FUNC(f) ....... ( another code )
#define FUNC DEF_FUNC
#endif
Here Visual Assist will find #define EXT_FUNC(f) first, and will define this macro. After that, it will define #define FUNC macro, then #define DEF_FUNC(f), then will find #define FUNC macro. Here, Visual Assist thinks that this macro is already defined so it will skip, so its definition remains EXT_FUNC and will NOT become DEF_FUNC. This will always happen, regardless of EXTERN is defined or not.
I know this working is unfortunate in your case and cannot be corrected by some define in the stdafx.h
You can decide the outcome of FUNC macro by placing it into the stdafx.h, but, unfortunately, you cannot make it context sensitive. |
Edited by - accord on Sep 15 2009 4:32:26 PM |
|
|
|
Topic |
|