Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# This file should be checked into version control along with the pnpm-lock.yaml file.
package.json=1645056029
packages/core/package.json=-1407934132
packages/vscode/package.json=402694317
packages/vscode/package.json=-323472392
pnpm-lock.yaml=1115513514
pnpm-workspace.yaml=-1673009026
1 change: 1 addition & 0 deletions packages/vscode/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ ts_project(
"src/newProject.ts",
"src/output.ts",
"src/projects.ts",
"src/targetShortcuts.ts",
"src/tasks.ts",
"src/testing.ts",
"src/workspacePaths.ts",
Expand Down
13 changes: 11 additions & 2 deletions packages/vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ test, and debug commands are available from the editor.
`elide test --reporter=tap` with live results, failure messages and stack-trace locations. **Run with Coverage**
shows the run's LCOV and JaCoCo XML reports in the editor's coverage gutter and Test Coverage view.
- **Elide sidebar.** An activity-bar view with each project's entrypoints, tasks, build targets (`elide build
--inspect`), source sets and dependencies; run, debug, build and sync straight from the tree.
--inspect`), source sets and dependencies; run, debug, build and sync straight from the tree. A workspace's
**Tasks → Build targets** groups targets by project in the CLI's order; standalone projects list them directly.
Targets without descriptions stay alongside the others. **Pin to Top** (a
task's, build target's or Android artifact's context menu) keeps a target in a **Pinned** section above the
projects, and a **Frequently used** section lists the five targets run most often from the sidebar itself — runs
from the CLI, code lenses or the palette are not counted. Both are remembered per workspace.
- **Activity.** The sidebar's **Activity** view lists every sync and Compose preview build of the window, live
while it runs: each step (reading the manifest, installing dependencies, resolving classpaths, generating
resources, writing `workspace.json`), the `elide` commands it ran, and the build tasks those reported, each with
Expand Down Expand Up @@ -231,6 +236,10 @@ file or version banner alone is not proof of compatibility; no guessed version c
load error disables native services just like a failed start or reload. Managed preview protocol/capability metadata
is retained for preview consumers, independently of native analysis/debug compatibility.

This includes Android debug actions when the selected adapter is Komodo: their tree actions, code lenses and
palette/menu entries are withdrawn while it is unavailable. Native Compose preview commands are disabled too.
Run/build actions, other selected debuggers and layoutlib previews remain independent.

With `elide.kotlinLsp.server` set to `komodo`, `komodo` is the folder's Kotlin language server. Each sync writes a
Komodo project manifest into the extension's storage (nothing in the project: no `workspace.json`) and starts the
server, or makes it reload the manifest without a restart. One server serves the whole window: every Komodo
Expand Down Expand Up @@ -421,7 +430,7 @@ Every other Android step — `android-resources-*`, `android-link-*`, `android-d
`android-sign-*`, `android-bundle-*` — is listed under **Build targets** like any other target of the project. A
target there that installs onto a device (it takes `--device`: `android-run-*`, `android-debug-*`, `android-test-*`)
runs on the deployment target's device, resolved as **Run** resolves it, rather than on whichever device Elide would
pick. Targets Elide gives no description, its internal ones, are grouped under **Other targets**.
pick. Targets without descriptions appear in the same order as `elide build --inspect`, alongside the other targets.

A published `.aar` dependency appears under **Dependencies** named by its coordinate, with the sources of the
archive attached: Elide unpacks each one into `.dev/android/libraries/<group>/<artifact>/<version>/` and compiles
Expand Down
80 changes: 70 additions & 10 deletions packages/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,30 @@
"command": "elide.revealLibrary",
"category": "Elide",
"title": "Reveal in Finder/Explorer"
},
{
"command": "elide.pinTarget",
"category": "Elide",
"title": "Pin to Top",
"icon": "$(pin)"
},
{
"command": "elide.unpinTarget",
"category": "Elide",
"title": "Unpin",
"icon": "$(pinned)"
},
{
"command": "elide.forgetFrequentTarget",
"category": "Elide",
"title": "Remove from Frequently Used",
"icon": "$(close)"
},
{
"command": "elide.clearFrequentTargets",
"category": "Elide",
"title": "Clear Frequently Used",
"icon": "$(clear-all)"
}
],
"menus": {
Expand Down Expand Up @@ -710,6 +734,22 @@
"command": "elide.revealLibrary",
"when": "false"
},
{
"command": "elide.pinTarget",
"when": "false"
},
{
"command": "elide.unpinTarget",
"when": "false"
},
{
"command": "elide.forgetFrequentTarget",
"when": "false"
},
{
"command": "elide.clearFrequentTargets",
"when": "false"
},
{
"command": "elide.androidSelectTarget",
"when": "elide.hasAndroidProjects"
Expand Down Expand Up @@ -847,42 +887,42 @@
},
{
"command": "elide.executeTask",
"when": "view == elide.projects && viewItem == task",
"when": "view == elide.projects && viewItem =~ /^task(\\.|$)/",
"group": "inline@1"
},
{
"command": "elide.executeTask",
"when": "view == elide.projects && viewItem == buildTarget",
"when": "view == elide.projects && viewItem =~ /^buildTarget(\\.|$)/",
"group": "inline@1"
},
{
"command": "elide.androidRunDeviceTask",
"when": "view == elide.projects && viewItem == buildTargetDevice",
"when": "view == elide.projects && viewItem =~ /^buildTargetDevice(\\.|$)/",
"group": "inline@1"
},
{
"command": "elide.executeTask",
"when": "view == elide.projects && viewItem == buildTargetDebuggable",
"when": "view == elide.projects && viewItem =~ /^buildTargetDebuggable(\\.|$)/",
"group": "inline@1"
},
{
"command": "elide.debug",
"when": "view == elide.projects && viewItem == buildTargetDebuggable",
"when": "view == elide.projects && viewItem =~ /^buildTargetDebuggable(\\.|$)/",
"group": "inline@2"
},
{
"command": "elide.runArtifact",
"when": "view == elide.projects && viewItem == buildTargetRunnable",
"when": "view == elide.projects && viewItem =~ /^buildTargetRunnable(\\.|$)/",
"group": "inline@1"
},
{
"command": "elide.debugArtifact",
"when": "view == elide.projects && viewItem == buildTargetRunnable",
"when": "view == elide.projects && viewItem =~ /^buildTargetRunnable(\\.|$)/",
"group": "inline@2"
},
{
"command": "elide.executeTask",
"when": "view == elide.projects && viewItem == buildTargetRunnable",
"when": "view == elide.projects && viewItem =~ /^buildTargetRunnable(\\.|$)/",
"group": "inline@3"
},
{
Expand Down Expand Up @@ -911,12 +951,12 @@
},
{
"command": "elide.build",
"when": "view == elide.projects && viewItem == androidAab",
"when": "view == elide.projects && viewItem =~ /^androidAab(\\.|$)/",
"group": "inline@1"
},
{
"command": "elide.build",
"when": "view == elide.projects && viewItem =~ /^(androidAar|androidFeature)$/",
"when": "view == elide.projects && viewItem =~ /^(androidAar|androidFeature)(\\.|$)/",
"group": "inline@1"
},
{
Expand Down Expand Up @@ -968,6 +1008,26 @@
"command": "elide.revealLibrary",
"when": "view == elide.projects && viewItem == library"
},
{
"command": "elide.pinTarget",
"when": "view == elide.projects && viewItem =~ /^(task|buildTarget|androidApk|androidAab|androidAar|androidFeature)(?!.*\\.pinned$)/",
"group": "pin@1"
},
{
"command": "elide.unpinTarget",
"when": "view == elide.projects && viewItem =~ /\\.pinned$/",
"group": "pin@1"
},
{
"command": "elide.forgetFrequentTarget",
"when": "view == elide.projects && viewItem =~ /\\.frequent$/",
"group": "pin@2"
},
{
"command": "elide.clearFrequentTargets",
"when": "view == elide.projects && viewItem == frequent",
"group": "inline@1"
},
{
"command": "elide.cancelActivity",
"when": "view == elide.activity && viewItem =~ /Cancellable$/",
Expand Down
7 changes: 6 additions & 1 deletion packages/vscode/src/androidTesting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ export class ElideAndroidTestController implements vscode.Disposable {
private readonly running = new Set<AbortController>();
private disposed = false;

/** `onInvoke` sees the argument of every `elide.androidTest` invocation, before the run starts. */
constructor(
private readonly workspace: ElideWorkspace,
private readonly ui: ElideUi,
private readonly deployments: AndroidDeploymentController,
onInvoke: (target: unknown) => void,
) {
this.controller.refreshHandler = () => this.refresh();
this.profile = this.controller.createRunProfile("Run on Android Deployment Target", vscode.TestRunProfileKind.Run,
Expand All @@ -80,7 +82,10 @@ export class ElideAndroidTestController implements vscode.Disposable {
}),
// A new model can declare, drop or re-target a test APK, or change what Elide lists for it.
workspace.onDidChange(() => void this.refresh()),
vscode.commands.registerCommand("elide.androidTest", (target: unknown) => this.runCommand(target)),
vscode.commands.registerCommand("elide.androidTest", (target: unknown) => {
onInvoke(target);
return this.runCommand(target);
}),
];
}

Expand Down
Loading
Loading