@@ -42,10 +42,20 @@ public ParseRequestEventArgs(VBComponent component)
4242 public bool IsFullReparseRequest { get { return _component == null ; } }
4343 }
4444
45- public sealed class RubberduckParserState
45+ public class RubberduckStatusMessageEventArgs : EventArgs
4646 {
47- public event EventHandler < ParseRequestEventArgs > ParseRequest ;
47+ private readonly string _message ;
48+
49+ public RubberduckStatusMessageEventArgs ( string message )
50+ {
51+ _message = message ;
52+ }
4853
54+ public string Message { get { return _message ; } }
55+ }
56+
57+ public sealed class RubberduckParserState
58+ {
4959 // circumvents VBIDE API's tendency to return a new instance at every parse, which breaks reference equality checks everywhere
5060 private readonly IDictionary < string , Func < VBProject > > _projects = new Dictionary < string , Func < VBProject > > ( ) ;
5161
@@ -76,6 +86,19 @@ public sealed class RubberduckParserState
7686 private readonly ConcurrentDictionary < QualifiedModuleName , IDictionary < Tuple < string , DeclarationType > , Attributes > > _moduleAttributes =
7787 new ConcurrentDictionary < QualifiedModuleName , IDictionary < Tuple < string , DeclarationType > , Attributes > > ( ) ;
7888
89+ public event EventHandler < ParseRequestEventArgs > ParseRequest ;
90+ public event EventHandler < RubberduckStatusMessageEventArgs > StatusMessageUpdate ;
91+
92+ public void OnStatusMessageUpdate ( string message )
93+ {
94+ var handler = StatusMessageUpdate ;
95+ if ( handler != null )
96+ {
97+ var args = new RubberduckStatusMessageEventArgs ( message ) ;
98+ handler . Invoke ( this , args ) ;
99+ }
100+ }
101+
79102 public void AddProject ( VBProject project )
80103 {
81104 if ( string . IsNullOrEmpty ( project . HelpFile ) )
0 commit comments