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

Added button for MapCreator launch | Some workarounds(#843) #877

Merged
merged 2 commits into from Jun 25, 2016
Merged

Added button for MapCreator launch | Some workarounds(#843) #877

merged 2 commits into from Jun 25, 2016

Conversation

RoiEXLab
Copy link
Member

@RoiEXLab RoiEXLab commented Jun 23, 2016

This adresses #843.
Please note, that I removed this do-while loop (why the heck is this even used?!) In order to enable the user to close the map creator once he accidentally opened it without the need to select a file or to kill the process.
This is only a quick workaround...
The future task would be to close the JFileChooser, once the user selects cancel


This change is Reviewable

@@ -372,6 +377,14 @@ private void setupListeners() {
ProcessRunnerUtil.exec(commands);

}));
m_mapXmlCreator.addActionListener(SwingAction.of("[Beta] Run the Map Creator", e -> {
final List<String> commands = new ArrayList<>();
Copy link
Member

Choose a reason for hiding this comment

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

DRY violation.
Can use a helper method to return a Runnable that takes in 'javaClass' as a parameter

@RoiEXLab
Copy link
Member Author

@DanVanAtta fixed

@DanVanAtta DanVanAtta merged commit 2638066 into triplea-game:master Jun 25, 2016
@RoiEXLab RoiEXLab deleted the AddMapCreatorLaunch branch June 25, 2016 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants