Skip to content

Commit

Permalink
minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
retailcoder committed Oct 5, 2016
1 parent b6171ff commit ccfbfa9
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions RetailCoder.VBE/Refactorings/Rename/RenameRefactoring.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,35 +42,31 @@ public void Refactor()
QualifiedSelection? oldSelection = null;
var pane = _vbe.ActiveCodePane;
var module = pane.CodeModule;
if (!pane.IsWrappingNullReference)
{
if (!pane.IsWrappingNullReference)
{
oldSelection = module.GetQualifiedSelection();
}
oldSelection = module.GetQualifiedSelection();
}

if (_model != null && _model.Declarations != null)
{
Rename();
}
if (_model != null && _model.Declarations != null)
{
Rename();
}

if (oldSelection.HasValue)
{
pane.SetSelection(oldSelection.Value.Selection);
}
if (oldSelection.HasValue)
{
pane.SetSelection(oldSelection.Value.Selection);
}
}

public void Refactor(QualifiedSelection target)
{
var pane = _vbe.ActiveCodePane;
if (pane.IsWrappingNullReference)
{
if (pane.IsWrappingNullReference)
{
return;
}
pane.SetSelection(target.Selection);
Refactor();
return;
}
pane.SetSelection(target.Selection);
Refactor();
}

public void Refactor(Declaration target)
Expand Down

0 comments on commit ccfbfa9

Please sign in to comment.