Skip to content

Commit 8758ec2

Browse files
Merge pull request #168 from breakponchito/FISH-6474-fix-to-parse-file-path
FISH-6474:fixing issues and upgrade menu text
2 parents d52fa53 + ffaabd6 commit 8758ec2

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
},
216216
{
217217
"command": "payara.server.app.migrate",
218-
"title" : "Migrate to Jakarta EE 10",
218+
"title" : "Transform to Jakarta EE 10",
219219
"category": "Payara"
220220
},
221221
{

src/main/fish/payara/server/PayaraServerInstanceController.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ export class PayaraServerInstanceController extends PayaraInstanceController {
879879
title: 'Selecting folder to migrate file or files'
880880
});
881881

882-
let selectedCancelorNo = false;
882+
let selectedYes = false;
883883

884884
console.log('Folder selected'+ directorySelected);
885885
//if no selection showing message informing that it is needed to select a valid folder
@@ -902,14 +902,14 @@ export class PayaraServerInstanceController extends PayaraInstanceController {
902902

903903
await vscode.window.showWarningMessage("Are you sure that you want to override all files in this folder?", options, ...["Yes"]).then((item)=>{
904904
console.log(item);
905-
if(item.toString() != 'Yes') {
906-
selectedCancelorNo = true;
905+
if(item && item.toString() == 'Yes') {
906+
selectedYes = true;
907907
}
908908
});
909909
}
910910

911911
//if selection was cancel or no just return
912-
if(directorySelected && directorySelected[0].fsPath == uri.fsPath && selectedCancelorNo) {
912+
if(directorySelected && directorySelected[0].fsPath == uri.fsPath && !selectedYes) {
913913
return;
914914
}
915915

@@ -936,7 +936,7 @@ export class PayaraServerInstanceController extends PayaraInstanceController {
936936
//showing dialog with message regarding to make manual changes for the pom configuration files
937937
let options: vscode.MessageOptions = {
938938
modal: true,
939-
detail: 'After migrating application you should need to apply pom configuration files manually. The suggested dependencies for Jakarta EE 10 are: \n'
939+
detail: 'After transforming application you should need to apply pom configuration files manually. The suggested dependencies for Jakarta EE 10 are: \n'
940940
+ PayaraServerTransformPlugin.JAKARTA_10_DEPENDENCY_EE_API + ' \n or \n'+PayaraServerTransformPlugin.JAKARTA_10_DEPENDENCY_WEB_API
941941
};
942942

@@ -954,7 +954,7 @@ export class PayaraServerInstanceController extends PayaraInstanceController {
954954
title: 'Selecting folder to migrate file'
955955
});
956956

957-
let selectedCancelorNo = false;
957+
let selectedYes = false;
958958

959959
console.log('Folder selected:'+ directorySelected);
960960

@@ -970,21 +970,21 @@ export class PayaraServerInstanceController extends PayaraInstanceController {
970970
}
971971

972972
//if it is the same file on the same folder show dialog for override selection
973-
if(directorySelected && directorySelected[0].fsPath == vscode.Uri.file(path.parse(uri.toString()).dir).fsPath) {
973+
if(directorySelected && directorySelected[0].fsPath == vscode.Uri.parse(path.parse(uri.toString()).dir).fsPath) {
974974
let options: vscode.MessageOptions = {
975975
modal: true
976976
};
977977

978978
await vscode.window.showWarningMessage("Are you sure that you want to override this file?", options, ...["Yes"]).then((item)=>{
979979
console.log(item);
980-
if(item.toString() != 'Yes') {
981-
selectedCancelorNo = true;
980+
if(item && item.toString() == 'Yes') {
981+
selectedYes = true;
982982
}
983983
});
984984
}
985985

986986
//if selection was cancel or no just return
987-
if(directorySelected && directorySelected[0].fsPath == vscode.Uri.file(path.parse(uri.toString()).dir).fsPath && selectedCancelorNo) {
987+
if(directorySelected && directorySelected[0].fsPath == vscode.Uri.parse(path.parse(uri.toString()).dir).fsPath && !selectedYes) {
988988
return;
989989
}
990990

0 commit comments

Comments
 (0)