Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Intellisense in C++ not working as expected

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
Dusan Posted - Oct 05 2010 : 08:54:54 AM
Hi I have some problems in C++ with VAX in VS2005 and some suggestions for C++/CLI.


*** Problem No. ONE ***

If I'm creating a type like this:

AnyType aType(... // VAX's inellisense does not show, but VS IDE's does

Intellisense of VAX does not show, while if VAX is turned off, Intellisense of VS IDE shows constructor definitions.
To have VAX working for this, I have to use this format:

AnyType aType = AnyType(... // VAX's inellisense shows
or
AnyType *aType = new AnyType(... // VAX's inellisense shows

*** Problem No. TWO ***

Some of methods defined in third party headers outside project (but included in project) are not recognized. Probably problem comes from handling preprocessor directives or what. Is there any way to force some headers to be parsed always or somehow force function declarations? For example I have some headers in directory "$(MYINCLUDES)include" and I want them parsed even I don't heve them included... Is it possible?

*** Some suggestions for C++/CLI ***

In C# there is an option to easily use 'override' keyword to get all overrides list.
Q: Does VAX somehow simulate this for C++/CLI?

In VB.NET and C#, when implementing interface, there it can be automated.
Q: Does VAX somehow simulate this for C++/CLI?

Thanks and regards,
Dusan Paulovic
17   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jan 24 2011 : 4:03:01 PM
case=1505 is implemented in build 1840
accord Posted - Oct 22 2010 : 4:01:35 PM
Sort answer: you can see resolved cases here:

http://www.wholetomato.com/support/history.asp

Long answer:

http://docs.wholetomato.com?W318
Dusan Posted - Oct 22 2010 : 03:49:01 AM
quote:
Originally posted by accord

I have put in a feature request about placing an extensions to parse onto the options dialog to see what the developers make of it:

case=50964



How (where) I can look for this?

Thanks...
accord Posted - Oct 08 2010 : 3:14:12 PM
Overridable methods comes from base classes, and not from the class you're working with, so the problem you had mentioned should not happen.

Sure, you can use override keyword with MS specific extensions, but the feature should work with standard, native C++.

virtual + space: if would be a suggestion listbox like in C#, when you type override + space. So you can continue typing without using the listbox, if you don't need it.

Tip2: will point out.
Dusan Posted - Oct 07 2010 : 3:46:42 PM
quote:
I don't know why didn't I think of it earlier


I did, but 'virtual' keyword is also writen in base class, so then it would be angrying, because you will not want to override anything. Imagine situation, when you have writen class with first virtual method added and now when you are going to write another one, pops up list with that existing one...

quote:
In addition, when you write override keyword in C++/CLI you have already written down the function name which you want VA to list

In C#, it is the same, when you write keyword 'override' it is not on its final place. Finally it looks like this:
('public' keyword is inserted first):
public override string ToString()
{
  return base.ToString();
}


quote:
All feature should work both in native and managed C++.

'override' keyword is available also in native C++, if you would read that msdn article from previous post, you would know that. At least, MicroSoft's compiler uses it...
But I understand, that 'virtual' keyword would be better, at least for differentiating C++ from C#.

How about not "virtual + <space>", but "virtual + <enter>" to open list? If you are writing new virtual method, usualy you don't press enter after 'virtual' keyword...

Tip1: Don't forget about 'Multiple inheritance' in native C++...

Tip2: "C++/CLI old syntax", "C++/CLI clr" and "native C++", all of those are overriding in different way with different syntax. It would be good to point this out to developers.
accord Posted - Oct 07 2010 : 3:05:39 PM
I meant native C++. All feature should work both in native and managed C++. In addition, when you write override keyword in C++/CLI you have already written down the function name which you want VA to list

However, I think that the best solution would be to list overridable functions after "virtual ". It is so obvious, I don't know why didn't I think of it earlier I have put in a feature request for this to see what the developers make of it:

case=51014

Thank you for pointing this out in C#.
Dusan Posted - Oct 07 2010 : 06:42:52 AM
quote:
Originally posted by accord

in C++ where there is no override keyword.


You are wrong:
http://msdn.microsoft.com/en-us/library/41w3sh1c.aspx


using namespace System;

namespace test 
{
  ref class Base 
  { 
  public: 
    virtual void Foo() {}; 
  };

  ref class Derived : public Base 
  { 
  public: 
    virtual void Foo() override {}; 
  };
}


Now, if you remove 'override' keyword, you will get following error:
Error 1 error C4485: 'test::Derived::Foo' : matches base ref class method 'test::Base::Foo', but is not marked 'new' or 'override'; 'new' (and 'virtual') is assumed ...

Dusan Posted - Oct 07 2010 : 06:28:01 AM
quote:
Originally posted by accord


Of course. But I was thinking about a listbox which lists both, indicating which are the pure virtual functions.


accord, anything would be better than nothing...
accord Posted - Oct 07 2010 : 04:14:42 AM
quote:

if you need only to override one or two methods from remote places in 'override' list of any non-interface class, it is easier to use only override keyword


Yes, but such a keyword doesn't exist in C++. My point was that I would avoid subtle methods to trigger the listbox in C++ where there is no override keyword.
quote:
And ofcorse, interface implementing has nothing to do with overriding..

Of course. But I was thinking about a listbox which lists both, indicating which are the pure virtual functions.
Dusan Posted - Oct 06 2010 : 3:34:26 PM
quote:
Originally posted by accord

...it would be almost the same, wouldn't it?


Not exactly, if you need only to override one or two methods from remote places in 'override' list of any non-interface class, it is easier to use only override keyword, but if you need implement methods of interface (those as you know must be implemented all) then it is faster to implement all at once. And ofcorse, interface implementing has nothing to do with overriding... Anyway, some sort of similar functionality as you described has ClassDiagram in VS, unfortunately also without support for C++/CLI. But there are many many good features (ClassDiagram is biggest part of them) not implemented for C++/CLI users in VS2005 / VS2008 / VS2010...





Regards, Dusan

accord Posted - Oct 06 2010 : 3:01:30 PM
I have put in a feature request about placing an extensions to parse onto the options dialog to see what the developers make of it:

case=50964
accord Posted - Oct 06 2010 : 2:33:00 PM
About 'override' keyword:
Do you think both Interface implementation and the list of overridable method would be required? I am wondering how would you be able to trigger this listbox without using a subtle keyboard shortcut or something like this. If interface implementation could ask which functions to implement (i.e. with checkboxes in the listbox) it would be almost the same, wouldn't it?
Dusan Posted - Oct 06 2010 : 05:41:30 AM
Thanks for fast response again...

Functions are not defined in macros, but are defined in .fdf files. I found solution here on discussion:
http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=4556

Hope this (different extension header issue) will be solved in any future release, because it is really confusing the fact, that I had in 'File handling' options checked 'Parse files without extension as header' and still had to modify registry to get it working... Now I understand, that it stands only for files without any extension and not for all files whose extensions may be different from standard header files extensions. Please add option with 'Additional extensions to parse' ...

Thanks,
with regards, Dusan
accord Posted - Oct 06 2010 : 04:11:50 AM
Thank you for the explanation.
Problem 2: are these funtions declared by macros? Recursive macro parsing is turned off by default:

http://docs.wholetomato.com?W363

Let me know if it doesn't help. In case of macros, the source of the #define would help to understand and reproduce the problem here.

Interface implementation: we are considering doing this at some point:

case=1505
Dusan Posted - Oct 06 2010 : 01:43:29 AM
Hi accord, thanks for response.

About problem 2:
I have it set, but still some functions are not recognized. Are there any rules or known issues when parser fails?

About Interface implementation automation:
If I need to implement any interface in VS2005 C#, all I have to do is to make a class, specify base class, right click on it and then use the 'Implement interface' option. And IDE will generate all needed methods, so it is not on me to investigate any time searching for all possible methods I need to implement to get it working... AFAIK, this does not exist only for C++/CLI world...

Before:


After:


About 'override' keyword:
In VS2005 C#, if I need any function overriden, but don't remember its declaration, I can only write 'override ' and list with all overrides shows, so then is on me only to choose one and press TAB to get it. This also doesn't work for C++/CLI.




Regards, Dusan



accord Posted - Oct 05 2010 : 3:19:30 PM
Regarding ovverride keyword: what do you mean by getting all overrides list?
Implementing interface: what do you mean by automating this?
accord Posted - Oct 05 2010 : 2:34:12 PM
Problem 1 is case=32921

Problem 2: Visual Assist parses directories defined in IDE and project settings. If you want to define additional directories just go to

VAssistX -> Visual Assist X options... -> Projects -> C/C++ Directories

You can learn more about this topic here:
http://www.wholetomato.com/products/features/directories.asp

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