Skip to content

Commit 344c711

Browse files
committed
removed Git conflict markers
1 parent 75424d1 commit 344c711

File tree

2 files changed

+1
-47
lines changed

2 files changed

+1
-47
lines changed

RetailCoder.VBE/Inspections/QuickFixes/AssignedByValParameterMakeLocalCopyQuickFix.cs

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,18 @@ public class AssignedByValParameterMakeLocalCopyQuickFix : QuickFixBase
1818
{
1919
private readonly Declaration _target;
2020
private readonly IAssignedByValParameterQuickFixDialogFactory _dialogFactory;
21-
//<<<<<<< HEAD
2221
private readonly RubberduckParserState _parserState;
23-
// private string[] _variableNamesAccessibleToProcedureContext;
24-
//=======
2522
private readonly IEnumerable<string> _forbiddenNames;
26-
//>>>>>>> rubberduck-vba/next
2723
private string _localCopyVariableName;
2824

2925
public AssignedByValParameterMakeLocalCopyQuickFix(Declaration target, QualifiedSelection selection, RubberduckParserState parserState, IAssignedByValParameterQuickFixDialogFactory dialogFactory)
3026
: base(target.Context, selection, InspectionsUI.AssignedByValParameterMakeLocalCopyQuickFix)
3127
{
3228
_target = target;
3329
_dialogFactory = dialogFactory;
34-
//<<<<<<< HEAD
3530
_parserState = parserState;
36-
//_variableNamesAccessibleToProcedureContext = GetUserDefinedNamesAccessibleToProcedureContext(_target.Context.Parent.Parent);
37-
//SetValidLocalCopyVariableNameSuggestion();
38-
//=======
3931
_forbiddenNames = GetIdentifierNamesAccessibleToProcedureContext(target.Context.Parent.Parent);
4032
_localCopyVariableName = ComputeSuggestedName();
41-
//>>>>>>> rubberduck-vba/next
4233
}
4334

4435
public override bool CanFixInModule { get { return false; } }
@@ -108,16 +99,12 @@ private void ReplaceAssignedByValParameterReferences()
10899

109100
private void InsertLocalVariableDeclarationAndAssignment()
110101
{
111-
//<<<<<<< HEAD
112-
//var blocks = QuickFixHelper.GetBlockStmtContexts(_target.Context.Parent.Parent);
113-
//=======
114102
var block = QuickFixHelper.GetBlockStmtContexts(_target.Context.Parent.Parent).FirstOrDefault();
115103
if (block == null)
116104
{
117105
return;
118106
}
119107

120-
//>>>>>>> rubberduck-vba/next
121108
string[] lines = { BuildLocalCopyDeclaration(), BuildLocalCopyAssignment() };
122109
var module = Selection.QualifiedName.Component.CodeModule;
123110
module.InsertLines(block.Start.Line, lines);
@@ -134,11 +121,7 @@ private string BuildLocalCopyAssignment()
134121
+ _localCopyVariableName + " = " + _target.IdentifierName;
135122
}
136123

137-
//<<<<<<< HEAD
138-
// private string[] GetUserDefinedNamesAccessibleToProcedureContext(RuleContext ruleContext)
139-
//=======
140124
private IEnumerable<string> GetIdentifierNamesAccessibleToProcedureContext(RuleContext ruleContext)
141-
//>>>>>>> rubberduck-vba/next
142125
{
143126
var allIdentifiers = new HashSet<string>();
144127

@@ -180,7 +163,6 @@ private IEnumerable<string> GetIdentifierNamesAccessibleToProcedureContext(RuleC
180163
return allIdentifiers.ToArray();
181164
}
182165

183-
//<<<<<<< HEAD
184166
private HashSet<string> GetVariableNamesFromRuleContexts(RuleContext[] ruleContexts)
185167
{
186168
var tokenValues = typeof(Tokens).GetFields().Select(item => item.GetValue(null)).Cast<string>().Select(item => item);
@@ -203,50 +185,26 @@ private HashSet<RuleContext> GetIdentifierContexts(IReadOnlyList<RuleContext> ru
203185
foreach (RuleContext ruleContext in ruleContexts)
204186
{
205187
var identifiersForThisContext = GetIdentifierContexts(ruleContext);
206-
//=======
207-
// private IEnumerable<string> GetIdentifierNames(IEnumerable<RuleContext> ruleContexts)
208-
// {
209-
// var identifiers = new HashSet<string>();
210-
// foreach (var identifiersForThisContext in ruleContexts.Select(GetIdentifierNames))
211-
// {
212-
//>>>>>>> rubberduck-vba/next
213188
identifiers.UnionWith(identifiersForThisContext);
214189
}
215190
return identifiers;
216191
}
217192

218-
//<<<<<<< HEAD
219193
private HashSet<RuleContext> GetIdentifierContexts(RuleContext ruleContext)
220-
//=======
221-
// private static HashSet<string> GetIdentifierNames(RuleContext ruleContext)
222-
//>>>>>>> rubberduck-vba/next
223194
{
224195
// note: this looks like something that's already handled somewhere else...
225196

226197
//Recursively work through the tree to get all IdentifierContexts
227-
//<<<<<<< HEAD
228198
var results = new HashSet<RuleContext>();
229-
//=======
230-
// var results = new HashSet<string>();
231-
// var tokenValues = typeof(Tokens).GetFields().Select(item => item.GetValue(null)).Cast<string>().Select(item => item).ToArray();
232-
//>>>>>>> rubberduck-vba/next
233199
var children = GetChildren(ruleContext);
234200

235201
foreach (var child in children)
236202
{
237203
var context = child as VBAParser.IdentifierContext;
238204
if (context != null)
239205
{
240-
//<<<<<<< HEAD
241-
var childName = Identifier.GetName((VBAParser.IdentifierContext)child);
206+
//var childName = Identifier.GetName((VBAParser.IdentifierContext)child);
242207
results.Add((RuleContext)child);
243-
//=======
244-
// var childName = Identifier.GetName(context);
245-
// if (!tokenValues.Contains(childName))
246-
// {
247-
// results.Add(childName);
248-
// }
249-
//>>>>>>> rubberduck-vba/next
250208
}
251209
else
252210
{

RetailCoder.VBE/Inspections/Results/AssignedByValParameterInspectionResult.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ namespace Rubberduck.Inspections.Results
1212
public class AssignedByValParameterInspectionResult : InspectionResultBase
1313
{
1414
private IEnumerable<QuickFixBase> _quickFixes;
15-
//<<<<<<< HEAD
1615
private RubberduckParserState _parserState;
1716
private readonly IAssignedByValParameterQuickFixDialogFactory _dialogFactory;
18-
//=======
19-
// private readonly IAssignedByValParameterQuickFixDialogFactory _dialogFactory;
20-
//>>>>>>> rubberduck-vba/next
2117

2218
public AssignedByValParameterInspectionResult(IInspection inspection, Declaration target, RubberduckParserState parserState, IAssignedByValParameterQuickFixDialogFactory dialogFactory)
2319
: base(inspection, target)

0 commit comments

Comments
 (0)