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
 Spell checker bugs.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

zebop117
New Member

9 Posts

Posted - Jul 08 2009 :  9:14:32 PM  Show Profile  Reply with Quote
Spell checker's GUI is a huge mess as well.

VA's system info:
VA_X.dll file version 10.5.1724.0 built 2009.05.01
DevEnv.exe version 9.0.30729.1
msenv.dll version 9.0.30729.1
Font: Courier New 13(Pixels)
Comctl32.dll version 6.0.3790.2725
Windows Server 2003 5.2 Build 3790 S
Single processor (x86)
Platform: Win32



1. Create a new text file (File -> New -> File -> General -> Text File), type a word that is not in dictionary (e.g. "Zsli" without quotes), and run spell checking (VAssistX -> Tools -> Spell Check):


The bug is: spell checking starts not at the first character in file, but at the second one.




2. Create a new text file that contains a space followed by two words that differ only by the case of the first letter (e.g. " Zsli zsli" without quotes). The words must not be in dictionary:


  1. Run spell checking. Spell checker dialog opens with the word "Zsli" selected:

  2. Change the word "Zsli" to "zsli" in edit box and press "Add" button:

  3. Spell checker goes to a next word and selects "zsli":


    WTF? I was sure I just added the word "zsli" to dictionary in step 2.

The bug is: spell checker adds to dictionary a word that is currently selected in source file, but not a word that is typed in edit box. Instead, it should do the opposite: it is a word that is in edit box that spell checker should add to dictionary, but not a word that is currently selected in source file. After all, spell checking is case-insensitive, so I don't want two words in my dictionary which differ only by their case - I have a better use for my CPU, RAM and HDD space. 8-)




3. Create new text file and type " Xsli" without quotes (notice a space in front of the word). Again, the word must not be in dictionary:


  1. Run spell checking. Spell checker dialog opens with word "Xsli" selected:

  2. Change the word "Xsli" to "Asli" in edit box and press "Change" button:

  3. Spell checker changes "Xsli to "Asli" and finishes its work.


    Ooopy! I just made a typo: that word should be "Zsli" - not "Asli".

The bug is: spell checker should check a new word after it replaced an old one with the "Change" button. That way either the new word would get added to dictionary in current spell checking round (if I spelled it correctly before pressing the "Change" button, then I add it with the "Add" button right there), or I replace it with a correct spelling. Instead, now I have to run spell checking again: either to add a new word to dictionary, or to replace it with a correct spelling.




4. Create a new text file.

  1. Type " Xsli" without quotes (notice a space in front of the word). The word must not be in dictionary:


    Undo:


    Redo:


  2. Type " zxcvb" without quotes (notice a space in front of the word). The word must not be in dictionary:


    Undo:


    Redo:


  3. Type " qwert" without quotes (notice a space in front of the word). The word must not be in dictionary:


    Now there are 3 actions in editor's undo buffer:


  4. Undo some of the actions with the "Undo" button on the "Standard" toolbar (NOT by pressing Ctrl+Z and NOT by selecting "Edit -> Undo" menu item). Number of actions doesn't matter. In this example I undo 2 actions:


  5. Run spell checking. Spell checker dialog opens with the first word ("Xsli") selected:


  6. Click the "Ignore" button. Spell checker goes to the "next" word ("zxcvb"):


  7. Click the "Ignore" button. Spell checker goes to the "next" word ("qwert"):


  8. Click the "Ignore" button. Spell checker finishes its work.


The bug is: spell checker does not see changes made with the "Undo" and "Redo" toolbar buttons until editor loses input focus (sometimes you have to wait a few seconds until any of enabled toolbar buttons (e.g. Cut, Copy, Paste, Undo or Redo) get disabled). It sees, however, changes made by pressing Ctrl+Z and Ctrl+Y, and by selecting "Edit -> Undo" and "Edit -> Redo" menu items.

Edited by - zebop117 on Jul 08 2009 9:18:01 PM

feline
Whole Tomato Software

United Kingdom
18948 Posts

Posted - Jul 11 2009 :  3:56:51 PM  Show Profile  Reply with Quote
Point 1, with the very first character in the file being ignored is:

case=29483

Point 2, I would expect the Add button to add the word that is selected in the file, since the word you have typed into the dialog might be some random variation of the word in the file, since you are trying to find the correct spelling by searching through the dictionary file.

Point 3, this depends on how point 2 is supposed to work. I understand your point, but what you describe is what I personally expected, based on how I expected point 2 to work.

Point 4, can you try installing VA 1727 and see if this makes any difference? It took me a couple of goes to get my head around this, but I see what you are doing now. I have tried in both VS2005 and VS2008 and I cannot reproduce this problem. The spell check dialog stops at the visible text in the file for me.

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

zebop117
New Member

9 Posts

Posted - Jul 11 2009 :  6:52:36 PM  Show Profile  Reply with Quote
Just installed 1727 and see the same behaviour for point 4. Are you sure you used the "Undo" toolbar button for undo AND did not remove focus from the editor before running spell checking? It's essential. Here are just raw keystrokes that may help to reproduce:
1) " Xsli" without quotes.
2) Ctrl+Z (i.e. Undo), Ctrl+Y (i.e. Redo).
3) " zxcvb" without quotes.
4) Ctrl+Z, Ctrl+Y.
5) " qwert" without quotes.
6) Now, click "Undo" toolbar button twice, so that the words " qwert" and " zxcvb" are undone.
7) Alt+X, T, C (run spell checking).

Here's captured video of how I do it:
1) youtube: http://www.youtube.com/watch?v=iXx2aqlJeJU
2) rapidshare: http://rapidshare.com/files/254750200/vax_spell_4.avi.html

Point 3 is not related to point 2 in my opinion. Point 2 is about what to add to dictionary with the "Add" button, and point 3 is about rechecking (let's call it "recursive checking") of newly replaced word.

VA_X.dll file version 10.5.1727.0 built 2009.06.12
DevEnv.exe version 9.0.30729.1
msenv.dll version 9.0.30729.1
Font: Courier New 13(Pixels)
Comctl32.dll version 6.0.3790.2725
Windows Server 2003 5.2 Build 3790 S
Single processor (x86)
Platform: Win32

Edited by - zebop117 on Jul 11 2009 7:38:10 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18948 Posts

Posted - Jul 13 2009 :  2:35:27 PM  Show Profile  Reply with Quote
Point 4, the moves show you using the toolbar buttons to undo and redo while typing, which I have also tried, and I still cannot reproduce this problem.

The effect is very clear in the movies, but there is obviously some key difference at work here, since so far I cannot reproduce. Are you testing with a solution open or with no open solution? I am testing with an open solution.

Do you have any other IDE plugin's installed or any utilities running that might be hooking into mouse or keyboard actions?


Point 3, in order to pick a new word to replace the selected word you have to type the word into the dialog. As you are typing into the dialog the matching word list updates to show you the best guess in the dictionary. If the word you have typed is not in the dictionary then this is clear from the word list you are getting.

I am always using and relying on spell checkers, and this is the behaviour I expect and look for. If I specifically use this dialog to enter a word that is not in the dictionary into my file I don't want VA to instantly tell me its not in the dictionary, I already know this. At least this is how I am approaching this.

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

zebop117
New Member

9 Posts

Posted - Jul 13 2009 :  6:25:02 PM  Show Profile  Reply with Quote
I have VS 2008 SP1 without any plugins except VA. As for hooking, I have Agnitum Outpost - it installs some hooks (not sure if they are related to keyboard or mouse) as far as I know: at every debug session in VS I see Outpost's wl_hook.dll loading even when Outpost itself is not running.

I was testing without solution open. Tested with a C++ solution open and could not reproduce. I guess this is the difference.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18948 Posts

Posted - Jul 14 2009 :  12:14:40 PM  Show Profile  Reply with Quote
I still cannot reproduce this, even if I just load VS2008 and create a new text file without first opening a solution.

Can you please go to IDE Help menu -> About -> Copy Info

and paste the text into your reply. I am only interested in the first section, the version number of VS2008 you are using.

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

zebop117
New Member

9 Posts

Posted - Jul 14 2009 :  12:49:47 PM  Show Profile  Reply with Quote
It's VS 2008 SP1.

Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1

Installed Edition: Enterprise

Microsoft Visual C# 2008
Microsoft Visual C++ 2008
Microsoft Visual Studio 2008 Tools for Office
Microsoft Visual Studio Team System 2008 Architecture Edition
Microsoft Visual Studio Team System 2008 Database Edition
Microsoft Visual Studio Team System 2008 Development Edition
Microsoft Visual Studio Team System 2008 Test Edition
Microsoft Visual Web Developer 2008
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB944899) KB944899
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB945282) KB945282
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB946040) KB946040
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB946308) KB946308
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB946344) KB946344
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB946581) KB946581
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB946673) KB946673
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB947171) KB947171
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB947173) KB947173
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB947180) KB947180
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB947540) KB947540
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB947789) KB947789
Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB948127) KB948127
Microsoft Visual Studio Team System 2008 Team Suite - ENU Service Pack 1 (KB945140) KB945140
Microsoft Visual Studio Team System 2008 Team Suite - ENU Service Pack 1 (KB947888) KB947888
Microsoft Visual Studio Team System 2008 Team Suite - ENU Service Pack 1 (KB948560) KB948560
Visual Assist X
Visual Studio Package Load Analyzer 1.0
VMDebugger
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18948 Posts

Posted - Jul 14 2009 :  4:03:47 PM  Show Profile  Reply with Quote
*sigh* still no progress, I am using the same IDE version as you, but I still cannot reproduce this problem.

Is opening a solution before editing text files a suitable work around?

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

zebop117
New Member

9 Posts

Posted - Jul 14 2009 :  9:50:25 PM  Show Profile  Reply with Quote
So be it. After all, VA is not a word processor. :)

There's one more issue: I believe spell checker should not check:
1) doc-tags (like @param, @tparam, etc.),
2) markup tags (like <br />, <tr />, etc.),
3) symbols defined in source code (like class or namespace names).

I can work around point 1 by adding all the doc-tags to my dictionary (after all, their names are more or less unique, and the name set is finite and not so big). I can work around point 3 by pressing the "Ignore All" button (which is not a good idea though: if spell checker will ignore all instances of class name "CaseMapping", then it will ignore a missing space in "...with respect to a casemapping used on server."). But I cannot (well, I can, but really would not want to) work around point 2: html tags are too short to be unambiguous candidates either for adding them to dictionary or for ignoring them. E.g. "br" could be either an HTML tag or a typo for "be".
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18948 Posts

Posted - Jul 15 2009 :  10:54:30 AM  Show Profile  Reply with Quote
Point 1, is this inside comments in code files?
If so then adding these to the custom keywords list is probably the correct solution. Certainly us trying to ship a predefined list of "magic" words you will use in comments is not going to work very well, since different people use different systems for keywords in comments.

Point 2, can you post an example. I am not seeing VA underline tags in a HTML file in VS2008. The IDE is underlining a couple of tags, but this is because it thinks there are problems in the file, and its underlines are a different colour to VA's spelling error underlines.

Point 3, I don't understand. VA does not spell check source code. If your source code is being underlined by VA then it is a parser problem, not a spell checking problem.

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

zebop117
New Member

9 Posts

Posted - Jul 16 2009 :  11:49:05 AM  Show Profile  Reply with Quote
Yes, point 1 is about comments in code files, as are other points.

Here are two examples for point 2:
  1. VA do underline words not in dictionary.


  2. VA doesn't underline words not in dictionary.




In both cases spell checker selects "br" twice:

  1. -?


  2. -?





Point 3 was about checking symbol names in comments, like:

class CaseMapping {};

// Here, the word "CaseMapping" must not be selected
// by spell checker because it's a symbol defined in
// source code.

I could not reproduce that. But, trying to reproduce, I found two minor issues.

  1. Spell checker checks value of HTML tag attributes when they are in double quotes, but not when they are in single quotes. Not a big deal, yet I'd prefer spell checker not to check them in any case.
    
    // checked here: <a name="XsliDescription">
    // skipped here: <a name='XsliDescription'>
    


  2. This one seems weird. Sometimes spell checker misses a word (or falsely selects a word - it depends on what it's really supposed to do). My best attempt to formalize the issue looks like this:
    quote:

    If a word is typed in CamelCase (looks like a class name, but is NOT a class name defined in source files), and that word is not followed either by 1) one or more spaces followed by any symbol except angle "<>" or square "[]" brackets, or 2) \\r\\n, then spell checker misses it.


    In the examples below missed instances of the word "XsliDescription" are marked with red and checked instances are marked with blue:
    
    // 1 - skipped, 2 - checked, 3 - skipped, 4 - skipped.
    // XsliDescription <a name="XsliDescription">XsliDescription</a> XsliDescription.
    
    // 1 - skipped, 2 - checked, 3 - skipped, 4 - skipped.
    // XsliDescription [a name="XsliDescription"]XsliDescription[/a] XsliDescription.
    
    // Removing the dot after last "XsliDescription", so it's now followed by \\r\\n.
    // 1 - skipped, 2 - checked, 3 - skipped, 4 - checked.
    // XsliDescription <a name="XsliDescription">XsliDescription</a> XsliDescription
    
    // Adding ":" (a colon) after first "XsliDescription".
    // 1 - skipped, 2 - checked, 3 - skipped, 4 - skipped.
    // XsliDescription: <a name="XsliDescription">XsliDescription</a> XsliDescription.
    
    // Adding " " (a space) after first "XsliDescription", so there are two spaces after it.
    // 1 - skipped, 2 - checked, 3 - skipped, 4 - skipped.
    // XsliDescription  <a name="XsliDescription">XsliDescription</a> XsliDescription.
    
    // Adding " :" (a space followed by a colon) after first "XsliDescription".
    // 1 - checked, 2 - checked, 3 - skipped, 4 - skipped.
    // XsliDescription :<a name="XsliDescription">XsliDescription</a> XsliDescription.
    



Edited by - zebop117 on Jul 16 2009 11:53:53 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18948 Posts

Posted - Jul 16 2009 :  12:28:47 PM  Show Profile  Reply with Quote
Before I start digging into this, why should HTML tags be a factor at all here? You are showing me C++ comments. Since these are free text comments they are clearly not HTML. Now they might be valid HTML, but there is no requirement for them to be, and no reason why VA should treat them as such.

If this was C# and XML format comments then it might be a bit different, since there is an expectation that these XML comments are "well formed", but that does not apply in C++.

If you start with the assumption that "this is HTML code" and I start with the assumption "this is free text English" then we are going to be talking at cross purposes

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

zebop117
New Member

9 Posts

Posted - Jul 16 2009 :  4:18:48 PM  Show Profile  Reply with Quote
I'm showing you documentation comments. The fact you didn't see them before (or don't use them) doesn't change the reality: they are used world-wide. I used HTML tags in them just as an example. Replace them with XML tags and nothing changes: spell checker will check them in exactly the same dumb way.

C#:


C++:



Well-formedness and validity of markup tags (be it HTML, XML, or whatever) has nothing to do with spell checking. Spell checker doesn't need a well-formed (let alone a valid) tag to detect where it ends: it only needs to find a matching closing angle bracket, be it a well-formed tag like <br />, or not well-formed like <br>. If spell checker doesn't undestand doc-tags, then tag names, tag attribute names and tag attribute values should not be checked at all because they are not "free text". Period. There are not so many "mainstream" doc-tag styles for it to be hard to support them in spell checker:
1) javadoc: doc-tags start with '@', HTML allowed. Comment style: /** */
2) doxygen: doc-tags start with '@' or '\\', HTML allowed. Comment styles: /** */, //!, ///
3) ms: doc-tags are XML tags. Comment style: ///

I personally don't give a **** whether you'll fix it or not: I just reported crap I found, so I'm done with this topic.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18948 Posts

Posted - Jul 17 2009 :  12:26:08 PM  Show Profile  Reply with Quote
I am sorry you feel this way. I am trying to get to the bottom of what is going on here. Consider this C++ comment:

// Checking a < b and also need to worry about b > c

because this is in "free text" there is nothing wrong with this at all. Yet because it contains angle brackets it "looks like HTML". I am trying to get to the bottom of what is going on here, so we can try to move forward sensibly.

C# XML comment lines start with /// so they can be distinguished from // comment lines. The IDE actually defines two different syntax colours for these two comment types, helping to enforce this distinction.

Doxygen formatted comments are widely used, but often people / organisations have their own internal standards for how comments should look and appear.

I am all in favour of fixing bugs in the spell checker, but I need to understand how to reproduce the problems to start with. Excluding certain words from being spell checked because the comments are "well formed HTML" requires that we first decide if the comments qualify as HTML or not.

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

zebop117
New Member

9 Posts

Posted - Jul 18 2009 :  04:50:29 AM  Show Profile  Reply with Quote
In most (if not all) cases there is a special syntax for documentation comments, like an additional symbol after the beginning of a plain language comment. For C++ and doxygen the syntax is (points 1 and 2 are applicable for C# as well):
1) /** */ - first asterisk is doubled.
2) /// - added a slash.
3) //! - added an exclamation mark.
4) //< - added an opening angle bracket (forgot to mention this one in my previous message).

So, considering the special syntax rule, the comment you showed is a plain "free text" comment, but not a documentation comment. But even it would be a documentation comment (let's assume it starts with, say, a triple slash "///"), the opening angle bracket could not be interpreted as a beginning of an HTML tag because there must be no whitespace between the opening angle bracket and "b" for it to be a well-formed HTML. So, the comment doesn't contain HTML either.

I just though: comments in my examples, by not looking like doc-comments, could mislead you - I'm sorry for that, I just wanted examples to be as simple as they could be, so I replaced doxygen-style comments with plain C++ ones. The original ones were "//!".
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18948 Posts

Posted - Jul 20 2009 :  4:17:45 PM  Show Profile  Reply with Quote
Currently we do not attempt to support Doxygen comments, and I am wary of trying to introduce special case handling for Doxygen comments in the spell checker, since this is the thin end of the wedge for supporting structured comments in general. People will start to want us to refactor them as if they were normal code.

I am not sure about not spell checking inside HTML tags / attributes in comments. I can see arguments for and against this.

Going back a couple of posts, to your list of examples of problem comments, only one of those fails for me:

// xslidescription <a name="xslidescription">xslidescription</a> xslidescription

if you remove "a" from the closing tag then the final spelling error is fixed. Note I have made "xslidescription" all lower case. See the "Commented Code" section here:

http://www.wholetomato.com/products/features/misspelled.asp

I am not sure why this breaks like this, but it does:

case=29867

I am also seeing the problem with an attribute wrapped in double quotes vs single quotes:

case=29868

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

support
Whole Tomato Software

5566 Posts

Posted - Aug 04 2010 :  5:51:15 PM  Show Profile  Reply with Quote
case=29867 is fixed in build 1829

Whole Tomato Software, Inc.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000