Skip to content

Commit 7629974

Browse files
ADFA-3641: Wire per-task tooltips for Gradle tasks (#1519)
* ADFA-3641: Wire per-task tooltips for Gradle tasks Each task row in the Run-Tasks dialog now shows its own tooltip instead of a single generic one. The tag is derived from the task path ("gradle." + path.removePrefix(":")), matching the authored content keys (":app:assembleDebug" -> "gradle.app:assembleDebug", ":clean" -> "gradle.clean"). - TooltipTag.gradleTaskTooltipTag(): pure path->tag mapping (unit-tested). - RunTasksListAdapter: use the per-task tag instead of PROJECT_GRADLE_TASKS. - ToolTipManager.getTooltip: honor its nullable contract - return null on a missing tag so uncovered tasks show no popup instead of an "n/a" tooltip. No fallback. Tooltip content lives in the SoT documentation.db (loaded separately). Verified end-to-end on the emulator: per-task Tier-1/2 tooltip + Tier-3 help page, and graceful no-popup for tasks without authored content. * ADFA-3641: spotlessApply on touched idetooltips files Stage now runs spotlessCheck in CI (ADFA-2522). Spotless' ratchet is file-level, so the two files this branch touches get reformatted whole-file (space -> tab). Whitespace-only; no logic change. * ADFA-3641: rethrow CancellationException in getTooltip A broad catch(Exception) in the getTooltip suspend function swallowed coroutine CancellationException, silently returning null (a "no tooltip" result) on cancellation. Rethrow it before the fallback catch to keep structured concurrency intact.
1 parent 304a46c commit 7629974

5 files changed

Lines changed: 608 additions & 558 deletions

File tree

‎app/src/main/java/com/itsaky/androidide/adapters/RunTasksListAdapter.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class RunTasksListAdapter
7777
TooltipManager.showIdeCategoryTooltip(
7878
context = binding.root.context,
7979
anchorView = binding.root,
80-
tag = TooltipTag.PROJECT_GRADLE_TASKS,
80+
tag = TooltipTag.gradleTaskTooltipTag(task.path),
8181
)
8282
true
8383
}

‎idetooltips/build.gradle.kts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ dependencies {
2121

2222
implementation(projects.resources)
2323
implementation(projects.common)
24+
25+
testImplementation(libs.tests.junit)
2426
}

0 commit comments

Comments
 (0)