Author |
Topic |
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Apr 26 2004 : 2:02:45 PM
|
I've just been puzzled by the way VAX treats namespaces in C# under VS2003.NET. While using Smilla (www.smilla.ru) I've found the following fragment which seems to confuse VAX:
namespace Smilla.Net.NNTPClient
{
// lots of code here ...
} For VAX Smilla does not exist as any recognizable entity, although the whole project is loaded. But the .Net. part is resolved to System.Net when I hover over .Net, look it up in the HCB, etc. VAX completely ignores the namespace and resolves a subspace to something completely different. Namespace resolution seems to be seriously broken. |
|
Nels_P_Olsen
Senior Member
USA
47 Posts |
Posted - Apr 28 2004 : 10:59:51 AM
|
The problem apparently is their "quick" parser, which seems to be just a messy guessing hack. For speed reasons, they use this "quick" parser, which doesn't understand the language semantics, but just grabs the first match it can find in its cache of known symbols.
This is a serious problem under .NET, because many symbols are reused -- your namespace element can be the same as another known namespace, properties and variables can be the same names as classes, enum members can have the same names as methods, events or even keywords, etc.
A lot of this name reuse is in the .NET Framework itself, so it's not just a matter of deciding to avoid it in your own code. VA X essentially fails to deal with this properly. |
- Nels |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Apr 28 2004 : 11:44:47 AM
|
VA has a problem in this case since "Smilla.Net" is not explicitly defined as a namespace, it only sees the whole namespace "Smilla.Net.NNTPClient". We are working on a fix, hope to have it in 1233.
Disabling "Guess symbol..." on the C++ tab of the VA options dialog (I know, this should be on another tab) will prevent VA from guessing at the definition.
If there are other instances where Guessing is a problem, send examples. We will fix them.
|
Whole Tomato Software, Inc. |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Apr 28 2004 : 3:14:33 PM
|
Oops. 1233 is already on its way out the door. We will try for a fix in 1234. |
Whole Tomato Software, Inc. |
Edited by - support on Apr 28 2004 5:26:48 PM |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Apr 28 2004 : 3:26:33 PM
|
See my posts in the other forum. For now, I will turn off guessing for C#. |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Apr 28 2004 : 3:58:39 PM
|
Well, at second thought - how I do this? There is no option for C# or VB. Just for C/C++. If that would be the same, should I enter it as a new bug since its clearly wrong in the UI then? Or, are you planing to make different settings for every language supported? |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Apr 28 2004 : 5:26:18 PM
|
The UI is wrong. The one setting for C/C++, per the UI, actually applies to all languages. We will likely move the option to the General or Completion node. |
Whole Tomato Software, Inc. |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - May 08 2004 : 2:00:54 PM
|
Better support for C# in build 1234.
Moved "Prefer default Intellisense" to Completion node in build 1235. |
Whole Tomato Software, Inc. |
Edited by - support on May 08 2004 3:39:41 PM |
|
|
|
Topic |
|