Skip to content

Commit 72ed24b

Browse files
authored
RIDER-62297 Disable project modifications for unity projects (#2277)
* supportSolutionModifications * supportNugetModifications * refactor
1 parent 51d5309 commit 72ed24b

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

rider/src/main/kotlin/com/jetbrains/rider/plugins/unity/explorer/UnitySolutionExplorerCustomization.kt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,21 @@ import com.jetbrains.rider.projectView.workspace.ProjectModelEntity
99

1010
class UnitySolutionExplorerCustomization(project: Project) : SolutionExplorerCustomization(project) {
1111
override fun supportReferenceModifications(projectEntity: ProjectModelEntity): Boolean {
12-
if (UnityUIManager.getInstance(project).hasMinimizedUi.hasTrueValue() && project.isUnityGeneratedProject())
13-
return false
12+
if (isUnityGeneratedAndMinimizedUI()) return false
1413
return super.supportReferenceModifications(projectEntity)
1514
}
15+
16+
override fun supportSolutionModifications(): Boolean {
17+
if (isUnityGeneratedAndMinimizedUI()) return false
18+
return super.supportSolutionModifications()
19+
}
20+
21+
override fun supportNugetModifications(): Boolean {
22+
if (isUnityGeneratedAndMinimizedUI()) return false
23+
return super.supportNugetModifications()
24+
}
25+
26+
private fun isUnityGeneratedAndMinimizedUI(): Boolean {
27+
return UnityUIManager.getInstance(project).hasMinimizedUi.hasTrueValue() && project.isUnityGeneratedProject()
28+
}
1629
}

0 commit comments

Comments
 (0)