дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 18:17:15 +02:00
Subversion requests from #7433: - Shelve, Shelve Silently, Unshelve and the Shelf tab work in Subversion working copies. Shelve saves `svn diff --git --show-copies-as-adds` of the selection and rolls the files back, refusing when the files changed since the patch was taken; Unshelve applies it with `svn patch` and reports rejected or skipped files as conflicts. Unversioned or conflicted files, binary files an older svn cannot put in a patch, non-UTF-8 text and selections across working copies are refused before anything is reverted. Stash stays Git-only. - A Subversion Working Copies Information tab lists every working copy with its URL, repository root, revision, depth and format, with Show Log, Update Project, Cleanup and Relocate for each. - The version control menu is named SVN for a Subversion project and VCS for a project with several systems. - The version control tool window button is last in the bottom stripe group. Co-authored-by: wildcatDownstairs <[email protected]>
29 рядки
1.2 KiB
TypeScript
29 рядки
1.2 KiB
TypeScript
/** Parameters shared between the native menu bridge and the custom title bar menu. */
|
|
import { getContext } from "@/platform/context";
|
|
import { useOtherVcsRoots } from "@/platform/gitEnabled";
|
|
import { basename } from "@/platform/project";
|
|
import { isVirtualUri } from "@/platform/virtualDocs";
|
|
import { maybeEditorService } from "./contributions";
|
|
import { isDistractionFree } from "./distractionFree";
|
|
import { toolWindowsRestorable } from "./toolwindows/store";
|
|
import { isZenMode } from "./zenMode";
|
|
|
|
export function javaFileNameOf(path: unknown): string | null {
|
|
if (typeof path !== "string" || !path || isVirtualUri(path) || !/\.java$/i.test(path)) return null;
|
|
return basename(path) || null;
|
|
}
|
|
|
|
export function menuLabelParams(os: string) {
|
|
const compileFileName = javaFileNameOf(getContext().editorPath ?? maybeEditorService()?.activePath());
|
|
return {
|
|
os,
|
|
distractionFree: isDistractionFree() ? "on" : "off",
|
|
zenMode: isZenMode() ? "on" : "off",
|
|
toolWindows: toolWindowsRestorable() ? "hidden" : "shown",
|
|
compileFile: compileFileName ? "yes" : "no",
|
|
compileFileName: compileFileName ?? "",
|
|
// The Git menu is named after the project's system: SVN, or VCS for several (IDEA).
|
|
vcs: useOtherVcsRoots.getState().menu,
|
|
};
|
|
}
|