-
-
Notifications
You must be signed in to change notification settings - Fork 456
Add file content search for Explorer plugin #119
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
3111271
add file content search unit tests
jjw24 08bfa8d
add unit test for determining file content search
jjw24 8abd97d
add file content search to Index Search
jjw24 ef46225
Merge branch 'dev' into add_filecontent_search
jjw24 0f0bde9
update readme
jjw24 ca83526
version bump Explorer plugin
jjw24 a1e371b
add multi-ActionKeywords for Explorer
jjw24 ace9dc7
update old hotkey trigger to use ActionKeyword
jjw24 7ad0071
quick folder links triggering when search action keyword is used
jjw24 bad007c
show Explorer action keywords on UI
jjw24 fad4f5b
fix clicking twice to expand issue
jjw24 9feb4d6
add behaviour for Customise Action Keyword UI
jjw24 e37d976
add option for user to customise Explorer's Action Keywords
jjw24 a622d8c
update Action Keyword already registered text to be more clearer
jjw24 f292456
handle new action keyword in Explorer- one off
jjw24 6518bf8
add versioning to plugin settings
jjw24 4226b74
update test for file content search action keyword
jjw24 898b1db
Merge remote-tracking branch 'origin/dev' into add_filecontent_search
jjw24 f44364f
Merge branch 'dev' into add_filecontent_search
jjw24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| <Window x:Class="Flow.Launcher.Plugin.Explorer.Views.ActionKeywordSetting" | ||
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
| xmlns:local="clr-namespace:Flow.Launcher.Plugin.Explorer.Views" | ||
| mc:Ignorable="d" | ||
| ResizeMode="NoResize" | ||
| WindowStartupLocation="CenterScreen" | ||
| Title="Action Keyword Setting" Height="200" Width="500"> | ||
| <Grid> | ||
| <Grid.RowDefinitions> | ||
| <RowDefinition /> | ||
| <RowDefinition /> | ||
| </Grid.RowDefinitions> | ||
| <Grid.ColumnDefinitions> | ||
| <ColumnDefinition Width="180" /> | ||
| <ColumnDefinition /> | ||
| </Grid.ColumnDefinitions> | ||
| <TextBlock Margin="20 10 10 10" FontSize="14" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" | ||
| HorizontalAlignment="Left" Text="Current Action Keyword:" /> | ||
| <TextBox Name="txtCurrentActionKeyword" | ||
| Margin="10" Grid.Row="0" Width="105" Grid.Column="1" | ||
| VerticalAlignment="Center" | ||
| HorizontalAlignment="Left" /> | ||
|
|
||
| <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="1"> | ||
| <Button Click="OnConfirmButtonClick" | ||
| Margin="10 0 10 0" Width="80" Height="35" | ||
| Content="OK" /> | ||
| <Button Click="OnCancelButtonClick" | ||
| Margin="10 0 10 0" Width="80" Height="35" | ||
| Content="Cancel" /> | ||
| </StackPanel> | ||
| </Grid> | ||
| </Window> |
76 changes: 76 additions & 0 deletions
76
Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| using Flow.Launcher.Plugin.Explorer.ViewModels; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Text; | ||
| using System.Windows; | ||
| using System.Windows.Controls; | ||
| using System.Windows.Data; | ||
| using System.Windows.Documents; | ||
| using System.Windows.Input; | ||
| using System.Windows.Media; | ||
| using System.Windows.Media.Imaging; | ||
| using System.Windows.Shapes; | ||
|
|
||
| namespace Flow.Launcher.Plugin.Explorer.Views | ||
| { | ||
| /// <summary> | ||
| /// Interaction logic for ActionKeywordSetting.xaml | ||
| /// </summary> | ||
| public partial class ActionKeywordSetting : Window | ||
| { | ||
| private SettingsViewModel settingsViewModel; | ||
|
|
||
| private ActionKeywordView currentActionKeyword; | ||
|
|
||
| private List<ActionKeywordView> actionKeywordListView; | ||
|
|
||
| public ActionKeywordSetting(SettingsViewModel settingsViewModel, List<ActionKeywordView> actionKeywordListView, ActionKeywordView selectedActionKeyword) | ||
| { | ||
| InitializeComponent(); | ||
|
|
||
| this.settingsViewModel = settingsViewModel; | ||
|
|
||
| currentActionKeyword = selectedActionKeyword; | ||
|
|
||
| txtCurrentActionKeyword.Text = selectedActionKeyword.Keyword; | ||
|
|
||
| this.actionKeywordListView = actionKeywordListView; | ||
| } | ||
|
|
||
| private void OnConfirmButtonClick(object sender, RoutedEventArgs e) | ||
| { | ||
| var newActionKeyword = txtCurrentActionKeyword.Text; | ||
|
|
||
| if (string.IsNullOrEmpty(newActionKeyword)) | ||
| return; | ||
|
|
||
| if (newActionKeyword == currentActionKeyword.Keyword) | ||
| { | ||
| Close(); | ||
|
|
||
| return; | ||
| } | ||
|
|
||
| if(!settingsViewModel.IsActionKeywordAlreadyAssigned(newActionKeyword)) | ||
| { | ||
| settingsViewModel.UpdateActionKeyword(newActionKeyword, currentActionKeyword.Keyword); | ||
|
|
||
| actionKeywordListView.Where(x => x.Description == currentActionKeyword.Description).FirstOrDefault().Keyword = newActionKeyword; | ||
|
|
||
| Close(); | ||
|
|
||
| return; | ||
| } | ||
|
|
||
| MessageBox.Show(settingsViewModel.Context.API.GetTranslation("newActionKeywordsHasBeenAssigned")); | ||
| } | ||
|
|
||
| private void OnCancelButtonClick(object sender, RoutedEventArgs e) | ||
| { | ||
| Close(); | ||
|
|
||
| return; | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note here, this is a one off, and will be deleted in the next release. It is needed as we introduced an additional action keyword.
I have also introduced version in plugin settings in the following commit to lay the ground work for handling future plugin meta updates.