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

Add more filters for CodeExplorer import command #5731

Open
wants to merge 8 commits into
base: next
Choose a base branch
from

Conversation

IvenBach
Copy link
Member

Close #5395
Add additional filters. Cache filter index for reuse next time dialog is shown.

Add additional filters. Cache filter index for reuse next time
dialog is shown.
ImportableExtensions.Where(ext => !ext.EndsWith("doccls"))
.Select(ext => $"*{ext}"));

private string StandardModuleExtension => "*" + ImportableExtensions.Where(ext => ext.EndsWith("bas")).First();
Copy link
Contributor

Choose a reason for hiding this comment

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

My concern with using First() is that it becomes a runtime error that will blow upmif the assumption about file extensions being unique and present is violated.

I probably would use ‘FirstOrDefault()and ifnull`, do not concatenate into the filter. Then I would add an unit test to assert that the contents are unique and has valid extensions, thus preventing a time bomb.

Add member to create individual filters and member to concatenate
individual filter for dialogs filter.
Converted members to local functions since both members are used in only one
location. They can only be used within the containing member and simplifies
the member list on the type.
Caches filter index last chosen for next import. Filter index is saved
to config file to continue using last chosen index went starting a new
instance of RD.
When filter index matches cached/config index no save occurs.
When filter index differs from cached/config index save occurs.
Cancelling an import does not change filter index. Saving does not occur.
@IvenBach IvenBach force-pushed the Issue5395_Filters_for_synchronizing_document_types branch from 71f4cc9 to eaf0ef9 Compare April 17, 2021 22:26
Restore inital null check and model mockProjectSettingsProvider after it.
Constructor inject dependencies.
@retailcoder
Copy link
Member

Marking this PR as blocked for now, since it introduces new resource keys.

@IvenBach
Copy link
Member Author

Does the same go for the other resource editing PRs?

@retailcoder
Copy link
Member

@IvenBach I haven't looked at the conflicts, do they look salvageable? If they become mergeable after the release, I'll merge them, but the "resource freeze" window is closing soon, and then every new resource key will probably conflict again.

@IvenBach
Copy link
Member Author

IvenBach commented Apr 25, 2021

Most of them were minor at worst. Will review each one to update then push each branch.

@retailcoder
Copy link
Member

You'll probably want to resolve the conflicts on #5749 first, have it merged (I'd like to merge it sooner than later!), and then sync [next] with your dev branch here and address these conflicts.

@MDoerner MDoerner added the PR-Status: Conflicting PR can't be merged as it stands, conflicts must be resolved by the author. label Sep 28, 2021
@Vogel612 Vogel612 added the up-for-grabs Use this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky label May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Status: Conflicting PR can't be merged as it stands, conflicts must be resolved by the author. up-for-grabs Use this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import code file filters for individual document types
5 participants