Skip to content

Commit ca56917

Browse files
authored
Merge pull request #64 from luiseufrasio/FISH-6772-javaee8-to-jakartaee10
Fish 6772 javaee8 to jakartaee10
2 parents bf3e69c + 293b0d1 commit ca56917

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

  • bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/handlers

bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/handlers/MigrateHandler.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
import java.io.File;
1414
import java.io.IOException;
1515
import java.io.InputStreamReader;
16+
import java.nio.file.Files;
17+
import java.nio.file.Paths;
1618
import java.util.ArrayList;
1719
import java.util.List;
1820

@@ -89,13 +91,19 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
8991
private String chooseDestinationPath(String srcPath, String name, boolean isFile) {
9092
Shell shell = new Shell();
9193
DirectoryDialog dialog = new DirectoryDialog(shell);
92-
dialog.setText("Choose a destination Folder");
94+
dialog.setText("Choose a " + (isFile ? "New File" : "") + " destination Folder");
9395
dialog.setMessage("Please select a Directory:");
9496
dialog.setFilterPath(srcPath);
9597
String selectedDirectory = dialog.open();
9698
if (selectedDirectory != null) {
9799
if (isFile) {
98-
return selectedDirectory + "/" + name;
100+
String targetDir = selectedDirectory + "/jakartaee10/";
101+
try {
102+
Files.createDirectories(Paths.get(targetDir));
103+
return targetDir + name;
104+
} catch (IOException e) {
105+
throw new RuntimeException(e);
106+
}
99107
}
100108
return selectedDirectory + "/" + name + "-JakartaEE10";
101109
}

0 commit comments

Comments
 (0)