Skip to content

Commit

Permalink
Merge pull request #64 from luiseufrasio/FISH-6772-javaee8-to-jakarta…
Browse files Browse the repository at this point in the history
…ee10

Fish 6772 javaee8 to jakartaee10
  • Loading branch information
luiseufrasio authored Apr 26, 2023
2 parents bf3e69c + 293b0d1 commit ca56917
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -89,13 +91,19 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
private String chooseDestinationPath(String srcPath, String name, boolean isFile) {
Shell shell = new Shell();
DirectoryDialog dialog = new DirectoryDialog(shell);
dialog.setText("Choose a destination Folder");
dialog.setText("Choose a " + (isFile ? "New File" : "") + " destination Folder");
dialog.setMessage("Please select a Directory:");
dialog.setFilterPath(srcPath);
String selectedDirectory = dialog.open();
if (selectedDirectory != null) {
if (isFile) {
return selectedDirectory + "/" + name;
String targetDir = selectedDirectory + "/jakartaee10/";
try {
Files.createDirectories(Paths.get(targetDir));
return targetDir + name;
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return selectedDirectory + "/" + name + "-JakartaEE10";
}
Expand Down

0 comments on commit ca56917

Please sign in to comment.