Changeset 2213


Ignore:
Timestamp:
Jan 11, 2013, 2:58:49 AM (10 years ago)
Author:
sam
Message:

vslol: fix an infinite recursion triggered by IntelliSense.

Location:
trunk/tools/vslol
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/vslol/CppKeywordClassifier.cs

    r2131 r2213  
    22// Lol Engine - VsLol add-in for Visual Studio
    33//
    4 // Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    1515using System.Windows.Media;
    1616using System.Text.RegularExpressions;
     17using System.Diagnostics; /* For debugging purposes */
    1718
    1819using Microsoft.VisualStudio.Text;
     
    6061{
    6162    private IClassifier m_classifier;
     63    private bool m_inprogress;
    6264
    6365    private IClassificationType m_types_type, m_constant_type, m_normal_type;
     
    138140    {
    139141        m_classifier = classifier;
     142        m_inprogress = false;
    140143
    141144        m_types_type = registry.GetClassificationType("LolAnyType");
     
    177180    {
    178181        List<ClassificationSpan> ret = new List<ClassificationSpan>();
     182
     183        if (m_inprogress)
     184        {
     185            /* For some reason we can get called recursively when parsing a
     186             * string for the IntelliSense drop-down menu. There is information
     187             * on how to deal with it properly on the following SO page:
     188             * http://stackoverflow.com/q/3155598/111461
     189             * The crash can be reproduced by simply typing "vec2(" and waiting
     190             * for IntelliSense to spawn the menu. */
     191            ret.Add(new ClassificationSpan(span, m_constant_type));
     192            return ret;
     193        }
     194
     195        m_inprogress = true;
    179196
    180197        foreach (ClassificationSpan cs in m_classifier.GetClassificationSpans(span))
     
    207224        }
    208225
     226        m_inprogress = false;
     227
    209228        return ret;
    210229    }
  • trunk/tools/vslol/Properties/AssemblyInfo.cs

    r2129 r2213  
    22// Lol Engine - VsLol add-in for Visual Studio
    33//
    4 // Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    1818[assembly: AssemblyCompany("Lol")]
    1919[assembly: AssemblyProduct("VsLol")]
    20 [assembly: AssemblyCopyright("Copyright © Sam Hocevar 2012")]
     20[assembly: AssemblyCopyright("Copyright © 2012-2013 Sam Hocevar")]
    2121[assembly: AssemblyTrademark("")]
    2222[assembly: AssemblyCulture("")]
     
    3030[assembly: Guid("58968f91-edb8-4a4c-9f4f-ba39fdb4a21a")]
    3131
    32 [assembly: AssemblyVersion("1.0.0.7")]
    33 [assembly: AssemblyFileVersion("1.0.0.7")]
     32[assembly: AssemblyVersion("1.0.0.8")]
     33[assembly: AssemblyFileVersion("1.0.0.8")]
  • trunk/tools/vslol/source.extension.vsixmanifest

    r2129 r2213  
    44    <Name>VsLol</Name>
    55    <Author>Lol</Author>
    6     <Version>1.0.0.7</Version>
     6    <Version>1.0.0.8</Version>
    77    <Description xml:space="preserve">Lol Engine Productivity Tools.</Description>
    88    <Locale>1033</Locale>
Note: See TracChangeset for help on using the changeset viewer.