дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 18:17:15 +02:00
The Commit changes tree showed every directory with a plain folder icon and resolved file icons against the main project only. Directory rows now get the Project view's icons (source, test, resources, package, excluded, output, module, .github) from a folder presentation shared by both trees, and files of an attached workspace member resolve their test and Spring icons against that member's roots. Repository rows keep their folder icon and grey branch text. The shared JVM package check keeps the Gradle sync and Eclipse .classpath source-set markers, so those folders keep their package icon in the Project tree. Co-authored-by: RuyimgByCN <[email protected]>
23 рядки
877 B
TypeScript
23 рядки
877 B
TypeScript
/** Folder icon kind in the project view, from the effective roots. */
|
|
import type { RootFolder } from "@/platform/languageSettings";
|
|
import type { BuildPresentation } from "@/platform/projectPresentation";
|
|
import type { FolderKind } from "@/ui";
|
|
import { directoryFolderKind, outputFolderKind } from "@/ui/folderPresentation";
|
|
import type { ProjectNode } from "./model";
|
|
|
|
export { outputFolderKind };
|
|
|
|
/**
|
|
* Project Structure marks and roots detected from build files. Like IDEA, only
|
|
* excluded folders get the excluded icon; git-ignored ones keep the plain one.
|
|
*/
|
|
export function folderKind(
|
|
node: Pick<ProjectNode, "path" | "excluded">,
|
|
roots: readonly RootFolder[],
|
|
root: string | null,
|
|
build?: BuildPresentation,
|
|
detected: readonly RootFolder[] = [],
|
|
): FolderKind {
|
|
return directoryFolderKind(node.path, roots, root, build, detected, !!node.excluded);
|
|
}
|