diff --git a/src/features/contentCreator/addPluginPage.ts b/src/features/contentCreator/addPluginPage.ts
index a71f5cc85..eab0ecdfa 100644
--- a/src/features/contentCreator/addPluginPage.ts
+++ b/src/features/contentCreator/addPluginPage.ts
@@ -181,7 +181,7 @@ export class AddPlugin {
Clear Logs
-
+
Open Plugin
@@ -224,9 +224,9 @@ export class AddPlugin {
await this.runAddCommand(payload, webview);
return;
- case "init-open-scaffolded-folder":
+ case "init-open-scaffolded-file":
payload = message.payload;
- await this.openFolderInWorkspace(
+ await this.openFileInWorkspace(
payload.projectUrl,
payload.pluginName,
payload.pluginType,
@@ -343,21 +343,18 @@ export class AddPlugin {
`Open plugin file ↗`,
);
if (selection === "Open plugin file ↗") {
- this.openFolderInWorkspace(destinationPathUrl, pluginName, pluginType);
+ this.openFileInWorkspace(destinationPathUrl, pluginName, pluginType);
}
}
}
- public async openFolderInWorkspace(
+ public async openFileInWorkspace(
folderUrl: string,
pluginName: string,
pluginType: string,
) {
const folderUri = vscode.Uri.parse(expandPath(folderUrl));
- // add folder to a new workspace
- // vscode.workspace.updateWorkspaceFolders(0, 1, { uri: folderUri });
-
if (vscode.workspace.workspaceFolders?.length === 0) {
vscode.workspace.updateWorkspaceFolders(0, null, { uri: folderUri });
} else {
diff --git a/src/webview/apps/contentCreator/addPluginPageApp.ts b/src/webview/apps/contentCreator/addPluginPageApp.ts
index 8056914ff..2bff56d66 100644
--- a/src/webview/apps/contentCreator/addPluginPageApp.ts
+++ b/src/webview/apps/contentCreator/addPluginPageApp.ts
@@ -37,7 +37,7 @@ let initCollectionPathElement: HTMLElement;
let initLogsTextArea: TextArea;
let initClearLogsButton: Button;
-let initOpenScaffoldedFolderButton: Button;
+let initOpenPluginFileButton: Button;
let projectUrl = "";
@@ -57,8 +57,8 @@ function main() {
initLogsTextArea = document.getElementById("log-text-area") as TextArea;
initClearLogsButton = document.getElementById("clear-logs-button") as Button;
- initOpenScaffoldedFolderButton = document.getElementById(
- "open-folder-button",
+ initOpenPluginFileButton = document.getElementById(
+ "open-file-button",
) as Button;
pluginNameTextField.addEventListener("input", toggleCreateButton);
@@ -72,9 +72,9 @@ function main() {
initClearButton.addEventListener("click", handleInitClearClick);
initClearLogsButton.addEventListener("click", handleInitClearLogsClick);
- initOpenScaffoldedFolderButton.addEventListener(
+ initOpenPluginFileButton.addEventListener(
"click",
- handleInitOpenScaffoldedFolderClick,
+ handleInitOpenPluginFileClick,
);
initCollectionPathDiv = document.getElementById("full-collection-path");
@@ -183,9 +183,9 @@ function handleInitCreateClick() {
message.arguments.status &&
message.arguments.status === "passed"
) {
- initOpenScaffoldedFolderButton.disabled = false;
+ initOpenPluginFileButton.disabled = false;
} else {
- initOpenScaffoldedFolderButton.disabled = true;
+ initOpenPluginFileButton.disabled = true;
}
projectUrl = message.arguments.projectUrl
@@ -204,9 +204,9 @@ function handleInitClearLogsClick() {
initLogsTextArea.value = "";
}
-function handleInitOpenScaffoldedFolderClick() {
+function handleInitOpenPluginFileClick() {
vscode.postMessage({
- command: "init-open-scaffolded-folder",
+ command: "init-open-scaffolded-file",
payload: {
projectUrl: projectUrl,
},