Skip to content

Commit f3afcf9

Browse files
authored
Add workaround for Rider to see the Antlr3 generated files at design time (#3518)
1 parent 5a4823e commit f3afcf9

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.editorconfig

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,10 @@ indent_style = tab
3737
indent_style = space
3838
indent_size = 2
3939

40-
[*.xml]
41-
indent_style = space
42-
indent_size = 2
43-
44-
[*.csproj]
45-
indent_style = space
46-
indent_size = 2
47-
48-
[*.vbproj]
40+
[{*.xml,*.csproj,*.vbproj}]
4941
indent_style = space
5042
indent_size = 2
43+
ij_xml_space_inside_empty_tag = true
5144

5245
[*.g]
5346
indent_style = tab

src/NHibernate/NHibernate.csproj

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="../../build-common/NHibernate.props" />
33

44
<PropertyGroup>
@@ -14,7 +14,7 @@
1414
<PackageTags>ORM; O/RM; DataBase; DAL; ObjectRelationalMapping; NHibernate; ADO.Net; Core</PackageTags>
1515
<PackageReadmeFile>NHibernate.readme.md</PackageReadmeFile>
1616
</PropertyGroup>
17-
17+
1818
<ItemGroup>
1919
<None Remove="**\*.g" />
2020
<None Remove="**\*.xsd" />
@@ -92,4 +92,13 @@
9292
</Content>
9393
<None Include="../../logo/NHibernate-NuGet.png" Pack="true" PackagePath="/" />
9494
</ItemGroup>
95+
96+
<!-- Workaround to enable Rider to see the Antlr3 generated files at design time -->
97+
<Target Name="_AntrlDesignTimeGrammarCompilationWorkaround" BeforeTargets="CoreCompile" Condition="'$(BuildingByReSharper)' == 'true'">
98+
<CallTarget
99+
Targets="AntlrCompile"
100+
ContinueOnError="true"
101+
Condition="'$(DesignTimeBuild)' == 'true' OR '$(BuildingProject)' != 'true'"
102+
/>
103+
</Target>
95104
</Project>

0 commit comments

Comments
 (0)