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

Fish 6772 javaee8 to jakartaee10 #64

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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