Skip to content

Commit f15cf4e

Browse files
committed
Merge pull request #95 from rubberduck-vba/next
sync with main repo
2 parents 45c6181 + 4522d57 commit f15cf4e

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

RetailCoder.VBE/UI/RubberduckUI.de.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,4 +1558,7 @@ Allen Sternguckern, Likern & Followern, für das warme Kribbeln
15581558
<data name="CodeExplorer_Commit" xml:space="preserve">
15591559
<value>Commit...</value>
15601560
</data>
1561+
<data name="TestOutcome_Ignored" xml:space="preserve">
1562+
<value>Ingoriert</value>
1563+
</data>
15611564
</root>

Rubberduck.Parsing/VBA/ModuleState.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public class ModuleState
2222
public SyntaxErrorException ModuleException { get; private set; }
2323
public IDictionary<Tuple<string, DeclarationType>, Attributes> ModuleAttributes { get; private set; }
2424

25+
public bool IsNew { get; private set; }
26+
2527
public ModuleState(ConcurrentDictionary<Declaration, byte> declarations)
2628
{
2729
Declarations = declarations;
@@ -42,6 +44,8 @@ public ModuleState(ConcurrentDictionary<Declaration, byte> declarations)
4244
Annotations = new List<IAnnotation>();
4345
ModuleException = null;
4446
ModuleAttributes = new Dictionary<Tuple<string, DeclarationType>, Attributes>();
47+
48+
IsNew = true;
4549
}
4650

4751
public ModuleState(ParserState state)
@@ -55,6 +59,8 @@ public ModuleState(ParserState state)
5559
Annotations = new List<IAnnotation>();
5660
ModuleException = null;
5761
ModuleAttributes = new Dictionary<Tuple<string, DeclarationType>, Attributes>();
62+
63+
IsNew = true;
5864
}
5965

6066
public ModuleState(SyntaxErrorException moduleException)
@@ -68,6 +74,8 @@ public ModuleState(SyntaxErrorException moduleException)
6874
Annotations = new List<IAnnotation>();
6975
ModuleException = moduleException;
7076
ModuleAttributes = new Dictionary<Tuple<string, DeclarationType>, Attributes>();
77+
78+
IsNew = true;
7179
}
7280

7381
public ModuleState(IDictionary<Tuple<string, DeclarationType>, Attributes> moduleAttributes)
@@ -81,6 +89,8 @@ public ModuleState(IDictionary<Tuple<string, DeclarationType>, Attributes> modul
8189
Annotations = new List<IAnnotation>();
8290
ModuleException = null;
8391
ModuleAttributes = moduleAttributes;
92+
93+
IsNew = true;
8494
}
8595

8696
public ModuleState SetTokenStream(ITokenStream tokenStream)
@@ -104,6 +114,7 @@ public ModuleState SetState(ParserState state)
104114
public ModuleState SetModuleContentHashCode(int moduleContentHashCode)
105115
{
106116
ModuleContentHashCode = moduleContentHashCode;
117+
IsNew = false;
107118
return this;
108119
}
109120

Rubberduck.Parsing/VBA/RubberduckParserState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ public bool IsNewOrModified(QualifiedModuleName key)
586586
if (_moduleStates.TryGetValue(key, out moduleState))
587587
{
588588
// existing/modified
589-
return key.ContentHashCode != moduleState.ModuleContentHashCode;
589+
return moduleState.IsNew || key.ContentHashCode != moduleState.ModuleContentHashCode;
590590
}
591591

592592
// new

0 commit comments

Comments
 (0)