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
 Getting alternate header extensions to work
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

weshunt
Junior Member

USA
23 Posts

Posted - Jan 12 2005 :  5:19:10 PM  Show Profile
[I'm using VAX 1287 with .NET 2003]

I've read the FAQ on getting alternate header extensions to work properly, but after applying the suggested registry keys, they don't seem to be fully functional like a .h file (my files are .i). It definitely made a difference (there is at least SOME syntax highlighting now), but it's not identical to a .h file:

  • I get enhanced syntax highlighting

  • I can use Goto Implementation on a symbol


However, some important things don't react the same way as a .h file:

  • Most importantly, the symbol parser does not seem to recognize the pure virtual interfaces declared in these .i files

  • the context field is not present on any .i files (so I can't list methods in current file, etc)

  • Goto implementation on #include statements only sporatically works


It's sort of weird. Every other symbol in the file is recognized and highlighted appropriately. but the class name is not. Therefore, I cannot ever use VAX when manipulating an interface, since it never understands the symbol. Is there a way to make my .i files work just like .h files?

Thanks,
-Wes

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jan 16 2005 :  5:48:35 PM  Show Profile
i have confirmed that something is odd. using a small .NET 2003 project i have copied one of my .h files to a .i file. i then added this to the project, and went through the steps in the FAQ to tell VAX to recognise this as a header file.

the files are identical in content, to simplify things.

there is no VAX wizard bar in the .i file, and local class members are not shown in bold in the .i file.

when i type { in the .h file the closing bracket is automatically inserted, but this does not happen in the .i file.

i will ask support. it could simply be a missing step in the FAQ, or this could be a bug in VAX.

zen is the art of being at one with the two'ness
Go to Top of Page

weshunt
Junior Member

USA
23 Posts

Posted - Sep 13 2005 :  11:13:26 AM  Show Profile
quote:
Originally posted by feline

i have confirmed that something is odd. using a small .NET 2003 project i have copied one of my .h files to a .i file. i then added this to the project, and went through the steps in the FAQ to tell VAX to recognise this as a header file.



I'm still having this problem with 1422. Is there any info from support on whether the steps to add .i files are wrong, or if there's any other way to get VAX to recognize alternate extensions as headers?

Thanks,
Wes

PS - here is a very simple console app that reproduces the problem:

-- Interface.i --

class IInterface { public:
  static IInterface* Get() {return 0;}
  virtual void Foo() = 0;
  virtual void Bar() = 0;
};

-- Interface.h --

#include "Interface.i"
class Interface : public IInterface { public:
  virtual void Foo() {}
  virtual void Bar() {}
};

-- main.cpp --

#include "Interface.h"
int main() {
  // IInterface doesn't get any intellisense
  IInterface::Get()->Foo(); return 0;
}

Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 13 2005 :  8:14:32 PM  Show Profile
I've just tested this with 1422 and vs2003.

Here are the steps I followed:
Used Regedit to clone HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.1\\Languages\\File Extensions.cpp to a like entry that ends in your extension

use Regedit to add the extension to HKEY_CURRENT_USER/Software/Whole Tomato/Visual Assist X/VANet/ExtHeader. Remember to include the dot. Make sure to terminate with semi-colon also.


I skipped these steps:
In Microsoft Visual Studio .NET, add your extension to Tools|Options|Projects|VC++ Build|C/C++ File Extensions. (since the .i extension is not 'buildable')

If your extension denotes a source file that is not a header, add the extension to HKEY_CURRENT_USER/Software/Whole Tomato/Visual Assist X/VANet/ExtSource. Remember the semicolon. (since .i is a header)

Press Rebuild on the Performance tab of the Visual Assist X options dialog and restart your IDE. (since I don't have stable directories with .i files)


I'll update the FAQ with the part in bold that I added above. Without the semicolon, I get the odd behavior you guys are seeing.
Go to Top of Page

weshunt
Junior Member

USA
23 Posts

Posted - Sep 14 2005 :  12:54:38 AM  Show Profile
Excellent! Adding the semicolon did it! Since this thread is quite old, I can't verify what steps I took originally (heck, I had an entirely different machine then), but I'm willing to bet I didn't add the semicolon. Not sure why that wouldn't have occured to me if the ending semicolon was already there... Regardless, that did the trick!

Man, it's so nice to have all of our .i files parsing finally! I can't believe I was so close for so long...

Thanks a lot!
-Wes
Go to Top of Page
  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