Skip to content

Commit

Permalink
Display applicable mutations for the software type, too
Browse files Browse the repository at this point in the history
  • Loading branch information
h0tk3y committed Jun 13, 2024
1 parent 6420535 commit 987eab5
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,6 @@ class GetDeclarativeDocuments : GetModelAction.GetCompositeModelAction<ResolvedD
val softwareTypeType =
projectAnalysisSchema.configuredTypeOf(softwareTypeSchema.softwareTypeSemantics)

TitleMedium(
text = "Software Type: ${softwareTypeNode.name}",
modifier = Modifier
.pointerHoverIcon(PointerIcon(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)))
.withClickTextRangeSelection(softwareTypeNode, highlightingContext)
)
MaterialTheme.spacing.VerticalLevel4()

Column {
with(
ModelTreeRendering(
Expand All @@ -134,6 +126,16 @@ class GetDeclarativeDocuments : GetModelAction.GetCompositeModelAction<ResolvedD
}
)
) {
WithApplicableMutations(softwareTypeNode) {
TitleMedium(
text = "Software Type: ${softwareTypeNode.name}",
modifier = Modifier
.pointerHoverIcon(PointerIcon(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)))
.withClickTextRangeSelection(softwareTypeNode, highlightingContext)
)
}
MaterialTheme.spacing.VerticalLevel4()

ElementInfoOrNothingDeclared(softwareTypeType, softwareTypeNode, 0)
}
}
Expand Down Expand Up @@ -332,7 +334,7 @@ class ModelTreeRendering(
}

@Composable
private fun WithApplicableMutations(
fun WithApplicableMutations(
element: DeclarativeDocument.DocumentNode?,
content: @Composable () -> Unit
) {
Expand Down

0 comments on commit 987eab5

Please sign in to comment.