Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Export file dialog shows directories. Small refactoring. #168

Merged
merged 2 commits into from
Apr 19, 2016

Conversation

OndroMih
Copy link
Contributor

File filters for export dialog now extend file filter from open dialog, instead of a completely separate class. It fixes folders not visible in the export dialog.

@codecov-io
Copy link

Current coverage is 61.59%

Merging #168 into develop will increase coverage by +0.06% as of 6fca41a

@@            develop    #168   diff @@
=======================================
  Files           132     132       
  Stmts          7618    7617     -1
  Branches       1354    1355     +1
  Methods           0       0       
=======================================
+ Hit            4688    4692     +4
- Partial         418     420     +2
+ Missed         2512    2505     -7

Review entire Coverage Diff as of 6fca41a

Powered by Codecov. Updated on successful CI builds.

@chewiebug
Copy link
Owner

Hi Ondrej,

This looks like a good refactoring. Showing the directories in the export dialog feels like a good idea. I think, you broke filtering of the files by extension, however. I'll try to give you a hint on where in the code.

Best regards,
Jörg

private static class ExportExtensionFileFilter extends ExtensionFileFilter {

public static final ExportExtensionFileFilter[] EXT_FILE_FILTERS = {
new ExportExtensionFileFilter(".csv", LocalisationHelper.getString("fileexport_dialog_csv"), DataWriterType.CSV),
Copy link
Owner

@chewiebug chewiebug Apr 17, 2016

Choose a reason for hiding this comment

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

To conform to the "accept()" implementation of ExtensionFileFilter you need to remove the "." from the file extensions here. The implementation of the deleted and the new "accept()" differs in exactly this point. Otherwise no files are shown any more in the export dialog.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You have eyes everywhere :) I must have missed that. The fix is already committed.

Copy link
Owner

Choose a reason for hiding this comment

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

@chewiebug chewiebug merged commit 3079c55 into chewiebug:develop Apr 19, 2016
@chewiebug chewiebug added the bug label Apr 19, 2016
@chewiebug chewiebug added this to the 1.35 milestone Apr 19, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants