дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 18:17:15 +02:00
Tool windows that borrowed coloured file, status, action or vendor icons (Documentation, Find Usages, GitHub Actions, Logcat, Python Console, NuGet, Python Packages, Jupyter Variables, Ports, the Flutter DevTools windows, Coverage) get dedicated monochrome icons at 16 and 20 px; the coloured originals stay where trees, badges and VCS use them. Database Consoles and Query Workspace get a console icon instead of the table grid, and data source entries use the database cylinder. Icons in the project view, trees, tabs, menus and several popups take --fg-icon instead of --fg-muted / --fg-subtle, so monochrome icons have the same contrast in dark themes.
32 рядки
1.0 KiB
TypeScript
32 рядки
1.0 KiB
TypeScript
/** Python Packages: the project interpreter's packages, with PyPI lookup, in a tool window. */
|
|
import { registerActions } from "@/platform/actions";
|
|
import { lazyComponent } from "@/ui";
|
|
import { registerToolWindow, toolWindowService } from "@/workbench/contributions";
|
|
|
|
const ID = "pythonPackages";
|
|
|
|
export function activate(): () => void {
|
|
const disposers = [
|
|
registerToolWindow({
|
|
id: ID,
|
|
title: "Python Packages",
|
|
icon: "toolwindow-python-packages",
|
|
anchor: "bottom",
|
|
// Listed under the stripe's "…" until first opened: most projects are not Python ones.
|
|
stripe: "onUse",
|
|
order: 28,
|
|
component: lazyComponent(() => import("./PackagesView").then((m) => m.PackagesView)),
|
|
}),
|
|
registerActions([
|
|
{
|
|
id: "python.packages.show",
|
|
title: "Python Packages",
|
|
category: "Tools",
|
|
when: "projectOpen",
|
|
run: () => toolWindowService().show(ID, true),
|
|
},
|
|
]),
|
|
];
|
|
return () => disposers.reverse().forEach((d) => d());
|
|
}
|