Skip to content

Commit

Permalink
Merge pull request #6179 from ocallesp/github/fix_programmatic_rename
Browse files Browse the repository at this point in the history
GitHub/fix programmatic rename
  • Loading branch information
ocallesp authored May 26, 2020
2 parents a8fd42b + 1a24a92 commit 04bcccf
Show file tree
Hide file tree
Showing 21 changed files with 363 additions and 347 deletions.
1 change: 0 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@
<Private>false</Private>
</ProjectReference>
</ItemDefinitionGroup>

</Project>
4 changes: 4 additions & 0 deletions build/import/HostAgnostic.props
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@
<PackageReference Include="Microsoft.VisualStudio.Validation" />
<PackageReference Include="Microsoft.VisualStudio.Threading" />
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem.Analyzers" />

<!-- VS MEF -->
<PackageReference Include="Microsoft.VisualStudio.Composition" />

<!-- Roslyn -->
<PackageReference Include="Microsoft.VisualStudio.LanguageServices" />
<PackageReference Include="Microsoft.CodeAnalysis" />
<PackageReference Include="Microsoft.CSharp" />

<!-- Analyzers-->
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" />
Expand Down
7 changes: 4 additions & 3 deletions build/import/Packages.targets
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<!-- VS SDK -->
<PackageReference Update="Microsoft.VSSDK.BuildTools" Version="16.7.2" />
<PackageReference Update="Microsoft.VisualStudio.ComponentModelHost" Version="16.0.198-g52de9c2988"/>
<PackageReference Update="Microsoft.VisualStudio.Composition" Version="16.1.8"/>
<PackageReference Update="Microsoft.VisualStudio.Composition" Version="16.4.11"/>
<PackageReference Update="Microsoft.VisualStudio.Data.Core" Version="9.0.21022" />
<PackageReference Update="Microsoft.VisualStudio.DataDesign.Common" Version="16.0.28321-alpha"/>
<PackageReference Update="Microsoft.VisualStudio.Data.Services" Version="9.0.21022" />
Expand Down Expand Up @@ -99,9 +99,10 @@
<PackageReference Update="Microsoft.VisualStudio.ProjectSystem.Analyzers" Version="16.7.232-pre" />

<!-- Roslyn -->
<PackageReference Update="Microsoft.VisualStudio.LanguageServices" Version="3.2.0-beta4-19359-03" />
<PackageReference Update="Microsoft.CodeAnalysis" Version="3.2.0-beta4-19359-03" />
<PackageReference Update="Microsoft.VisualStudio.LanguageServices" Version="3.7.0-2.20256.8" />
<PackageReference Update="Microsoft.CodeAnalysis" Version="3.7.0-2.20256.8" />
<PackageReference Update="Microsoft.VisualStudio.IntegrationTest.Utilities" Version="2.6.0-beta1-62113-02" />
<PackageReference Update="Microsoft.CSharp" Version="4.7.0" />

<!-- Analyzers -->
<!-- Note: analyzers from github.com/dotnet/roslyn-analyzers are built together and share the same version -->
Expand Down
2 changes: 1 addition & 1 deletion build/import/VisualStudio.props
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<PackageReference Include="Microsoft.VisualStudio.Telemetry" />
<PackageReference Include="Microsoft.VisualStudio.Utilities" />
<PackageReference Include="NuGet.SolutionRestoreManager.Interop" />
<PackageReference Include="NuGet.VisualStudio" />
<PackageReference Include="NuGet.VisualStudio" />
</ItemGroup>

<!--
Expand Down
1 change: 0 additions & 1 deletion build/import/Workarounds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@
<FileWrites Include="$(IntermediateOutputPath)$(TargetName).latest.pkgdef" Condition="Exists('$(IntermediateOutputPath)$(TargetName).latest.pkgdef')"/>
</ItemGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@
<Target Name="Build" DependsOnTargets="ResolveProjectReferences">
<MakeDir Directories="$(IntermediateOutputPath)" ContinueOnError="True" />
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ Namespace Microsoft.VisualStudio.Editors.PropertyPages
Return True
End If

If typeMember.ContainingAssembly.Equals(compilation.Assembly) OrElse typeMember.ContainingAssembly.GivesAccessTo(compilation.Assembly) Then
If SymbolEqualityComparer.Default.Equals(typeMember.ContainingAssembly, compilation.Assembly) OrElse typeMember.ContainingAssembly.GivesAccessTo(compilation.Assembly) Then
Return True
End If
End If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public StartupObjectsEnumGenerator(Workspace workspace, UnconfiguredProject proj
public async Task<ICollection<IEnumValue>> GetListedValuesAsync()
{
Project project = _workspace.CurrentSolution.Projects.First(p => PathHelper.IsSamePath(p.FilePath, _unconfiguredProject.FullPath));
Compilation compilation = await project.GetCompilationAsync();
Compilation? compilation = await project.GetCompilationAsync();

IEntryPointFinderService entryPointFinderService = project.LanguageServices.GetService<IEntryPointFinderService>();
IEnumerable<INamedTypeSymbol> entryPoints = entryPointFinderService.FindEntryPoints(compilation.GlobalNamespace, SearchForEntryPointsInFormsOnly);
IEntryPointFinderService? entryPointFinderService = project.LanguageServices.GetService<IEntryPointFinderService>();
IEnumerable<INamedTypeSymbol>? entryPoints = entryPointFinderService?.FindEntryPoints(compilation?.GlobalNamespace, SearchForEntryPointsInFormsOnly);
IEnumerable<string> entryPointNames = entryPoints.Select(e => e.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat.WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Omitted)));

return entryPointNames.Select(name => (IEnumValue)new PageEnumValue(new EnumValue { Name = name, DisplayName = name })).ToArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Microsoft.VisualStudio.ProjectSystem.VS.Rename
{
internal sealed partial class Renamer
internal partial class RenamerProjectTreeActionHandler
{
private sealed class UndoScope : IDisposable
{
Expand Down
Loading

0 comments on commit 04bcccf

Please sign in to comment.