Skip to content

Fix: Target path is wrong when exporting jar from a workspace node - #384

Merged
Sheng Chen (jdneo) merged 6 commits into
masterfrom
cshi/issue382
Nov 18, 2020
Merged

Fix: Target path is wrong when exporting jar from a workspace node#384
Sheng Chen (jdneo) merged 6 commits into
masterfrom
cshi/issue382

Conversation

@CsCherrYY

Copy link
Copy Markdown
Contributor

Fix #382

Comment thread src/exportJarFileCommand.ts Outdated
1. Move `createJarFile` to `ExportJarTaskProvider`
2. Keep the undefined check in `ResolveJavaProjectExecutor`
3. Use `finishExportJarTask()` to report task status
Comment thread src/exportJarFileCommand.ts Outdated
export async function finishExportJarTask(restart: boolean, node?: INodeData): Promise<void> {
isExportingJar = false;
if (restart) {
executeExportJarTask(node);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Currently, the node here is always undefined because only the export jar process triggered by the button in the title of the Project Manager (not by the inline button of workspaceNode) could go back to the ResolveJavaProject step.
Should the node be undefined or just keep it for the consistency here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This function is a trouble. Some reasons:

  • Still, it makes the people have to read the code between exportJarFileCommand.ts & ExportJarTaskProvider.ts back and forth
  • It's named finishExportJarTask but with a param restart, confusing here.

1. Remove exportJarFileCommand.ts. The `ExportJarStep` and `stepMap` are moved to `utility.ts` and the functions are moved to `ExportJarTaskProvider.ts` as a new class called ExportJarCommand
@jdneo
Sheng Chen (jdneo) merged commit 2bbee59 into master Nov 18, 2020
@jdneo
Sheng Chen (jdneo) deleted the cshi/issue382 branch November 18, 2020 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Target path is wrong when exporting jar from a workspace node

2 participants