Skip to content

Properly return menu options for the Server Command Menu for isfs-readonly files #813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 20, 2021
Merged
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
6 changes: 3 additions & 3 deletions src/commands/studio.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as vscode from "vscode";
import { AtelierAPI } from "../api";
import { config, FILESYSTEM_SCHEMA } from "../extension";
import { config, filesystemSchemas } from "../extension";
import { outputChannel, outputConsole, getServerName } from "../utils";
import { DocumentContentProvider } from "../providers/DocumentContentProvider";
import { ClassNode } from "../explorer/models/classNode";
Expand Down Expand Up @@ -454,7 +454,7 @@ export async function mainSourceControlMenu(uri?: vscode.Uri): Promise<void> {

async function _mainMenu(sourceControl: boolean, uri?: vscode.Uri): Promise<void> {
uri = uri || vscode.window.activeTextEditor?.document.uri;
if (uri && uri.scheme !== FILESYSTEM_SCHEMA) {
if (uri && !filesystemSchemas.includes(uri.scheme)) {
return;
}
const studioActions = new StudioActions(uri);
Expand All @@ -471,7 +471,7 @@ export async function contextSourceControlMenu(node: PackageNode | ClassNode | R

export async function _contextMenu(sourceControl: boolean, node: PackageNode | ClassNode | RoutineNode): Promise<void> {
const nodeOrUri = node || vscode.window.activeTextEditor?.document.uri;
if (!nodeOrUri || (nodeOrUri instanceof vscode.Uri && nodeOrUri.scheme !== FILESYSTEM_SCHEMA)) {
if (!nodeOrUri || (nodeOrUri instanceof vscode.Uri && !filesystemSchemas.includes(nodeOrUri.scheme))) {
return;
}
const studioActions = new StudioActions(nodeOrUri);
Expand Down