Skip to content

Commit fad090d

Browse files
committed
added debugging declarations in ExtractInterfaceRefactoring, added Pending state.
1 parent 3f33701 commit fad090d

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

RetailCoder.VBE/Refactorings/ExtractInterface/ExtractInterfaceRefactoring.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ private void _state_StateChanged(object sender, EventArgs e)
8282
return;
8383
}
8484

85+
var declarations = _state.AllDeclarations.Where(d => !d.IsBuiltIn).ToList();
86+
8587
var qualifiedSelection = new QualifiedSelection(_model.TargetDeclaration.QualifiedSelection.QualifiedName, new Selection(_insertionLine, 1, _insertionLine, 1));
8688
_editor.SetSelection(qualifiedSelection);
8789

Rubberduck.Parsing/VBA/ParserState.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ namespace Rubberduck.Parsing.VBA
22
{
33
public enum ParserState
44
{
5+
/// <summary>
6+
/// Parse was requested but hasn't started yet.
7+
/// </summary>
8+
Pending,
59
/// <summary>
610
/// Parser state is in sync with the actual code in the VBE.
711
/// </summary>

Rubberduck.Parsing/VBA/RubberduckParser.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,13 @@ private CancellationTokenSource RenewTokenSource(VBComponent component)
7878
private void ParseAll()
7979
{
8080
var components = _vbe.VBProjects.Cast<VBProject>()
81-
.SelectMany(project => project.VBComponents.Cast<VBComponent>());
81+
.SelectMany(project => project.VBComponents.Cast<VBComponent>())
82+
.ToList();
83+
84+
foreach (var vbComponent in components)
85+
{
86+
_state.SetModuleState(vbComponent, ParserState.Pending);
87+
}
8288

8389
var result = Parallel.ForEach(components, component => { ParseComponentAsync(component, false); });
8490

0 commit comments

Comments
 (0)