Skip to content
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

Open liberty starter #112

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Open liberty starter #112

wants to merge 9 commits into from

Conversation

Jonathan-Maciel
Copy link

No description provided.

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/liberty/multiStepInput.ts Outdated Show resolved Hide resolved
import * as vscode from "vscode";
import * as fs from "fs";

export async function multiStepInput(context: ExtensionContext) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class uses tabs for indents but starterOptions.ts uses 4 spaces for indents. To keep consistent let's keep using 4 spaces for indents. Some existing classes may need updating to keep consistent, offhand I noticed libertyProject.ts

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion to add some JSDoc style comments to explain new classes/functions

Copy link
Contributor

@kathrynkodama kathrynkodama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please merge the latest from main to this branch

import * as vscode from "vscode";
import * as fs from "fs";

export async function starterProject(context: ExtensionContext) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation looks off in this file, ensure you are using 4 spaces rather than tabs.
Suggestion to add a comment to the class explaining the purpose

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in fb3698a. Comments on the way..

fs.createReadStream(downloadLocation).pipe(unzip.Extract({ path: `${state.dir}/${state.a}`}));
fs.unlink(downloadLocation, async (err) => {
const folderUri = vscode.Uri.file(state.dir);
if (vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders[0].uri.fsPath != state.dir) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the idea here that if the workspace is empty we automatically add the newly generated project to the current workspace?

Copy link
Author

@Jonathan-Maciel Jonathan-Maciel Aug 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if it's empty or the target dir is the same as the currrent, then we don't ask to open in a new window.

var unzip = require("unzip-stream");
fs.createReadStream(downloadLocation).pipe(unzip.Extract({ path: `${state.dir}/${state.a}`}));
fs.unlink(downloadLocation, async (err) => {
const folderUri = vscode.Uri.file(state.dir);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to open the parent folder of the newly generated project rather than the newly generated project. For example, if I generate into my downloads, my entire downloads folder is opened in VS Code rather than just the app-name project I generated

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in fb3698a. Not sure if it is the flow we are looking for. I also used a timeout to refresh the file explore. I'll go back and use async/await, when I have more time.

src/util/gradleUtil.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants