Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow on work to DeclarationFinder.GetDeclarationsWithIdentifiersToAvoid(...) #2872

Merged
merged 13 commits into from Mar 17, 2017

Conversation

BZngr
Copy link
Contributor

@BZngr BZngr commented Mar 15, 2017

This PR enhances name conflict discovery during Rename-Refactoring. The discovery logic now accounts for name conflicts resulting from renaming an identifier where itself, it's declaration, or another reference would cause conflicts. See also #2817.

@@ -455,5 +522,308 @@ private static void AddReference(Declaration toDeclaration, Declaration fromModu
{
toDeclaration.AddReference(toDeclaration.QualifiedName.QualifiedModuleName, fromModuleDeclaration, fromModuleDeclaration, context, toDeclaration.IdentifierName, toDeclaration, Selection.Home, new List<Rubberduck.Parsing.Annotations.IAnnotation>());
}

#region AccessibilityTests_HardcodedModuleContent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're onto something here, I like this very much - not the #region, but the idea of pulling the code content - our "data" - from the tests is awesome.

I'll bring in your PR, and then let's refactor them into their own static class with a bunch of expression-bodied members that return a static readonly string - and eventually one "code" class for every test class... or hmm, one "repository" of VBA sample code to test against. @Hosch250 what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK - I'll take a shot at the static class.

@retailcoder retailcoder merged commit 63785c4 into rubberduck-vba:next Mar 17, 2017
BZngr added a commit to BZngr/Rubberduck that referenced this pull request Mar 17, 2017
@BZngr BZngr mentioned this pull request Mar 17, 2017
retailcoder added a commit that referenced this pull request Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants