├── Documentation ├── ui_layout.png ├── DteDataFlow.png ├── options_page.png ├── ui_view_model.png └── ClassDiagrams │ ├── Models.png │ ├── Services.png │ ├── ViewModel.png │ ├── NumericUpDown.png │ ├── UpdateReactions.png │ └── EventRelayServices.png ├── SourceImages ├── Icon │ ├── About.cdr │ └── WorkingFilesList.cdr ├── Documentation │ ├── ui_layout.cpt │ ├── DteDataFlow.cdr │ ├── ui_view_model.cpt │ ├── ui_layout_unaltered.cpt │ └── ui_view_model_unaltered.cpt └── Readme.md ├── Solution ├── WorkingFilesList.ToolWindow │ ├── View │ │ ├── Icon │ │ │ ├── About.png │ │ │ ├── test_16xMD.png │ │ │ ├── Close_8x_16x.png │ │ │ ├── QuickFind_16x.png │ │ │ ├── Settings_16x.png │ │ │ ├── PushpinUnpin_16xMD.png │ │ │ └── WorkingFilesList32.png │ │ ├── Controls │ │ │ └── AboutPanel.xaml.cs │ │ ├── Theme │ │ │ ├── Separator.xaml │ │ │ └── TextBox.xaml │ │ └── WorkingFilesWindowControl.xaml.cs │ ├── Service │ │ ├── DocumentIcon │ │ │ ├── CPP_16x.png │ │ │ ├── CS_16x.png │ │ │ ├── FS_16x.png │ │ │ ├── JS_16x.png │ │ │ ├── TS_16x.png │ │ │ ├── VB_16x.png │ │ │ ├── Document_16x.png │ │ │ ├── TextFile_16x.png │ │ │ ├── WPFPage_16x.png │ │ │ └── ConfigurationFile_16x.png │ │ ├── AboutText.txt │ │ ├── TimeProvider.cs │ │ ├── CollectionViewGenerator.cs │ │ ├── CountdownTimer.cs │ │ ├── IOService.cs │ │ ├── TestFileNameEvaluator.cs │ │ ├── SettingsStoreService.cs │ │ ├── AboutPanelService.cs │ │ └── DisplayNameHighlightEvaluator.cs │ ├── Interface │ │ ├── IPathCasingRestorer.cs │ │ ├── ITimeProvider.cs │ │ ├── IFilePathService.cs │ │ ├── ITestFileNameEvaluator.cs │ │ ├── IDisplayOrderContainer.cs │ │ ├── IDteEventsSubscriber.cs │ │ ├── IProjectItemService.cs │ │ ├── IUpdateReactionManager.cs │ │ ├── IDocumentIconService.cs │ │ ├── IProjectBrushes.cs │ │ ├── ISettingsStoreService.cs │ │ ├── ICollectionViewGenerator.cs │ │ ├── IUpdateReactionMapping.cs │ │ ├── ICountdownTimer.cs │ │ ├── IProjectItemsEventsService.cs │ │ ├── IWindowEventsService.cs │ │ ├── IUpdateReaction.cs │ │ ├── IDocumentMetadataEqualityService.cs │ │ ├── IDocumentMetadataFactory.cs │ │ ├── IIOService.cs │ │ ├── IDisplayNameHighlightEvaluator.cs │ │ ├── IProjectBrushService.cs │ │ ├── IPinnedItemStorageService.cs │ │ └── INormalizedUsageOrderService.cs │ ├── Model │ │ ├── HorizontalScrollSyncRole.cs │ │ └── SettingsStoreContainer.cs │ ├── ViewModel │ │ ├── Command │ │ │ ├── OpenOptionsPage.cs │ │ │ ├── ClearFilterString.cs │ │ │ └── ToggleIsPinned.cs │ │ ├── DisplayOrderContainer.cs │ │ ├── UserPreference │ │ │ └── UpdateReaction │ │ │ │ ├── GroupByProjectReaction.cs │ │ │ │ ├── ShowRecentUsageReaction.cs │ │ │ │ ├── SelectedSortOptionReaction.cs │ │ │ │ └── AssignProjectColoursReaction.cs │ │ ├── ProjectBrushes.cs │ │ ├── ToolWindowCommands.cs │ │ └── OptionsLists.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── WorkingFilesList │ ├── Resources │ │ ├── WorkingFilesListPreview.png │ │ ├── WorkingFilesWindowCommand.png │ │ └── WorkingFilesWindowPackage.ico │ ├── Interface │ │ └── IOptionsPageService.cs │ ├── app.config │ ├── Ioc │ │ ├── NinjectKernelFactory.cs │ │ └── Modules │ │ │ ├── RepositoryModule.cs │ │ │ └── FactoryModule.cs │ ├── source.extension.vsixmanifest │ ├── Properties │ │ └── AssemblyInfo.cs │ └── ClassDiagram │ │ └── NumericUpDown.cd ├── WorkingFilesList.ToolWindow.Test │ ├── TestingData │ │ ├── IOServiceTestFile.txt │ │ ├── PathCasingRestorerTestFile.txt │ │ ├── NonUnityProjectFile.txt │ │ └── UnityProjectFile.txt │ ├── TestingInfrastructure │ │ ├── TestingTextReader.cs │ │ ├── TestingCountdownTimer.cs │ │ ├── TestingUpdateReactionMapping.cs │ │ ├── TestingTextWriter.cs │ │ ├── OptionsListsBuilder.cs │ │ └── UserPreferencesBuilder.cs │ ├── Service │ │ ├── AboutPanelServiceTests.cs │ │ ├── CollectionViewGeneratorTests.cs │ │ ├── TestFileNameEvaluatorTests.cs │ │ └── FilePathServiceTests.cs │ ├── Model │ │ └── SettingsStoreContainerTests.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── app.config │ └── ViewModel │ │ ├── Command │ │ └── ClearFilterStringTests.cs │ │ └── UserPreference │ │ └── UpdateReaction │ │ └── ShowRecentUsageReactionTests.cs ├── WorkingFilesList.Core │ ├── Model │ │ ├── Direction.cs │ │ ├── SortOption │ │ │ ├── ProjectItemType.cs │ │ │ ├── DisableSorting.cs │ │ │ ├── AlphabeticalSort.cs │ │ │ ├── ChronologicalSort.cs │ │ │ ├── ReverseAlphabeticalSort.cs │ │ │ ├── ProjectAlphabeticalSort.cs │ │ │ └── ProjectReverseAlphabeticalSort.cs │ │ ├── SolutionNameChangedEventArgs.cs │ │ ├── ProjectNameData.cs │ │ └── DocumentMetadataInfo.cs │ ├── Interface │ │ ├── IAboutPanelService.cs │ │ ├── IOptionsPageControlFactory.cs │ │ ├── IUserPreferencesModelFactory.cs │ │ ├── IDialoguePageCommands.cs │ │ ├── IUserPreferencesModelRepository.cs │ │ ├── IOptionsLists.cs │ │ ├── IIntValueControl.cs │ │ ├── ISortOptionsService.cs │ │ ├── IPinnedMetadataManager.cs │ │ ├── IToolWindowCommands.cs │ │ ├── ISortOption.cs │ │ ├── ISolutionEventsService.cs │ │ ├── IDocumentMetadataManager.cs │ │ ├── IUserPreferences.cs │ │ └── IStoredSettingsService.cs │ ├── Theme │ │ └── General.xaml │ ├── PropertyChangedNotifier.cs │ ├── Controls │ │ └── Command │ │ │ ├── IncrementNumericUpDownValue.cs │ │ │ └── DecrementNumericUpDownValue.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── WorkingFilesList.OptionsDialoguePage │ ├── Interface │ │ └── IProcessStarter.cs │ ├── View │ │ └── OptionsPageControl.xaml.cs │ ├── Factory │ │ ├── UserPreferencesModelFactory.cs │ │ └── OptionsPageControlFactory.cs │ ├── Service │ │ └── ProcessStarter.cs │ ├── ViewModel │ │ ├── DialoguePageCommands.cs │ │ └── Command │ │ │ ├── Navigate.cs │ │ │ └── ResetSettings.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── WorkingFilesList.Core.Test │ ├── TestingInfrastructure │ │ ├── TestingValueControl.cs │ │ └── TestingSortOption.cs │ ├── app.config │ ├── Model │ │ └── SortOption │ │ │ ├── ProjectItemTypeTests.cs │ │ │ └── DisableSortingTests.cs │ ├── Controls │ │ └── NumericUpDownTests.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── WorkingFilesList.OptionsDialoguePage.Test │ ├── TestingInfrastructure │ │ └── TestingOptionsPage.cs │ ├── Factory │ │ ├── UserPreferencesModelFactoryTests.cs │ │ └── OptionsPageControlFactoryTests.cs │ ├── app.config │ ├── ViewModel │ │ └── DialoguePageCommandsTests.cs │ └── Properties │ │ └── AssemblyInfo.cs └── WorkingFilesList.Test │ ├── Properties │ └── AssemblyInfo.cs │ └── TestingInfrastructure │ └── SettingsStoreServiceStub.cs ├── .gitignore └── NOTICE.txt /Documentation/ui_layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Documentation/ui_layout.png -------------------------------------------------------------------------------- /SourceImages/Icon/About.cdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/SourceImages/Icon/About.cdr -------------------------------------------------------------------------------- /Documentation/DteDataFlow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Documentation/DteDataFlow.png -------------------------------------------------------------------------------- /Documentation/options_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Documentation/options_page.png -------------------------------------------------------------------------------- /Documentation/ui_view_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Documentation/ui_view_model.png -------------------------------------------------------------------------------- /Documentation/ClassDiagrams/Models.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Documentation/ClassDiagrams/Models.png -------------------------------------------------------------------------------- /Documentation/ClassDiagrams/Services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Documentation/ClassDiagrams/Services.png -------------------------------------------------------------------------------- /SourceImages/Documentation/ui_layout.cpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/SourceImages/Documentation/ui_layout.cpt -------------------------------------------------------------------------------- /SourceImages/Icon/WorkingFilesList.cdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/SourceImages/Icon/WorkingFilesList.cdr -------------------------------------------------------------------------------- /Documentation/ClassDiagrams/ViewModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Documentation/ClassDiagrams/ViewModel.png -------------------------------------------------------------------------------- /SourceImages/Documentation/DteDataFlow.cdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/SourceImages/Documentation/DteDataFlow.cdr -------------------------------------------------------------------------------- /Documentation/ClassDiagrams/NumericUpDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Documentation/ClassDiagrams/NumericUpDown.png -------------------------------------------------------------------------------- /SourceImages/Documentation/ui_view_model.cpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/SourceImages/Documentation/ui_view_model.cpt -------------------------------------------------------------------------------- /Documentation/ClassDiagrams/UpdateReactions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Documentation/ClassDiagrams/UpdateReactions.png -------------------------------------------------------------------------------- /Documentation/ClassDiagrams/EventRelayServices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Documentation/ClassDiagrams/EventRelayServices.png -------------------------------------------------------------------------------- /SourceImages/Documentation/ui_layout_unaltered.cpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/SourceImages/Documentation/ui_layout_unaltered.cpt -------------------------------------------------------------------------------- /SourceImages/Documentation/ui_view_model_unaltered.cpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/SourceImages/Documentation/ui_view_model_unaltered.cpt -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/View/Icon/About.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/View/Icon/About.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/View/Icon/test_16xMD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/View/Icon/test_16xMD.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/View/Icon/Close_8x_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/View/Icon/Close_8x_16x.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/View/Icon/QuickFind_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/View/Icon/QuickFind_16x.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/View/Icon/Settings_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/View/Icon/Settings_16x.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList/Resources/WorkingFilesListPreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList/Resources/WorkingFilesListPreview.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList/Resources/WorkingFilesWindowCommand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList/Resources/WorkingFilesWindowCommand.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList/Resources/WorkingFilesWindowPackage.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList/Resources/WorkingFilesWindowPackage.ico -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/CPP_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/CPP_16x.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/CS_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/CS_16x.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/FS_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/FS_16x.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/JS_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/JS_16x.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/TS_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/TS_16x.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/VB_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/VB_16x.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/View/Icon/PushpinUnpin_16xMD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/View/Icon/PushpinUnpin_16xMD.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/View/Icon/WorkingFilesList32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/View/Icon/WorkingFilesList32.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/Document_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/Document_16x.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/TextFile_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/TextFile_16x.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/WPFPage_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/WPFPage_16x.png -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/ConfigurationFile_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ant-f/WorkingFilesList/HEAD/Solution/WorkingFilesList.ToolWindow/Service/DocumentIcon/ConfigurationFile_16x.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #ignore thumbnails created by windows 2 | Thumbs.db 3 | #Ignore files build by Visual Studio 4 | *.obj 5 | *.exe 6 | *.pdb 7 | *.user 8 | *.aps 9 | *.pch 10 | *.vspscc 11 | *_i.c 12 | *_p.c 13 | *.ncb 14 | *.suo 15 | *.tlb 16 | *.tlh 17 | *.bak 18 | *.cache 19 | *.ilk 20 | *.log 21 | *.sln.docstates 22 | [Bb]in 23 | [Dd]ebug*/ 24 | *.lib 25 | *.sbr 26 | obj/ 27 | [Rr]elease*/ 28 | _ReSharper*/ 29 | [Tt]est[Rr]esult* 30 | packages/ 31 | **/Server/sqlite3 32 | *.dtbcache 33 | **/v16/TestStore 34 | .vs/ 35 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/AboutText.txt: -------------------------------------------------------------------------------- 1 | Working Files List is a Visual Studio extension tool window that shows a selectable list of files that are open in the editor. For the latest information and user guide, see 2 | 3 | https://github.com/Ant-f/WorkingFilesList 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/TestingData/IOServiceTestFile.txt: -------------------------------------------------------------------------------- 1 | Working Files List 2 | Visual Studio extension tool window that shows a selectable list of files 3 | that are open in the editor 4 | Copyright © 2018 Anthony Fung 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | 18 | The contents of this file are not important: the test that uses this file 19 | simply requires for this file to exist. 20 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/TestingData/PathCasingRestorerTestFile.txt: -------------------------------------------------------------------------------- 1 | Working Files List 2 | Visual Studio extension tool window that shows a selectable list of files 3 | that are open in the editor 4 | Copyright © 2016 Anthony Fung 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | 18 | The contents of this file are not important: the test that uses this file uses 19 | the casing of this file's full path and name. -------------------------------------------------------------------------------- /SourceImages/Readme.md: -------------------------------------------------------------------------------- 1 | This folder contains source images for icons (in CorelDRAW X7 format) and other 2 | graphics (in Corel PHOTO-PAINT X7 format) used within Working Files List and 3 | its accompanying documentation. 4 | 5 | Copyright © 2016 Anthony Fung 6 | 7 | The images within this folder and its subfolders are part of Working Files 8 | List and are licensed under the Apache License, Version 2.0 9 | 10 | Licensed under the Apache License, Version 2.0 (the "License"); 11 | you may not use this file except in compliance with the License. 12 | You may obtain a copy of the License at 13 | 14 | 15 | 16 | Unless required by applicable law or agreed to in writing, software 17 | distributed under the License is distributed on an "AS IS" BASIS, 18 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | See the License for the specific language governing permissions and 20 | limitations under the License. 21 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Model/Direction.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | namespace WorkingFilesList.Core.Model 19 | { 20 | public enum Direction 21 | { 22 | None = 0, 23 | Down = 1, 24 | Up = 2 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/IAboutPanelService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | namespace WorkingFilesList.Core.Interface 19 | { 20 | public interface IAboutPanelService 21 | { 22 | string AboutText { get; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Model/SortOption/ProjectItemType.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | namespace WorkingFilesList.Core.Model.SortOption 19 | { 20 | public enum ProjectItemType 21 | { 22 | Document = 1, 23 | Project = 2 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IPathCasingRestorer.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | namespace WorkingFilesList.ToolWindow.Interface 19 | { 20 | public interface IPathCasingRestorer 21 | { 22 | string RestoreCasing(string fullName); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/ITimeProvider.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | 20 | namespace WorkingFilesList.ToolWindow.Interface 21 | { 22 | public interface ITimeProvider 23 | { 24 | DateTime UtcNow { get; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList/Interface/IOptionsPageService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | 20 | namespace WorkingFilesList.Interface 21 | { 22 | public interface IOptionsPageService 23 | { 24 | void ShowOptionPage(Type optionsPageType); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IFilePathService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | namespace WorkingFilesList.ToolWindow.Interface 19 | { 20 | public interface IFilePathService 21 | { 22 | string ReducePath(string fullName, int pathSegmentCount); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/ITestFileNameEvaluator.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | namespace WorkingFilesList.ToolWindow.Interface 19 | { 20 | public interface ITestFileNameEvaluator 21 | { 22 | string EvaluateTestFileName(string fileName); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IDisplayOrderContainer.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | 20 | namespace WorkingFilesList.ToolWindow.Interface 21 | { 22 | public interface IDisplayOrderContainer 23 | { 24 | Type[] DisplayOrder { get; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IDteEventsSubscriber.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using EnvDTE80; 19 | 20 | namespace WorkingFilesList.ToolWindow.Interface 21 | { 22 | public interface IDteEventsSubscriber 23 | { 24 | void SubscribeTo(Events2 dteEvents); 25 | } 26 | } -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/IOptionsPageControlFactory.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Windows; 19 | 20 | namespace WorkingFilesList.Core.Interface 21 | { 22 | public interface IOptionsPageControlFactory 23 | { 24 | FrameworkElement CreateControl(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IProjectItemService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using EnvDTE; 19 | 20 | namespace WorkingFilesList.ToolWindow.Interface 21 | { 22 | public interface IProjectItemService 23 | { 24 | ProjectItem FindProjectItem(string itemName); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/IUserPreferencesModelFactory.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using WorkingFilesList.Core.Model; 19 | 20 | namespace WorkingFilesList.Core.Interface 21 | { 22 | public interface IUserPreferencesModelFactory 23 | { 24 | UserPreferencesModel CreateModel(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IUpdateReactionManager.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.ComponentModel; 19 | 20 | namespace WorkingFilesList.ToolWindow.Interface 21 | { 22 | public interface IUpdateReactionManager 23 | { 24 | void Initialize(ICollectionView view); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage/Interface/IProcessStarter.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Diagnostics; 19 | 20 | namespace WorkingFilesList.OptionsDialoguePage.Interface 21 | { 22 | public interface IProcessStarter 23 | { 24 | void StartNewProcess(ProcessStartInfo info); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IDocumentIconService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Windows.Media.Imaging; 19 | 20 | namespace WorkingFilesList.ToolWindow.Interface 21 | { 22 | public interface IDocumentIconService 23 | { 24 | BitmapSource GetIcon(string fileExtension); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/IDialoguePageCommands.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Windows.Input; 19 | 20 | namespace WorkingFilesList.Core.Interface 21 | { 22 | public interface IDialoguePageCommands 23 | { 24 | ICommand Navigate { get; } 25 | ICommand ResetSettings { get; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/IUserPreferencesModelRepository.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | namespace WorkingFilesList.Core.Interface 19 | { 20 | public interface IUserPreferencesModelRepository 21 | { 22 | void LoadInto(IUserPreferencesModel model); 23 | void SaveModel(IUserPreferencesModel model); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IProjectBrushes.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Windows.Media; 19 | 20 | namespace WorkingFilesList.ToolWindow.Interface 21 | { 22 | public interface IProjectBrushes 23 | { 24 | Brush GenericBrush { get; } 25 | Brush[] ProjectSpecificBrushes { get; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/ISettingsStoreService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using WorkingFilesList.ToolWindow.Model; 19 | 20 | namespace WorkingFilesList.ToolWindow.Interface 21 | { 22 | public interface ISettingsStoreService 23 | { 24 | SettingsStoreContainer GetSettingsStore(bool readOnly); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/ICollectionViewGenerator.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Collections; 19 | using System.ComponentModel; 20 | 21 | namespace WorkingFilesList.ToolWindow.Interface 22 | { 23 | public interface ICollectionViewGenerator 24 | { 25 | ICollectionView CreateView(IList items); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IUpdateReactionMapping.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Collections.Generic; 19 | 20 | namespace WorkingFilesList.ToolWindow.Interface 21 | { 22 | public interface IUpdateReactionMapping 23 | { 24 | IDictionary> MappingTable { get; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/IOptionsLists.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Collections.Generic; 19 | 20 | namespace WorkingFilesList.Core.Interface 21 | { 22 | public interface IOptionsLists 23 | { 24 | IList DocumentSortOptions { get; } 25 | IList ProjectSortOptions { get; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/ICountdownTimer.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2019 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | 20 | namespace WorkingFilesList.ToolWindow.Interface 21 | { 22 | public interface ICountdownTimer 23 | { 24 | Action Callback { get; set; } 25 | TimeSpan Interval { get; set; } 26 | 27 | void Restart(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/TestingData/NonUnityProjectFile.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 21 | 22 | {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 23 | 24 | 25 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IProjectItemsEventsService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using EnvDTE; 19 | 20 | namespace WorkingFilesList.ToolWindow.Interface 21 | { 22 | public interface IProjectItemsEventsService 23 | { 24 | void ItemRemoved(ProjectItem projectItem); 25 | void ItemRenamed(ProjectItem projectItem, string oldName); 26 | } 27 | } -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core.Test/TestingInfrastructure/TestingValueControl.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2022 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using WorkingFilesList.Core.Interface; 19 | 20 | namespace WorkingFilesList.Core.Test.TestingInfrastructure 21 | { 22 | public class TestingValueControl : IIntValueControl 23 | { 24 | public int Minimum { get; set; } 25 | public int Value { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Model/SortOption/DisableSorting.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | namespace WorkingFilesList.Core.Model.SortOption 19 | { 20 | public class DisableSorting : SortOptionBase 21 | { 22 | public DisableSorting() : base( 23 | displayName: "None", 24 | applicableTypes: ProjectItemType.Project) 25 | { 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/IIntValueControl.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | namespace WorkingFilesList.Core.Interface 19 | { 20 | /// 21 | /// Represents a control that has an Value property 22 | /// 23 | public interface IIntValueControl 24 | { 25 | int Minimum { get; set; } 26 | int Value { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/TestingData/UnityProjectFile.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 21 | 22 | {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 23 | 24 | 25 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IWindowEventsService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using EnvDTE; 19 | 20 | namespace WorkingFilesList.ToolWindow.Interface 21 | { 22 | public interface IWindowEventsService 23 | { 24 | void WindowActivated(Window gotFocus, Window lostFocus); 25 | void WindowClosing(Window window); 26 | void WindowCreated(Window window); 27 | } 28 | } -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IUpdateReaction.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.ComponentModel; 19 | using WorkingFilesList.Core.Interface; 20 | 21 | namespace WorkingFilesList.ToolWindow.Interface 22 | { 23 | public interface IUpdateReaction 24 | { 25 | void UpdateCollection( 26 | ICollectionView view, 27 | IUserPreferences userPreferences); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Model/HorizontalScrollSyncRole.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | namespace WorkingFilesList.ToolWindow.Model 19 | { 20 | public enum HorizontalScrollSyncRole 21 | { 22 | // None is not used, but is necessary as property-changed callbacks 23 | // will not be called otherwise 24 | 25 | None = 0, 26 | Primary = 1, 27 | Replica = 2 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Model/SolutionNameChangedEventArgs.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | 20 | namespace WorkingFilesList.Core.Model 21 | { 22 | public class SolutionNameChangedEventArgs : EventArgs 23 | { 24 | public string NewName { get; } 25 | 26 | public SolutionNameChangedEventArgs(string newName) 27 | { 28 | NewName = newName; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IDocumentMetadataEqualityService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using WorkingFilesList.Core.Model; 19 | 20 | namespace WorkingFilesList.ToolWindow.Interface 21 | { 22 | public interface IDocumentMetadataEqualityService 23 | { 24 | bool Compare(DocumentMetadataInfo info, DocumentMetadata metadata); 25 | bool Compare(string name1, string name2); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IDocumentMetadataFactory.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using WorkingFilesList.Core.Model; 20 | 21 | namespace WorkingFilesList.ToolWindow.Interface 22 | { 23 | public interface IDocumentMetadataFactory 24 | { 25 | DocumentMetadata Create(DocumentMetadataInfo info); 26 | DocumentMetadata Create(DocumentMetadataInfo info, DateTime activatedAt); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IIOService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2018 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.IO; 19 | 20 | namespace WorkingFilesList.ToolWindow.Interface 21 | { 22 | public interface IIOService 23 | { 24 | bool FileExists(string path); 25 | TextReader GetReader(string path); 26 | TextWriter GetWriter(string path); 27 | void CreateDirectory(string path); 28 | void Delete(string path); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IDisplayNameHighlightEvaluator.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | namespace WorkingFilesList.ToolWindow.Interface 19 | { 20 | public interface IDisplayNameHighlightEvaluator 21 | { 22 | string GetPreHighlight(string path, bool highlightFileName); 23 | string GetHighlight(string path, bool highlightFileName); 24 | string GetPostHighlight(string path, bool highlightFileName); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Theme/General.xaml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 21 | 22 22 | 23 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/View/Controls/AboutPanel.xaml.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Windows.Controls; 19 | 20 | namespace WorkingFilesList.ToolWindow.View.Controls 21 | { 22 | /// 23 | /// Interaction logic for AboutPanel.xaml 24 | /// 25 | public partial class AboutPanel : UserControl 26 | { 27 | public AboutPanel() 28 | { 29 | InitializeComponent(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IProjectBrushService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Windows.Media; 19 | using WorkingFilesList.Core.Interface; 20 | 21 | namespace WorkingFilesList.ToolWindow.Interface 22 | { 23 | public interface IProjectBrushService 24 | { 25 | Brush GetBrush(string id, IUserPreferences userPreferences); 26 | void ClearBrushIdCollection(); 27 | void UpdateBrushId(string oldId, string newId); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/ISortOptionsService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.ComponentModel; 21 | 22 | namespace WorkingFilesList.Core.Interface 23 | { 24 | public interface ISortOptionsService 25 | { 26 | SortDescription[] EvaluateAppliedSortDescriptions(IUserPreferences userPreferences); 27 | void AssignDisplayOrder(IList displayOrder, IList sortOptions); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/IPinnedItemStorageService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2018 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Collections.Generic; 19 | using WorkingFilesList.Core.Model; 20 | 21 | namespace WorkingFilesList.ToolWindow.Interface 22 | { 23 | public interface IPinnedItemStorageService 24 | { 25 | IList Read(string fullName); 26 | void Remove(string fullName); 27 | void Write(IEnumerable metadata, string fullName); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage/View/OptionsPageControl.xaml.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Windows.Controls; 19 | 20 | namespace WorkingFilesList.OptionsDialoguePage.View 21 | { 22 | /// 23 | /// Interaction logic for OptionsPageControl.xaml 24 | /// 25 | public partial class OptionsPageControl : UserControl 26 | { 27 | public OptionsPageControl() 28 | { 29 | InitializeComponent(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Interface/INormalizedUsageOrderService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Collections.Generic; 19 | using WorkingFilesList.Core.Interface; 20 | using WorkingFilesList.Core.Model; 21 | 22 | namespace WorkingFilesList.ToolWindow.Interface 23 | { 24 | public interface INormalizedUsageOrderService 25 | { 26 | void SetUsageOrder( 27 | IList metadataCollection, 28 | IUserPreferences userPreferences); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/IPinnedMetadataManager.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.ComponentModel; 19 | using WorkingFilesList.Core.Model; 20 | 21 | namespace WorkingFilesList.Core.Interface 22 | { 23 | public interface IPinnedMetadataManager 24 | { 25 | ICollectionView PinnedDocumentMetadata { get; } 26 | 27 | void MovePinnedItem(DocumentMetadata itemToMove, DocumentMetadata targetLocation); 28 | void TogglePinnedStatus(DocumentMetadata metadata); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/IToolWindowCommands.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Windows.Input; 19 | 20 | namespace WorkingFilesList.Core.Interface 21 | { 22 | public interface IToolWindowCommands 23 | { 24 | ICommand ActivateWindow { get; } 25 | ICommand ClearFilterString { get; } 26 | ICommand CloseDocument { get; } 27 | ICommand OpenOptionsPage { get; } 28 | ICommand OpenTestFile { get; } 29 | ICommand ToggleIsPinned { get; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/View/Theme/Separator.xaml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 20 | 21 | 25 | 26 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/TestingInfrastructure/TestingTextReader.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2018 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.IO; 19 | 20 | namespace WorkingFilesList.ToolWindow.Test.TestingInfrastructure 21 | { 22 | internal class TestingTextReader : TextReader 23 | { 24 | public bool DisposeInvoked { get; private set; } 25 | 26 | protected override void Dispose(bool disposing) 27 | { 28 | DisposeInvoked = true; 29 | base.Dispose(disposing); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage/Factory/UserPreferencesModelFactory.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using WorkingFilesList.Core.Interface; 19 | using WorkingFilesList.Core.Model; 20 | 21 | namespace WorkingFilesList.OptionsDialoguePage.Factory 22 | { 23 | public class UserPreferencesModelFactory : IUserPreferencesModelFactory 24 | { 25 | public UserPreferencesModel CreateModel() 26 | { 27 | var model = new UserPreferencesModel(); 28 | return model; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/TimeProvider.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using WorkingFilesList.ToolWindow.Interface; 20 | 21 | namespace WorkingFilesList.ToolWindow.Service 22 | { 23 | /// 24 | /// Provides the time in UTC; facilitate testing. 25 | /// 26 | public class TimeProvider : ITimeProvider 27 | { 28 | /// 29 | /// The current time in UTC 30 | /// 31 | public DateTime UtcNow => DateTime.UtcNow; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/TestingInfrastructure/TestingCountdownTimer.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2019 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using WorkingFilesList.ToolWindow.Interface; 20 | 21 | namespace WorkingFilesList.ToolWindow.Test.TestingInfrastructure 22 | { 23 | internal class TestingCountdownTimer : ICountdownTimer 24 | { 25 | public Action Callback { get; set; } 26 | public TimeSpan Interval { get; set; } 27 | 28 | public void Restart() 29 | { 30 | Callback(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Model/SortOption/AlphabeticalSort.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.ComponentModel; 19 | 20 | namespace WorkingFilesList.Core.Model.SortOption 21 | { 22 | public sealed class AlphabeticalSort : SortOptionBase 23 | { 24 | public AlphabeticalSort() : base( 25 | displayName: "A-Z", 26 | propertyName: nameof(DocumentMetadata.DisplayName), 27 | sortDirection: ListSortDirection.Ascending, 28 | applicableTypes: ProjectItemType.Document) 29 | { 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/CollectionViewGenerator.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Collections; 19 | using System.ComponentModel; 20 | using System.Windows.Data; 21 | using WorkingFilesList.ToolWindow.Interface; 22 | 23 | namespace WorkingFilesList.ToolWindow.Service 24 | { 25 | public class CollectionViewGenerator : ICollectionViewGenerator 26 | { 27 | public ICollectionView CreateView(IList items) 28 | { 29 | var view = new ListCollectionView(items); 30 | return view; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Model/SortOption/ChronologicalSort.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.ComponentModel; 19 | 20 | namespace WorkingFilesList.Core.Model.SortOption 21 | { 22 | public sealed class ChronologicalSort : SortOptionBase 23 | { 24 | public ChronologicalSort() : base( 25 | displayName: "Recent", 26 | propertyName: nameof(DocumentMetadata.ActivatedAt), 27 | sortDirection: ListSortDirection.Descending, 28 | applicableTypes: ProjectItemType.Document) 29 | { 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage/Service/ProcessStarter.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Diagnostics; 19 | using WorkingFilesList.OptionsDialoguePage.Interface; 20 | 21 | namespace WorkingFilesList.OptionsDialoguePage.Service 22 | { 23 | public class ProcessStarter : IProcessStarter 24 | { 25 | public void StartNewProcess(ProcessStartInfo info) 26 | { 27 | var process = new Process 28 | { 29 | StartInfo = info 30 | }; 31 | 32 | process.Start(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage/Factory/OptionsPageControlFactory.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Windows; 19 | using WorkingFilesList.Core.Interface; 20 | using WorkingFilesList.OptionsDialoguePage.View; 21 | 22 | namespace WorkingFilesList.OptionsDialoguePage.Factory 23 | { 24 | public class OptionsPageControlFactory : IOptionsPageControlFactory 25 | { 26 | public FrameworkElement CreateControl() 27 | { 28 | var optionsPageControl = new OptionsPageControl(); 29 | return optionsPageControl; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Model/SortOption/ReverseAlphabeticalSort.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.ComponentModel; 19 | 20 | namespace WorkingFilesList.Core.Model.SortOption 21 | { 22 | public sealed class ReverseAlphabeticalSort : SortOptionBase 23 | { 24 | public ReverseAlphabeticalSort() : base( 25 | displayName: "Z-A", 26 | propertyName: nameof(DocumentMetadata.DisplayName), 27 | sortDirection: ListSortDirection.Descending, 28 | applicableTypes: ProjectItemType.Document) 29 | { 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/ISortOption.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.ComponentModel; 19 | using WorkingFilesList.Core.Model.SortOption; 20 | 21 | namespace WorkingFilesList.Core.Interface 22 | { 23 | public interface ISortOption 24 | { 25 | bool HasSortDescription { get; } 26 | int DisplayIndex { get; set; } 27 | ProjectItemType ApplicableType { get; } 28 | ListSortDirection SortDirection { get; } 29 | string DisplayName { get; } 30 | string PropertyName { get; } 31 | 32 | SortDescription GetSortDescription(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/ISolutionEventsService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using EnvDTE; 19 | using System; 20 | using System.Threading.Tasks; 21 | using WorkingFilesList.Core.Model; 22 | 23 | namespace WorkingFilesList.Core.Interface 24 | { 25 | public interface ISolutionEventsService 26 | { 27 | event EventHandler SolutionNameChanged; 28 | 29 | void AfterClosing(); 30 | void BeforeClosing(); 31 | void Opened(); 32 | Task ProjectAdded(Project project); 33 | void ProjectRenamed(Project project, string oldName); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList/app.config: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/Service/AboutPanelServiceTests.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using NUnit.Framework; 19 | using WorkingFilesList.ToolWindow.Service; 20 | 21 | namespace WorkingFilesList.ToolWindow.Test.Service 22 | { 23 | [TestFixture] 24 | public class AboutPanelServiceTests 25 | { 26 | [Test] 27 | public void AboutTextIsNotNullOrWhiteSpaceAfterInitializingService() 28 | { 29 | // Arrange 30 | 31 | var service = new AboutPanelService(); 32 | 33 | // Assert 34 | 35 | Assert.IsFalse(string.IsNullOrWhiteSpace(service.AboutText)); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/View/WorkingFilesWindowControl.xaml.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | namespace WorkingFilesList.ToolWindow.View 19 | { 20 | using System.Windows.Controls; 21 | 22 | /// 23 | /// Interaction logic for WorkingFilesWindowControl. 24 | /// 25 | public partial class WorkingFilesWindowControl : UserControl 26 | { 27 | /// 28 | /// Initializes a new instance of the class. 29 | /// 30 | public WorkingFilesWindowControl() 31 | { 32 | this.InitializeComponent(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Model/SortOption/ProjectAlphabeticalSort.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.ComponentModel; 19 | 20 | namespace WorkingFilesList.Core.Model.SortOption 21 | { 22 | public sealed class ProjectAlphabeticalSort : SortOptionBase 23 | { 24 | public ProjectAlphabeticalSort() : base( 25 | displayName: "A-Z", 26 | propertyName: $"{nameof(DocumentMetadata.ProjectNames)}." + 27 | $"{nameof(ProjectNameData.DisplayName)}", 28 | sortDirection: ListSortDirection.Ascending, 29 | applicableTypes: ProjectItemType.Project) 30 | { 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/TestingInfrastructure/TestingUpdateReactionMapping.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Collections.Generic; 19 | using WorkingFilesList.ToolWindow.Interface; 20 | 21 | namespace WorkingFilesList.ToolWindow.Test.TestingInfrastructure 22 | { 23 | public class TestingUpdateReactionMapping : IUpdateReactionMapping 24 | { 25 | public IDictionary> MappingTable { get; } 26 | 27 | public TestingUpdateReactionMapping( 28 | IDictionary> mappingTable) 29 | { 30 | MappingTable = mappingTable; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Model/SortOption/ProjectReverseAlphabeticalSort.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.ComponentModel; 19 | 20 | namespace WorkingFilesList.Core.Model.SortOption 21 | { 22 | public sealed class ProjectReverseAlphabeticalSort : SortOptionBase 23 | { 24 | public ProjectReverseAlphabeticalSort() : base( 25 | displayName: "Z-A", 26 | propertyName: $"{nameof(DocumentMetadata.ProjectNames)}." + 27 | $"{nameof(ProjectNameData.DisplayName)}", 28 | sortDirection: ListSortDirection.Descending, 29 | applicableTypes: ProjectItemType.Project) 30 | { 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage.Test/TestingInfrastructure/TestingOptionsPage.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using System.ComponentModel; 20 | using System.Windows; 21 | 22 | namespace WorkingFilesList.OptionsDialoguePage.Test.TestingInfrastructure 23 | { 24 | internal class TestingOptionsPage : OptionsPage 25 | { 26 | public FrameworkElement ChildFrameworkElement => (FrameworkElement) Child; 27 | 28 | public void SimulateActivate() 29 | { 30 | OnActivate(new CancelEventArgs()); 31 | } 32 | 33 | public void SimulateClose() 34 | { 35 | OnClosed(EventArgs.Empty); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core.Test/TestingInfrastructure/TestingSortOption.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.ComponentModel; 19 | using WorkingFilesList.Core.Model.SortOption; 20 | 21 | namespace WorkingFilesList.Core.Test.TestingInfrastructure 22 | { 23 | public class TestingSortOption : SortOptionBase 24 | { 25 | public TestingSortOption( 26 | string displayName, 27 | string propertyName, 28 | ListSortDirection sortDirection, 29 | ProjectItemType type) : base( 30 | displayName, 31 | propertyName, 32 | sortDirection, 33 | type) 34 | { 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList/Ioc/NinjectKernelFactory.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using EnvDTE80; 19 | using Ninject; 20 | using WorkingFilesList.Ioc.Modules; 21 | 22 | namespace WorkingFilesList.Ioc 23 | { 24 | public class NinjectKernelFactory 25 | { 26 | public IKernel CreateKernel(DTE2 dte2) 27 | { 28 | var kernel = new StandardKernel( 29 | new CommandModule(), 30 | new FactoryModule(), 31 | new RepositoryModule(), 32 | new ServiceModule(), 33 | new ViewModelModule()); 34 | 35 | kernel.Bind().ToConstant(dte2); 36 | return kernel; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/View/Theme/TextBox.xaml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 20 | 21 | 26 | 27 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Model/ProjectNameData.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using EnvDTE; 19 | 20 | namespace WorkingFilesList.Core.Model 21 | { 22 | public struct ProjectNameData 23 | { 24 | /// 25 | /// Display name of the document's containing project 26 | /// 27 | public string DisplayName { get; } 28 | 29 | /// 30 | /// of the document's containing project 31 | /// 32 | public string FullName { get; } 33 | 34 | public ProjectNameData(string displayName, string fullName) 35 | { 36 | DisplayName = displayName; 37 | FullName = fullName; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Model/DocumentMetadataInfo.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using EnvDTE; 19 | 20 | namespace WorkingFilesList.Core.Model 21 | { 22 | public struct DocumentMetadataInfo 23 | { 24 | /// 25 | /// Full path and name of document file 26 | /// 27 | public string FullName { get; set; } 28 | 29 | /// 30 | /// Display name of the document's containing project 31 | /// 32 | public string ProjectDisplayName { get; set; } 33 | 34 | /// 35 | /// of the document's containing project 36 | /// 37 | public string ProjectFullName { get; set; } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/PropertyChangedNotifier.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.ComponentModel; 19 | using System.Runtime.CompilerServices; 20 | 21 | namespace WorkingFilesList.Core 22 | { 23 | /// 24 | /// Classes that need to implement can 25 | /// do so by subclassing this class 26 | /// 27 | public class PropertyChangedNotifier : INotifyPropertyChanged 28 | { 29 | public event PropertyChangedEventHandler PropertyChanged; 30 | 31 | protected void OnPropertyChanged( 32 | [CallerMemberName] string propertyName = null) 33 | { 34 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList/Ioc/Modules/RepositoryModule.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using Ninject.Modules; 19 | using WorkingFilesList.Core.Interface; 20 | using WorkingFilesList.ToolWindow.Interface; 21 | using WorkingFilesList.ToolWindow.Repository; 22 | 23 | namespace WorkingFilesList.Ioc.Modules 24 | { 25 | public class RepositoryModule : NinjectModule 26 | { 27 | public override void Load() 28 | { 29 | Kernel.Bind().To().InSingletonScope() 30 | .WithConstructorArgument("settingsCollectionNameRoot", nameof(WorkingFilesWindowPackage)); 31 | 32 | Kernel.Bind().To().InSingletonScope(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/IDocumentMetadataManager.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 - 2019 Anthony Fung and The Working Files List Project contributors 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using EnvDTE; 19 | using System.ComponentModel; 20 | using WorkingFilesList.Core.Model; 21 | 22 | namespace WorkingFilesList.Core.Interface 23 | { 24 | public interface IDocumentMetadataManager : IPinnedMetadataManager 25 | { 26 | ICollectionView ActiveDocumentMetadata { get; } 27 | string FilterString { get; set; } 28 | 29 | void Activate(string fullName); 30 | void Add(DocumentMetadataInfo info); 31 | void AddPinned(DocumentMetadataInfo info); 32 | void Clear(); 33 | bool UpdateFullName(string newName, string oldName); 34 | void Synchronize(Documents documents, bool setUsageOrder); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/ViewModel/Command/OpenOptionsPage.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using System.Windows.Input; 20 | 21 | namespace WorkingFilesList.ToolWindow.ViewModel.Command 22 | { 23 | public class OpenOptionsPage : ICommand 24 | { 25 | #pragma warning disable 67 26 | // ICommand interface member is only used by XAML 27 | public event EventHandler CanExecuteChanged; 28 | #pragma warning restore 67 29 | 30 | public event EventHandler OptionsPageRequested; 31 | 32 | public bool CanExecute(object parameter) 33 | { 34 | return true; 35 | } 36 | 37 | public void Execute(object parameter) 38 | { 39 | OptionsPageRequested?.Invoke(this, EventArgs.Empty); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList/Ioc/Modules/FactoryModule.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using Ninject.Modules; 19 | using WorkingFilesList.Core.Interface; 20 | using WorkingFilesList.OptionsDialoguePage.Factory; 21 | using WorkingFilesList.ToolWindow.Factory; 22 | using WorkingFilesList.ToolWindow.Interface; 23 | 24 | namespace WorkingFilesList.Ioc.Modules 25 | { 26 | internal class FactoryModule : NinjectModule 27 | { 28 | public override void Load() 29 | { 30 | Kernel.Bind().To().InSingletonScope(); 31 | Kernel.Bind().To().InSingletonScope(); 32 | Kernel.Bind().To().InSingletonScope(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage/ViewModel/DialoguePageCommands.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Collections.Generic; 19 | using System.Linq; 20 | using System.Windows.Input; 21 | using WorkingFilesList.Core.Interface; 22 | using WorkingFilesList.OptionsDialoguePage.ViewModel.Command; 23 | 24 | namespace WorkingFilesList.OptionsDialoguePage.ViewModel 25 | { 26 | public class DialoguePageCommands : IDialoguePageCommands 27 | { 28 | public ICommand Navigate { get; } 29 | public ICommand ResetSettings { get; } 30 | 31 | public DialoguePageCommands(IList commandCollection) 32 | { 33 | Navigate = commandCollection.OfType().Single(); 34 | ResetSettings = commandCollection.OfType().Single(); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage.Test/Factory/UserPreferencesModelFactoryTests.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using NUnit.Framework; 19 | using WorkingFilesList.Core.Model; 20 | using WorkingFilesList.OptionsDialoguePage.Factory; 21 | 22 | namespace WorkingFilesList.OptionsDialoguePage.Test.Factory 23 | { 24 | [TestFixture] 25 | public class UserPreferencesModelFactoryTests 26 | { 27 | [Test] 28 | public void CreateModelCreatesNewUserPreferencesModel() 29 | { 30 | // Arrange 31 | 32 | var factory = new UserPreferencesModelFactory(); 33 | 34 | // Act 35 | 36 | var preferences = factory.CreateModel(); 37 | 38 | // Assert 39 | 40 | Assert.That(preferences, Is.TypeOf()); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/Service/CollectionViewGeneratorTests.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using NUnit.Framework; 19 | using System.Collections.Generic; 20 | using WorkingFilesList.Core.Model; 21 | using WorkingFilesList.ToolWindow.Service; 22 | 23 | namespace WorkingFilesList.ToolWindow.Test.Service 24 | { 25 | [TestFixture] 26 | public class CollectionViewGeneratorTests 27 | { 28 | [Test] 29 | public void ReturnsCollectionView() 30 | { 31 | // Arrange 32 | 33 | var list = new List(); 34 | var generator = new CollectionViewGenerator(); 35 | 36 | // Act 37 | 38 | var view = generator.CreateView(list); 39 | 40 | // Assert 41 | 42 | Assert.That(view.SourceCollection, Is.EqualTo(list)); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/TestingInfrastructure/TestingTextWriter.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2018 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using System.IO; 20 | using System.Text; 21 | 22 | namespace WorkingFilesList.ToolWindow.Test.TestingInfrastructure 23 | { 24 | internal class TestingTextWriter : TextWriter 25 | { 26 | public bool DisposeInvoked { get; private set; } 27 | public string WrittenData { get; private set; } 28 | 29 | public override Encoding Encoding { get; } 30 | 31 | protected override void Dispose(bool disposing) 32 | { 33 | DisposeInvoked = true; 34 | base.Dispose(disposing); 35 | } 36 | 37 | public override void WriteLine(string value) 38 | { 39 | WrittenData += value; 40 | WrittenData += Environment.NewLine; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/ViewModel/DisplayOrderContainer.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using WorkingFilesList.Core.Interface; 20 | using WorkingFilesList.Core.Model.SortOption; 21 | using WorkingFilesList.ToolWindow.Interface; 22 | 23 | namespace WorkingFilesList.ToolWindow.ViewModel 24 | { 25 | public class DisplayOrderContainer : IDisplayOrderContainer 26 | { 27 | /// 28 | /// Order within this list determines the value of 29 | /// of 30 | /// instances 31 | /// 32 | public Type[] DisplayOrder { get; } = 33 | { 34 | typeof(DisableSorting), 35 | typeof(ChronologicalSort), 36 | typeof(AlphabeticalSort), 37 | typeof(ReverseAlphabeticalSort) 38 | }; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage.Test/Factory/OptionsPageControlFactoryTests.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using NUnit.Framework; 19 | using System.Threading; 20 | using WorkingFilesList.OptionsDialoguePage.Factory; 21 | using WorkingFilesList.OptionsDialoguePage.View; 22 | 23 | namespace WorkingFilesList.OptionsDialoguePage.Test.Factory 24 | { 25 | [TestFixture] 26 | [Apartment(ApartmentState.STA)] 27 | public class OptionsPageControlFactoryTests 28 | { 29 | [Test] 30 | public void CreateControlReturnsOptionsPageControl() 31 | { 32 | // Arrange 33 | 34 | var factory = new OptionsPageControlFactory(); 35 | 36 | // Act 37 | 38 | var preferences = factory.CreateControl(); 39 | 40 | // Assert 41 | 42 | Assert.That(preferences, Is.TypeOf()); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core.Test/app.config: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage.Test/app.config: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/ViewModel/UserPreference/UpdateReaction/GroupByProjectReaction.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.ComponentModel; 19 | using System.Windows.Data; 20 | using WorkingFilesList.Core.Interface; 21 | using WorkingFilesList.Core.Model; 22 | using WorkingFilesList.ToolWindow.Interface; 23 | 24 | namespace WorkingFilesList.ToolWindow.ViewModel.UserPreference.UpdateReaction 25 | { 26 | public class GroupByProjectReaction : IUpdateReaction 27 | { 28 | public void UpdateCollection(ICollectionView view, IUserPreferences userPreferences) 29 | { 30 | view.GroupDescriptions.Clear(); 31 | 32 | if (userPreferences.GroupByProject) 33 | { 34 | const string propertyName = nameof(DocumentMetadata.ProjectNames); 35 | var description = new PropertyGroupDescription(propertyName); 36 | view.GroupDescriptions.Add(description); 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/Model/SettingsStoreContainerTests.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using Microsoft.VisualStudio.Settings; 19 | using Moq; 20 | using NUnit.Framework; 21 | using System; 22 | using WorkingFilesList.ToolWindow.Model; 23 | 24 | namespace WorkingFilesList.ToolWindow.Test.Model 25 | { 26 | [TestFixture] 27 | public class SettingsStoreContainerTests 28 | { 29 | [Test] 30 | public void DisposeDisposesServiceProvider() 31 | { 32 | // Arrange 33 | 34 | var serviceProvider = Mock.Of(); 35 | var writableSettingsStore = Mock.Of(); 36 | 37 | // Act 38 | 39 | using (new SettingsStoreContainer(serviceProvider, writableSettingsStore)) 40 | { 41 | // Intentionally empty 42 | } 43 | 44 | // Assert 45 | 46 | Mock.Get(serviceProvider).Verify(s => s.Dispose()); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/Service/TestFileNameEvaluatorTests.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using NUnit.Framework; 19 | using WorkingFilesList.ToolWindow.Service; 20 | 21 | namespace WorkingFilesList.ToolWindow.Test.Service 22 | { 23 | [TestFixture] 24 | public class TestFileNameEvaluatorTests 25 | { 26 | [TestCase(@"FileName.cs", "FileNameTests.cs")] 27 | [TestCase(@"C:\FileName.cs", "FileNameTests.cs")] 28 | [TestCase(@"C:\Directory\FileName.cs", "FileNameTests.cs")] 29 | public void TestFileNameIsBuiltByAppendingTestsSuffixAndRemovingDirectoryName( 30 | string input, 31 | string expectedOutput) 32 | { 33 | // Arrange 34 | 35 | var service = new TestFileNameEvaluator(); 36 | 37 | // Act 38 | 39 | var result = service.EvaluateTestFileName(input); 40 | 41 | // Assert 42 | 43 | Assert.That(result, Is.EqualTo(expectedOutput)); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Reflection; 19 | 20 | // General Information about an assembly is controlled through the following 21 | // set of attributes. Change these attribute values to modify the information 22 | // associated with an assembly. 23 | [assembly: AssemblyTitle("WorkingFilesList.Test")] 24 | [assembly: AssemblyDescription("Tests for WorkingFilesList")] 25 | [assembly: AssemblyProduct("Working Files List")] 26 | [assembly: AssemblyCopyright("Copyright © 2016 Anthony Fung")] 27 | 28 | // Version information for an assembly consists of the following four values: 29 | // 30 | // Major Version 31 | // Minor Version 32 | // Build Number 33 | // Revision 34 | // 35 | // You can specify all the values or you can default the Build and Revision Numbers 36 | // by using the '*' as shown below: 37 | // [assembly: AssemblyVersion("1.0.*")] 38 | [assembly: AssemblyVersion("1.0.0.0")] 39 | [assembly: AssemblyFileVersion("1.0.0.0")] 40 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Test/TestingInfrastructure/SettingsStoreServiceStub.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using Microsoft.VisualStudio.Settings; 19 | using Moq; 20 | using System; 21 | using WorkingFilesList.ToolWindow.Interface; 22 | using WorkingFilesList.ToolWindow.Model; 23 | using WorkingFilesList.ToolWindow.Service; 24 | 25 | namespace WorkingFilesList.Test.TestingInfrastructure 26 | { 27 | /// 28 | /// Use when testing resolution of IoC bindings for interfaces. 29 | /// contains logic that will throw 30 | /// exceptions when using mocks. 31 | /// 32 | internal class SettingsStoreServiceStub : ISettingsStoreService 33 | { 34 | public SettingsStoreContainer GetSettingsStore(bool readOnly) 35 | { 36 | var container = new SettingsStoreContainer( 37 | Mock.Of(), 38 | Mock.Of()); 39 | 40 | return container; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Model/SettingsStoreContainer.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using Microsoft.VisualStudio.Settings; 19 | using System; 20 | 21 | namespace WorkingFilesList.ToolWindow.Model 22 | { 23 | /// 24 | /// wrapper. Implements 25 | /// , calling the corresponding method on the 26 | /// provided . 27 | /// 28 | public class SettingsStoreContainer : IDisposable 29 | { 30 | private readonly IDisposable _serviceProvider; 31 | 32 | public SettingsStore SettingsStore { get; } 33 | 34 | public SettingsStoreContainer( 35 | IDisposable serviceProvider, 36 | SettingsStore settingsStore) 37 | { 38 | _serviceProvider = serviceProvider; 39 | SettingsStore = settingsStore; 40 | } 41 | 42 | public void Dispose() 43 | { 44 | _serviceProvider.Dispose(); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | Working Files List 2 | Copyright © 2016 - 2019 Anthony Fung and The Working 3 | Files List Project contributors 4 | 5 | This software uses Ninject under the terms and conditions 6 | of the Apache License Version 2.0. 7 | 8 | This software uses Json.NET under the terms 9 | and conditions of the MIT License (MIT). The copyright notice and license text 10 | for Json.NET is included below 11 | 12 | -------------------------------------------------------------------------------- 13 | The MIT License (MIT) 14 | 15 | Copyright (c) 2007 James Newton-King 16 | 17 | Permission is hereby granted, free of charge, to any person obtaining a copy of 18 | this software and associated documentation files (the "Software"), to deal in 19 | the Software without restriction, including without limitation the rights to 20 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 21 | the Software, and to permit persons to whom the Software is furnished to do so, 22 | subject to the following conditions: 23 | 24 | The above copyright notice and this permission notice shall be included in all 25 | copies or substantial portions of the Software. 26 | 27 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 28 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 29 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 30 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 31 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 32 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 33 | -------------------------------------------------------------------------------- 34 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/ViewModel/Command/ClearFilterString.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2019 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using System.Windows.Input; 20 | using WorkingFilesList.Core.Interface; 21 | 22 | namespace WorkingFilesList.ToolWindow.ViewModel.Command 23 | { 24 | public class ClearFilterString : ICommand 25 | { 26 | private readonly IDocumentMetadataManager _documentMetadataManager; 27 | 28 | #pragma warning disable 67 29 | // ICommand interface member is only used by XAML 30 | public event EventHandler CanExecuteChanged; 31 | #pragma warning restore 67 32 | 33 | public ClearFilterString(IDocumentMetadataManager documentMetadataManager) 34 | { 35 | _documentMetadataManager = documentMetadataManager; 36 | } 37 | 38 | public bool CanExecute(object parameter) 39 | { 40 | return true; 41 | } 42 | 43 | public void Execute(object parameter) 44 | { 45 | _documentMetadataManager.FilterString = string.Empty; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/CountdownTimer.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2019 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using System.Windows.Threading; 20 | using WorkingFilesList.ToolWindow.Interface; 21 | 22 | namespace WorkingFilesList.ToolWindow.Service 23 | { 24 | /// 25 | /// Wrapper for a ; facilitate testing. 26 | /// 27 | public class CountdownTimer : ICountdownTimer 28 | { 29 | private readonly DispatcherTimer _timer; 30 | 31 | public Action Callback { get; set; } 32 | public TimeSpan Interval { get; set; } 33 | 34 | public CountdownTimer() 35 | { 36 | _timer = new DispatcherTimer(); 37 | _timer.Tick += CountdownTimerTick; 38 | } 39 | 40 | private void CountdownTimerTick(object sender, EventArgs e) 41 | { 42 | _timer.Stop(); 43 | Callback(); 44 | } 45 | 46 | public void Restart() 47 | { 48 | _timer.Interval = Interval; 49 | _timer.Start(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/IOService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2018 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.IO; 19 | using WorkingFilesList.ToolWindow.Interface; 20 | 21 | namespace WorkingFilesList.ToolWindow.Service 22 | { 23 | public class IOService : IIOService 24 | { 25 | public TextReader GetReader(string path) 26 | { 27 | var reader = File.Exists(path) 28 | ? new StreamReader(path) 29 | : null; 30 | 31 | return reader; 32 | } 33 | 34 | public TextWriter GetWriter(string path) 35 | { 36 | var writer = new StreamWriter(path); 37 | return writer; 38 | } 39 | 40 | public void CreateDirectory(string path) 41 | { 42 | Directory.CreateDirectory(path); 43 | } 44 | 45 | public bool FileExists(string path) 46 | { 47 | var exists = File.Exists(path); 48 | return exists; 49 | } 50 | 51 | public void Delete(string path) 52 | { 53 | File.Delete(path); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core.Test/Model/SortOption/ProjectItemTypeTests.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using NUnit.Framework; 19 | using WorkingFilesList.Core.Model.SortOption; 20 | 21 | namespace WorkingFilesList.Core.Test.Model.SortOption 22 | { 23 | [TestFixture] 24 | public class ProjectItemTypeTests 25 | { 26 | [Test] 27 | public void DocumentTypeIsIndependentOfProjectType() 28 | { 29 | // Arrange 30 | 31 | const ProjectItemType type = ProjectItemType.Document; 32 | 33 | // Act 34 | 35 | var hasFlag = type.HasFlag(ProjectItemType.Project); 36 | 37 | // Assert 38 | 39 | Assert.IsFalse(hasFlag); 40 | } 41 | 42 | [Test] 43 | public void ProjectTypeIsIndependentOfDocumentType() 44 | { 45 | // Arrange 46 | 47 | const ProjectItemType type = ProjectItemType.Project; 48 | 49 | // Act 50 | 51 | var hasFlag = type.HasFlag(ProjectItemType.Document); 52 | 53 | // Assert 54 | 55 | Assert.IsFalse(hasFlag); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/TestingInfrastructure/OptionsListsBuilder.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using Moq; 19 | using System; 20 | using System.Collections.Generic; 21 | using WorkingFilesList.Core.Interface; 22 | using WorkingFilesList.ToolWindow.Interface; 23 | using WorkingFilesList.ToolWindow.ViewModel; 24 | 25 | namespace WorkingFilesList.ToolWindow.Test.TestingInfrastructure 26 | { 27 | internal class OptionsListsBuilder 28 | { 29 | public IList SortOptions { get; set; } 30 | 31 | public Type[] SortOptionsDisplayOrder { get; set; } 32 | 33 | public ISortOptionsService SortOptionsService { get; set; } 34 | 35 | public OptionsLists CreateOptionsLists() 36 | { 37 | var container = Mock.Of(d => 38 | d.DisplayOrder == (SortOptionsDisplayOrder ?? new Type[0])); 39 | 40 | var lists = new OptionsLists( 41 | SortOptions, 42 | container, 43 | SortOptionsService ?? Mock.Of()); 44 | 45 | return lists; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Reflection; 19 | using System.Runtime.CompilerServices; 20 | 21 | // General Information about an assembly is controlled through the following 22 | // set of attributes. Change these attribute values to modify the information 23 | // associated with an assembly. 24 | [assembly: AssemblyTitle("WorkingFilesList.ToolWindow.Test")] 25 | [assembly: AssemblyDescription("Tests for WorkingFilesList.ToolWindow")] 26 | [assembly: AssemblyProduct("Working Files List")] 27 | [assembly: AssemblyCopyright("Copyright © 2016 Anthony Fung")] 28 | 29 | // Version information for an assembly consists of the following four values: 30 | // 31 | // Major Version 32 | // Minor Version 33 | // Build Number 34 | // Revision 35 | // 36 | // You can specify all the values or you can default the Build and Revision Numbers 37 | // by using the '*' as shown below: 38 | // [assembly: AssemblyVersion("1.0.*")] 39 | [assembly: AssemblyVersion("1.0.0.0")] 40 | [assembly: AssemblyFileVersion("1.0.0.0")] 41 | 42 | [assembly: InternalsVisibleTo("WorkingFilesList.Test")] 43 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/ViewModel/ProjectBrushes.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Windows.Media; 19 | using WorkingFilesList.ToolWindow.Interface; 20 | 21 | namespace WorkingFilesList.ToolWindow.ViewModel 22 | { 23 | public class ProjectBrushes : IProjectBrushes 24 | { 25 | /// 26 | /// to return when not using project specific colours 27 | /// 28 | public Brush GenericBrush { get; } = Brushes.DarkGray; 29 | 30 | /// 31 | /// Available instances for assigning to projects 32 | /// 33 | public Brush[] ProjectSpecificBrushes { get; } = 34 | { 35 | Brushes.CornflowerBlue, 36 | Brushes.GreenYellow, 37 | Brushes.DarkOrange, 38 | Brushes.Pink, 39 | Brushes.BlanchedAlmond, 40 | Brushes.MediumSlateBlue, 41 | Brushes.DarkSeaGreen, 42 | Brushes.Goldenrod, 43 | Brushes.Sienna, 44 | Brushes.Salmon 45 | }; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/ViewModel/UserPreference/UpdateReaction/ShowRecentUsageReaction.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Collections.Generic; 19 | using System.ComponentModel; 20 | using WorkingFilesList.Core.Interface; 21 | using WorkingFilesList.Core.Model; 22 | using WorkingFilesList.ToolWindow.Interface; 23 | 24 | namespace WorkingFilesList.ToolWindow.ViewModel.UserPreference.UpdateReaction 25 | { 26 | public class ShowRecentUsageReaction : IUpdateReaction 27 | { 28 | private readonly INormalizedUsageOrderService _normalizedUsageOrderService; 29 | 30 | public ShowRecentUsageReaction( 31 | INormalizedUsageOrderService normalizedUsageOrderService) 32 | { 33 | _normalizedUsageOrderService = normalizedUsageOrderService; 34 | } 35 | 36 | public void UpdateCollection(ICollectionView view, IUserPreferences userPreferences) 37 | { 38 | var collection = (IList) view.SourceCollection; 39 | 40 | _normalizedUsageOrderService.SetUsageOrder( 41 | collection, 42 | userPreferences); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/app.config: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/TestFileNameEvaluator.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.IO; 19 | using WorkingFilesList.ToolWindow.Interface; 20 | 21 | namespace WorkingFilesList.ToolWindow.Service 22 | { 23 | public class TestFileNameEvaluator : ITestFileNameEvaluator 24 | { 25 | /// 26 | /// Evaluates the most likely name for a file containing tests, based 27 | /// on the provided file name 28 | /// 29 | /// 30 | /// Name of file containing logic to have tests written for 31 | /// 32 | /// 33 | /// with the suffix 'Tests' added before 34 | /// the file extension 35 | /// 36 | public string EvaluateTestFileName(string fileName) 37 | { 38 | var inputFileName = Path.GetFileNameWithoutExtension(fileName); 39 | var testFileName = inputFileName + "Tests"; 40 | 41 | var extension = Path.GetExtension(fileName); 42 | 43 | var combined = $"{testFileName}{extension}"; 44 | return combined; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/ViewModel/UserPreference/UpdateReaction/SelectedSortOptionReaction.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.ComponentModel; 19 | using WorkingFilesList.Core.Interface; 20 | using WorkingFilesList.ToolWindow.Interface; 21 | 22 | namespace WorkingFilesList.ToolWindow.ViewModel.UserPreference.UpdateReaction 23 | { 24 | public class SelectedSortOptionReaction : IUpdateReaction 25 | { 26 | private readonly ISortOptionsService _sortOptionsService; 27 | 28 | public SelectedSortOptionReaction(ISortOptionsService sortOptionsService) 29 | { 30 | _sortOptionsService = sortOptionsService; 31 | } 32 | 33 | public void UpdateCollection( 34 | ICollectionView view, 35 | IUserPreferences userPreferences) 36 | { 37 | view.SortDescriptions.Clear(); 38 | 39 | var sortDescriptions = 40 | _sortOptionsService.EvaluateAppliedSortDescriptions(userPreferences); 41 | 42 | foreach (var sortDescription in sortDescriptions) 43 | { 44 | view.SortDescriptions.Add(sortDescription); 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/IUserPreferences.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 - 2020 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Windows; 19 | using WorkingFilesList.Core.Model; 20 | 21 | namespace WorkingFilesList.Core.Interface 22 | { 23 | public interface IUserPreferences : IUserPreferencesModel 24 | { 25 | /// 26 | /// The selected sorting option that should be applied to entries on the 27 | /// list, with respect to each entry's 28 | /// displayed file path. This sort should be secondary to 29 | /// 30 | /// 31 | ISortOption DocumentSortOption { get; } 32 | 33 | /// 34 | /// The selected sorting option that should be applied to entries on the 35 | /// list, with respect to each entry's 36 | /// parent project name. This sorting should be applied before 37 | /// 38 | /// 39 | ISortOption ProjectSortOption { get; } 40 | 41 | Visibility ConfigurationBarVisibility { get; } 42 | Visibility SearchBarVisibility { get; } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Working Files List 2022 6 | Visual Studio extension tool window that shows a selectable list of files that are open in the editor 7 | https://visualstudiogallery.msdn.microsoft.com/b2dfa9d7-4277-47a0-881c-0b6a9a105e51 8 | LICENSE.txt 9 | https://github.com/Ant-f/WorkingFilesList/wiki/User-Guide 10 | https://github.com/Ant-f/WorkingFilesList/releases 11 | Resources\WorkingFilesWindowPackage.ico 12 | Resources\WorkingFilesListPreview.png 13 | 14 | 15 | 16 | amd64 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Controls/Command/IncrementNumericUpDownValue.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using System.Windows.Input; 20 | using WorkingFilesList.Core.Interface; 21 | 22 | namespace WorkingFilesList.Core.Controls.Command 23 | { 24 | /// 25 | /// that increments the 26 | /// property of the passed in as a parameter. This 27 | /// class should be bound to the appropriate button in a 28 | /// control template 29 | /// 30 | public class IncrementNumericUpDownValue : ICommand 31 | { 32 | #pragma warning disable 67 33 | // ICommand interface member is only used by XAML 34 | public event EventHandler CanExecuteChanged; 35 | #pragma warning restore 67 36 | 37 | public bool CanExecute(object parameter) 38 | { 39 | return true; 40 | } 41 | 42 | public void Execute(object parameter) 43 | { 44 | var control = parameter as IIntValueControl; 45 | 46 | if (control != null) 47 | { 48 | control.Value++; 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage/ViewModel/Command/Navigate.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using System.Diagnostics; 20 | using System.Windows.Input; 21 | using WorkingFilesList.OptionsDialoguePage.Interface; 22 | 23 | namespace WorkingFilesList.OptionsDialoguePage.ViewModel.Command 24 | { 25 | public class Navigate : ICommand 26 | { 27 | private readonly IProcessStarter _processStarter; 28 | 29 | #pragma warning disable 67 30 | // ICommand interface member is only used by XAML 31 | public event EventHandler CanExecuteChanged; 32 | #pragma warning restore 67 33 | 34 | public Navigate(IProcessStarter processStarter) 35 | { 36 | _processStarter = processStarter; 37 | } 38 | 39 | public bool CanExecute(object parameter) 40 | { 41 | return true; 42 | } 43 | 44 | public void Execute(object parameter) 45 | { 46 | var uri = parameter as Uri; 47 | 48 | if (uri == null) 49 | { 50 | return; 51 | } 52 | 53 | var info = new ProcessStartInfo(uri.AbsoluteUri); 54 | _processStarter.StartNewProcess(info); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/ViewModel/Command/ToggleIsPinned.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using System.Windows.Input; 20 | using WorkingFilesList.Core.Interface; 21 | using WorkingFilesList.Core.Model; 22 | 23 | namespace WorkingFilesList.ToolWindow.ViewModel.Command 24 | { 25 | public class ToggleIsPinned : ICommand 26 | { 27 | private readonly IDocumentMetadataManager _documentMetadataManager; 28 | 29 | #pragma warning disable 67 30 | // ICommand interface member is only used by XAML 31 | public event EventHandler CanExecuteChanged; 32 | #pragma warning restore 67 33 | 34 | public ToggleIsPinned(IDocumentMetadataManager documentMetadataManager) 35 | { 36 | _documentMetadataManager = documentMetadataManager; 37 | } 38 | 39 | public bool CanExecute(object parameter) 40 | { 41 | return true; 42 | } 43 | 44 | public void Execute(object parameter) 45 | { 46 | var metadata = parameter as DocumentMetadata; 47 | 48 | if (metadata == null) 49 | { 50 | return; 51 | } 52 | 53 | _documentMetadataManager.TogglePinnedStatus(metadata); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core.Test/Controls/NumericUpDownTests.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using NUnit.Framework; 19 | using System.Threading; 20 | using WorkingFilesList.Core.Controls; 21 | 22 | namespace WorkingFilesList.Core.Test.Controls 23 | { 24 | [TestFixture] 25 | [Apartment(ApartmentState.STA)] 26 | public class NumericUpDownTests 27 | { 28 | [Test] 29 | public void ValueCanNotBeLessThanMinumum() 30 | { 31 | // Arrange 32 | 33 | const int minimum = 0; 34 | 35 | var upDown = new NumericUpDown 36 | { 37 | Minimum = minimum 38 | }; 39 | 40 | // Act 41 | 42 | upDown.Value = -5; 43 | 44 | // Assert 45 | 46 | Assert.That(upDown.Value, Is.EqualTo(minimum)); 47 | } 48 | 49 | [Test] 50 | public void SettingMinimumHigherThanValueUpdatesValue() 51 | { 52 | // Arrange 53 | 54 | const int minimum = 5; 55 | 56 | // Act 57 | 58 | var upDown = new NumericUpDown 59 | { 60 | Minimum = 5 61 | }; 62 | 63 | // Assert 64 | 65 | Assert.That(upDown.Value, Is.EqualTo(minimum)); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/SettingsStoreService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using EnvDTE80; 19 | using Microsoft.VisualStudio.Settings; 20 | using Microsoft.VisualStudio.Shell; 21 | using Microsoft.VisualStudio.Shell.Settings; 22 | using WorkingFilesList.ToolWindow.Interface; 23 | using WorkingFilesList.ToolWindow.Model; 24 | using Microsoft.VisualStudio.OLE.Interop; 25 | 26 | namespace WorkingFilesList.ToolWindow.Service 27 | { 28 | public class SettingsStoreService : ISettingsStoreService 29 | { 30 | private readonly DTE2 _dte2; 31 | 32 | public SettingsStoreService(DTE2 dte2) 33 | { 34 | _dte2 = dte2; 35 | } 36 | 37 | public SettingsStoreContainer GetSettingsStore(bool readOnly) 38 | { 39 | var serviceProvider = new ServiceProvider((IServiceProvider) _dte2); 40 | var settingsManager = new ShellSettingsManager(serviceProvider); 41 | 42 | var settingsStore = readOnly 43 | ? settingsManager.GetReadOnlySettingsStore(SettingsScope.UserSettings) 44 | : settingsManager.GetWritableSettingsStore(SettingsScope.UserSettings); 45 | 46 | var container = new SettingsStoreContainer(serviceProvider, settingsStore); 47 | return container; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Interface/IStoredSettingsService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 - 2020 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | namespace WorkingFilesList.Core.Interface 19 | { 20 | public interface IStoredSettingsRepository 21 | { 22 | int GetPathSegmentCount(); 23 | void SetPathSegmentCount(int count); 24 | 25 | int GetUnityRefreshDelay(); 26 | void SetUnityRefreshDelay(int delayInMilliseconds); 27 | 28 | string GetDocumentSortOptionName(); 29 | void SetDocumentSortOptionName(string name); 30 | 31 | string GetProjectSortOptionName(); 32 | void SetProjectSortOptionName(string name); 33 | 34 | bool GetGroupByProject(); 35 | void SetGroupByProject(bool value); 36 | 37 | bool GetHighlightFileName(); 38 | void SetHighlightFileName(bool value); 39 | 40 | bool GetShowRecentUsage(); 41 | void SetShowRecentUsage(bool value); 42 | 43 | bool GetAssignProjectColours(); 44 | void SetAssignProjectColours(bool value); 45 | 46 | bool GetShowFileTypeIcons(); 47 | void SetShowFileTypeIcons(bool value); 48 | 49 | bool GetShowConfigurationBar(); 50 | void SetShowConfigurationBar(bool value); 51 | 52 | bool GetShowSearchBar(); 53 | void SetShowSearchBar(bool value); 54 | 55 | void Reset(); 56 | } 57 | } -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/ViewModel/UserPreference/UpdateReaction/AssignProjectColoursReaction.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Collections.Generic; 19 | using System.ComponentModel; 20 | using WorkingFilesList.Core.Interface; 21 | using WorkingFilesList.Core.Model; 22 | using WorkingFilesList.ToolWindow.Interface; 23 | 24 | namespace WorkingFilesList.ToolWindow.ViewModel.UserPreference.UpdateReaction 25 | { 26 | public class AssignProjectColoursReaction : IUpdateReaction 27 | { 28 | private readonly IProjectBrushService _projectBrushService; 29 | 30 | public AssignProjectColoursReaction( 31 | IProjectBrushService projectBrushService) 32 | { 33 | _projectBrushService = projectBrushService; 34 | } 35 | 36 | public void UpdateCollection( 37 | ICollectionView view, 38 | IUserPreferences userPreferences) 39 | { 40 | var collection = (IList) view.SourceCollection; 41 | 42 | foreach (var metadata in collection) 43 | { 44 | var brush = _projectBrushService.GetBrush( 45 | metadata.ProjectNames.FullName, 46 | userPreferences); 47 | 48 | metadata.ProjectBrush = brush; 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/ViewModel/ToolWindowCommands.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Collections.Generic; 19 | using System.Linq; 20 | using System.Windows.Input; 21 | using WorkingFilesList.Core.Interface; 22 | using WorkingFilesList.ToolWindow.ViewModel.Command; 23 | 24 | namespace WorkingFilesList.ToolWindow.ViewModel 25 | { 26 | public class ToolWindowCommands : IToolWindowCommands 27 | { 28 | public ICommand ActivateWindow { get; } 29 | public ICommand ClearFilterString { get; } 30 | public ICommand CloseDocument { get; } 31 | public ICommand OpenOptionsPage { get; } 32 | public ICommand OpenTestFile { get; } 33 | public ICommand ToggleIsPinned { get; } 34 | 35 | public ToolWindowCommands(IList commandCollection) 36 | { 37 | ActivateWindow = commandCollection.OfType().Single(); 38 | ClearFilterString = commandCollection.OfType().Single(); 39 | CloseDocument = commandCollection.OfType().Single(); 40 | OpenOptionsPage = commandCollection.OfType().Single(); 41 | OpenTestFile = commandCollection.OfType().Single(); 42 | ToggleIsPinned = commandCollection.OfType().Single(); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Reflection; 19 | using System.Runtime.InteropServices; 20 | 21 | // General Information about an assembly is controlled through the following 22 | // set of attributes. Change these attribute values to modify the information 23 | // associated with an assembly. 24 | [assembly: AssemblyTitle("WorkingFilesList")] 25 | [assembly: AssemblyDescription("Visual Studio extension that hosts tool window showing a selectable list of files that are open in the editor")] 26 | [assembly: AssemblyProduct("Working Files List")] 27 | [assembly: AssemblyCopyright("Copyright © 2016 Anthony Fung")] 28 | 29 | // Setting ComVisible to false makes the types in this assembly not visible 30 | // to COM components. If you need to access a type in this assembly from 31 | // COM, set the ComVisible attribute to true on that type. 32 | [assembly: ComVisible(false)] 33 | 34 | // Version information for an assembly consists of the following four values: 35 | // 36 | // Major Version 37 | // Minor Version 38 | // Build Number 39 | // Revision 40 | // 41 | // You can specify all the values or you can default the Build and Revision Numbers 42 | // by using the '*' as shown below: 43 | // [assembly: AssemblyVersion("1.0.*")] 44 | [assembly: AssemblyVersion("1.0.0.0")] 45 | [assembly: AssemblyFileVersion("1.0.0.0")] 46 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/ViewModel/Command/ClearFilterStringTests.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2019 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using Moq; 19 | using NUnit.Framework; 20 | using WorkingFilesList.Core.Interface; 21 | using WorkingFilesList.ToolWindow.ViewModel.Command; 22 | 23 | namespace WorkingFilesList.ToolWindow.Test.ViewModel.Command 24 | { 25 | [TestFixture] 26 | public class ClearFilterStringTests 27 | { 28 | [Test] 29 | public void CanExecuteReturnsTrue() 30 | { 31 | // Arrange 32 | 33 | var manager = Mock.Of(); 34 | var command = new ClearFilterString(manager); 35 | 36 | // Act 37 | 38 | var canExecute = command.CanExecute(null); 39 | 40 | // Assert 41 | 42 | Assert.IsTrue(canExecute); 43 | } 44 | 45 | [Test] 46 | public void ExecuteSetsDocumentMetadataManagerFilterStringToEmptyString() 47 | { 48 | // Arrange 49 | 50 | var manager = Mock.Of(); 51 | var command = new ClearFilterString(manager); 52 | 53 | // Act 54 | 55 | command.Execute(null); 56 | 57 | // Assert 58 | 59 | Mock.Get(manager).VerifySet(m => 60 | m.FilterString = string.Empty, 61 | Times.Once); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core.Test/Model/SortOption/DisableSortingTests.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using NUnit.Framework; 20 | using WorkingFilesList.Core.Model.SortOption; 21 | 22 | namespace WorkingFilesList.Core.Test.Model.SortOption 23 | { 24 | [TestFixture] 25 | public class DisableSortingTests 26 | { 27 | [Test] 28 | public void GetSortDescriptionThrowsNotSupportedException() 29 | { 30 | // Arrange 31 | 32 | var sortOption = new DisableSorting(); 33 | 34 | // Assert 35 | 36 | Assert.Throws(() => sortOption.GetSortDescription()); 37 | } 38 | 39 | [Test] 40 | public void HasSortDescriptionIsFalse() 41 | { 42 | // Arrange 43 | 44 | var sortOption = new DisableSorting(); 45 | 46 | // Assert 47 | 48 | Assert.IsFalse(sortOption.HasSortDescription); 49 | } 50 | 51 | [Test] 52 | public void ApplicableTypeIsCorrect() 53 | { 54 | // Arrange 55 | 56 | var sortOption = new DisableSorting(); 57 | 58 | // Act 59 | 60 | var isProjectType = 61 | sortOption.ApplicableType == ProjectItemType.Project; 62 | 63 | // Assert 64 | 65 | Assert.IsTrue(isProjectType); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList/ClassDiagram/NumericUpDown.cd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/ViewModel/UserPreference/UpdateReaction/ShowRecentUsageReactionTests.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using Moq; 19 | using NUnit.Framework; 20 | using System.Collections.Generic; 21 | using System.Windows.Data; 22 | using WorkingFilesList.Core.Interface; 23 | using WorkingFilesList.Core.Model; 24 | using WorkingFilesList.ToolWindow.Interface; 25 | using WorkingFilesList.ToolWindow.ViewModel.UserPreference.UpdateReaction; 26 | 27 | namespace WorkingFilesList.ToolWindow.Test.ViewModel.UserPreference.UpdateReaction 28 | { 29 | [TestFixture] 30 | public class ShowRecentUsageReactionTests 31 | { 32 | [Test] 33 | public void UpdateCollectionUsesNormalizedUsageOrderService() 34 | { 35 | // Arrange 36 | 37 | var serviceMock = new Mock(); 38 | 39 | var updateReaction = (IUpdateReaction)new ShowRecentUsageReaction( 40 | serviceMock.Object); 41 | 42 | var preferences = Mock.Of(); 43 | 44 | var collection = new List(); 45 | var view = new ListCollectionView(collection); 46 | 47 | // Act 48 | 49 | updateReaction.UpdateCollection(view, preferences); 50 | 51 | // Assert 52 | 53 | serviceMock.Verify(s => s.SetUsageOrder(collection, preferences)); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage.Test/ViewModel/DialoguePageCommandsTests.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using Moq; 19 | using NUnit.Framework; 20 | using System.Collections.Generic; 21 | using System.Windows.Input; 22 | using WorkingFilesList.Core.Interface; 23 | using WorkingFilesList.OptionsDialoguePage.Interface; 24 | using WorkingFilesList.OptionsDialoguePage.ViewModel; 25 | using WorkingFilesList.OptionsDialoguePage.ViewModel.Command; 26 | 27 | namespace WorkingFilesList.OptionsDialoguePage.Test.ViewModel 28 | { 29 | [TestFixture] 30 | public class DialoguePageCommandsTests 31 | { 32 | [Test] 33 | public void AllCommandsAreAssigned() 34 | { 35 | // Arrange 36 | 37 | var navigate = new Navigate(Mock.Of()); 38 | 39 | var resetSettings = new ResetSettings( 40 | Mock.Of(), 41 | Mock.Of()); 42 | 43 | var commandList = new List 44 | { 45 | navigate, 46 | resetSettings 47 | }; 48 | 49 | // Act 50 | 51 | var commands = new DialoguePageCommands(commandList); 52 | 53 | // Assert 54 | 55 | Assert.That(commands.Navigate, Is.EqualTo(navigate)); 56 | Assert.That(commands.ResetSettings, Is.EqualTo(resetSettings)); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/AboutPanelService.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.IO; 19 | using System.Reflection; 20 | using WorkingFilesList.Core.Interface; 21 | 22 | namespace WorkingFilesList.ToolWindow.Service 23 | { 24 | public class AboutPanelService : IAboutPanelService 25 | { 26 | public string AboutText { get; } 27 | 28 | public AboutPanelService() 29 | { 30 | const string aboutTextResourceName = 31 | "WorkingFilesList.ToolWindow.Service.AboutText.txt"; 32 | 33 | AboutText = GetLicenseText(aboutTextResourceName); 34 | } 35 | 36 | /// 37 | /// Retrieve text from an embedded resource 38 | /// 39 | /// Name of the resource to read 40 | /// The entire contents of the named resource 41 | private static string GetLicenseText(string resourceName) 42 | { 43 | var assembly = Assembly.GetExecutingAssembly(); 44 | string licenseText; 45 | 46 | using (var stream = assembly.GetManifestResourceStream(resourceName)) 47 | { 48 | using (var streamReader = new StreamReader(stream)) 49 | { 50 | licenseText = streamReader.ReadToEnd(); 51 | } 52 | } 53 | 54 | return licenseText; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Reflection; 19 | using System.Runtime.InteropServices; 20 | 21 | // General Information about an assembly is controlled through the following 22 | // set of attributes. Change these attribute values to modify the information 23 | // associated with an assembly. 24 | [assembly: AssemblyTitle("WorkingFilesList.Core")] 25 | [assembly: AssemblyDescription("Shared interfaces and data types")] 26 | [assembly: AssemblyProduct("Working Files List")] 27 | [assembly: AssemblyCopyright("Copyright © 2016 Anthony Fung")] 28 | 29 | // Setting ComVisible to false makes the types in this assembly not visible 30 | // to COM components. If you need to access a type in this assembly from 31 | // COM, set the ComVisible attribute to true on that type. 32 | [assembly: ComVisible(false)] 33 | 34 | // The following GUID is for the ID of the typelib if this project is exposed to COM 35 | [assembly: Guid("a0c5bdb5-6398-42a9-9262-463f15fd364b")] 36 | 37 | // Version information for an assembly consists of the following four values: 38 | // 39 | // Major Version 40 | // Minor Version 41 | // Build Number 42 | // Revision 43 | // 44 | // You can specify all the values or you can default the Build and Revision Numbers 45 | // by using the '*' as shown below: 46 | // [assembly: AssemblyVersion("1.0.*")] 47 | [assembly: AssemblyVersion("1.0.0.0")] 48 | [assembly: AssemblyFileVersion("1.0.0.0")] 49 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core.Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Reflection; 19 | using System.Runtime.InteropServices; 20 | 21 | // General Information about an assembly is controlled through the following 22 | // set of attributes. Change these attribute values to modify the information 23 | // associated with an assembly. 24 | [assembly: AssemblyTitle("WorkingFilesList.Core.Test")] 25 | [assembly: AssemblyDescription("Tests for WorkingFilesList.Core")] 26 | [assembly: AssemblyProduct("Working Files List")] 27 | [assembly: AssemblyCopyright("Copyright © 2016 Anthony Fung")] 28 | 29 | // Setting ComVisible to false makes the types in this assembly not visible 30 | // to COM components. If you need to access a type in this assembly from 31 | // COM, set the ComVisible attribute to true on that type. 32 | [assembly: ComVisible(false)] 33 | 34 | // The following GUID is for the ID of the typelib if this project is exposed to COM 35 | [assembly: Guid("6e9f5f41-aedd-4daf-86d5-73a0ccae1346")] 36 | 37 | // Version information for an assembly consists of the following four values: 38 | // 39 | // Major Version 40 | // Minor Version 41 | // Build Number 42 | // Revision 43 | // 44 | // You can specify all the values or you can default the Build and Revision Numbers 45 | // by using the '*' as shown below: 46 | // [assembly: AssemblyVersion("1.0.*")] 47 | [assembly: AssemblyVersion("1.0.0.0")] 48 | [assembly: AssemblyFileVersion("1.0.0.0")] 49 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Reflection; 19 | using System.Runtime.CompilerServices; 20 | using System.Runtime.InteropServices; 21 | 22 | // General Information about an assembly is controlled through the following 23 | // set of attributes. Change these attribute values to modify the information 24 | // associated with an assembly. 25 | [assembly: AssemblyTitle("WorkingFilesList.ToolWindow")] 26 | [assembly: AssemblyDescription("Tool window that shows a selectable list of files that are open in the editor")] 27 | [assembly: AssemblyProduct("Working Files List")] 28 | [assembly: AssemblyCopyright("Copyright © 2016 Anthony Fung")] 29 | 30 | // Setting ComVisible to false makes the types in this assembly not visible 31 | // to COM components. If you need to access a type in this assembly from 32 | // COM, set the ComVisible attribute to true on that type. 33 | [assembly: ComVisible(false)] 34 | 35 | // Version information for an assembly consists of the following four values: 36 | // 37 | // Major Version 38 | // Minor Version 39 | // Build Number 40 | // Revision 41 | // 42 | // You can specify all the values or you can default the Build and Revision Numbers 43 | // by using the '*' as shown below: 44 | // [assembly: AssemblyVersion("1.0.*")] 45 | [assembly: AssemblyVersion("1.0.0.0")] 46 | [assembly: AssemblyFileVersion("1.0.0.0")] 47 | 48 | [assembly: InternalsVisibleTo("WorkingFilesList.ToolWindow.Test")] 49 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/Service/DisplayNameHighlightEvaluator.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.IO; 19 | using WorkingFilesList.ToolWindow.Interface; 20 | 21 | namespace WorkingFilesList.ToolWindow.Service 22 | { 23 | public class DisplayNameHighlightEvaluator : IDisplayNameHighlightEvaluator 24 | { 25 | public string GetPreHighlight(string path, bool highlightFileName) 26 | { 27 | if (!highlightFileName) 28 | { 29 | return string.Empty; 30 | } 31 | 32 | var directory = Path.GetDirectoryName(path); 33 | 34 | var preHighlight = string.IsNullOrWhiteSpace(directory) 35 | ? string.Empty 36 | : directory + Path.DirectorySeparatorChar; 37 | 38 | return preHighlight; 39 | } 40 | 41 | public string GetHighlight(string path, bool highlightFileName) 42 | { 43 | if (!highlightFileName) 44 | { 45 | return path; 46 | } 47 | 48 | var highlight = Path.GetFileNameWithoutExtension(path); 49 | return highlight; 50 | } 51 | 52 | public string GetPostHighlight(string path, bool highlightFileName) 53 | { 54 | if (!highlightFileName) 55 | { 56 | return string.Empty; 57 | } 58 | 59 | var postHighlight = Path.GetExtension(path); 60 | return postHighlight; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage.Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Reflection; 19 | using System.Runtime.InteropServices; 20 | 21 | // General Information about an assembly is controlled through the following 22 | // set of attributes. Change these attribute values to modify the information 23 | // associated with an assembly. 24 | [assembly: AssemblyTitle("WorkingFilesList.OptionsDialoguePage.Test")] 25 | [assembly: AssemblyDescription("Tests for WorkingFilesList.OptionsDialoguePage")] 26 | [assembly: AssemblyProduct("Working Files List")] 27 | [assembly: AssemblyCopyright("Copyright © 2016 Anthony Fung")] 28 | 29 | // Setting ComVisible to false makes the types in this assembly not visible 30 | // to COM components. If you need to access a type in this assembly from 31 | // COM, set the ComVisible attribute to true on that type. 32 | [assembly: ComVisible(false)] 33 | 34 | // The following GUID is for the ID of the typelib if this project is exposed to COM 35 | [assembly: Guid("5bd1bfad-81a1-495e-9cdf-2bc38487f3b1")] 36 | 37 | // Version information for an assembly consists of the following four values: 38 | // 39 | // Major Version 40 | // Minor Version 41 | // Build Number 42 | // Revision 43 | // 44 | // You can specify all the values or you can default the Build and Revision Numbers 45 | // by using the '*' as shown below: 46 | // [assembly: AssemblyVersion("1.0.*")] 47 | [assembly: AssemblyVersion("1.0.0.0")] 48 | [assembly: AssemblyFileVersion("1.0.0.0")] 49 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage/ViewModel/Command/ResetSettings.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using System.Windows.Input; 20 | using WorkingFilesList.Core.Interface; 21 | 22 | namespace WorkingFilesList.OptionsDialoguePage.ViewModel.Command 23 | { 24 | public class ResetSettings : ICommand 25 | { 26 | private readonly IStoredSettingsRepository _settingsRepository; 27 | private readonly IUserPreferencesModelRepository _userPreferencesModelRepository; 28 | 29 | #pragma warning disable 67 30 | // ICommand interface member is only used by XAML 31 | public event EventHandler CanExecuteChanged; 32 | #pragma warning restore 67 33 | 34 | public ResetSettings( 35 | IStoredSettingsRepository settingsRepository, 36 | IUserPreferencesModelRepository userPreferencesModelRepository) 37 | { 38 | _settingsRepository = settingsRepository; 39 | _userPreferencesModelRepository = userPreferencesModelRepository; 40 | } 41 | 42 | public bool CanExecute(object parameter) 43 | { 44 | return true; 45 | } 46 | 47 | public void Execute(object parameter) 48 | { 49 | var model = parameter as IUserPreferencesModel; 50 | 51 | if (model != null) 52 | { 53 | _settingsRepository.Reset(); 54 | _userPreferencesModelRepository.LoadInto(model); 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow/ViewModel/OptionsLists.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Collections.Generic; 19 | using System.Linq; 20 | using System.Windows.Controls; 21 | using WorkingFilesList.Core.Interface; 22 | using WorkingFilesList.Core.Model.SortOption; 23 | using WorkingFilesList.ToolWindow.Interface; 24 | 25 | namespace WorkingFilesList.ToolWindow.ViewModel 26 | { 27 | /// 28 | /// Contains lists that UI controls can bind their 29 | /// property to 30 | /// 31 | public class OptionsLists : IOptionsLists 32 | { 33 | public IList DocumentSortOptions { get; } 34 | public IList ProjectSortOptions { get; } 35 | 36 | public OptionsLists( 37 | IList sortOptions, 38 | IDisplayOrderContainer sortOptionsDisplayOrder, 39 | ISortOptionsService sortOptionsService) 40 | { 41 | sortOptionsService.AssignDisplayOrder( 42 | sortOptionsDisplayOrder.DisplayOrder, 43 | sortOptions); 44 | 45 | DocumentSortOptions = sortOptions 46 | .Where(s => s.ApplicableType == ProjectItemType.Document) 47 | .OrderBy(s => s.DisplayIndex) 48 | .ToList(); 49 | 50 | ProjectSortOptions = sortOptions 51 | .Where(s => s.ApplicableType == ProjectItemType.Project) 52 | .OrderBy(s => s.DisplayIndex) 53 | .ToList(); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.OptionsDialoguePage/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System.Reflection; 19 | using System.Runtime.InteropServices; 20 | 21 | // General Information about an assembly is controlled through the following 22 | // set of attributes. Change these attribute values to modify the information 23 | // associated with an assembly. 24 | [assembly: AssemblyTitle("WorkingFilesList.OptionsDialoguePage")] 25 | [assembly: AssemblyDescription("Options page to complement tool window that shows a selectable list of files that are open in the editor")] 26 | [assembly: AssemblyProduct("Working Files List")] 27 | [assembly: AssemblyCopyright("Copyright © 2016 Anthony Fung")] 28 | 29 | // Setting ComVisible to false makes the types in this assembly not visible 30 | // to COM components. If you need to access a type in this assembly from 31 | // COM, set the ComVisible attribute to true on that type. 32 | [assembly: ComVisible(false)] 33 | 34 | // The following GUID is for the ID of the typelib if this project is exposed to COM 35 | [assembly: Guid("006b8580-c063-4478-818b-625783dada43")] 36 | 37 | // Version information for an assembly consists of the following four values: 38 | // 39 | // Major Version 40 | // Minor Version 41 | // Build Number 42 | // Revision 43 | // 44 | // You can specify all the values or you can default the Build and Revision Numbers 45 | // by using the '*' as shown below: 46 | // [assembly: AssemblyVersion("1.0.*")] 47 | [assembly: AssemblyVersion("1.0.0.0")] 48 | [assembly: AssemblyFileVersion("1.0.0.0")] 49 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/TestingInfrastructure/UserPreferencesBuilder.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using Moq; 19 | using System.Collections.Generic; 20 | using WorkingFilesList.Core.Interface; 21 | using WorkingFilesList.ToolWindow.ViewModel; 22 | 23 | namespace WorkingFilesList.ToolWindow.Test.TestingInfrastructure 24 | { 25 | internal class UserPreferencesBuilder 26 | { 27 | public IList SortOptions { get; set; } 28 | 29 | public Mock StoredSettingsRepositoryMock { get; } 30 | = new Mock(); 31 | 32 | public Mock UserPreferencesModelRepositoryMock { get; } 33 | = new Mock(); 34 | 35 | /// 36 | /// Create and return a new , configured 37 | /// with the properties available in this builder instance 38 | /// 39 | /// 40 | /// A new for use in unit tests 41 | /// 42 | public UserPreferences CreateUserPreferences() 43 | { 44 | if (SortOptions == null) 45 | { 46 | SortOptions = new List(); 47 | } 48 | 49 | var preferences = new UserPreferences( 50 | StoredSettingsRepositoryMock.Object, 51 | SortOptions, 52 | UserPreferencesModelRepositoryMock.Object); 53 | 54 | return preferences; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.Core/Controls/Command/DecrementNumericUpDownValue.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using System; 19 | using System.Windows.Input; 20 | using WorkingFilesList.Core.Interface; 21 | 22 | namespace WorkingFilesList.Core.Controls.Command 23 | { 24 | /// 25 | /// that decrements the 26 | /// property of the passed in as a parameter. This 27 | /// class should be bound to the appropriate button in a 28 | /// control template. 29 | /// 30 | public class DecrementNumericUpDownValue : ICommand 31 | { 32 | #pragma warning disable 67 33 | // ICommand interface member is only used by XAML 34 | public event EventHandler CanExecuteChanged; 35 | #pragma warning restore 67 36 | 37 | public bool CanExecute(object parameter) 38 | { 39 | return true; 40 | } 41 | 42 | public void Execute(object parameter) 43 | { 44 | var control = parameter as IIntValueControl; 45 | 46 | if (control != null && 47 | control.Value > control.Minimum) 48 | { 49 | // The minimum value should be checked before decrementing 50 | // Value: otherwise Value is updated by data binding before it 51 | // can be corrected (if necessary) by the value coercion 52 | // callback in NumericUpDown 53 | 54 | control.Value--; 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Solution/WorkingFilesList.ToolWindow.Test/Service/FilePathServiceTests.cs: -------------------------------------------------------------------------------- 1 | // Working Files List 2 | // Visual Studio extension tool window that shows a selectable list of files 3 | // that are open in the editor 4 | // Copyright © 2016 Anthony Fung 5 | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | 18 | using NUnit.Framework; 19 | using WorkingFilesList.ToolWindow.Service; 20 | 21 | namespace WorkingFilesList.ToolWindow.Test.Service 22 | { 23 | [TestFixture] 24 | public class FilePathServiceTests 25 | { 26 | [Test] 27 | public void OnePathSegmentIncludesFileOnly() 28 | { 29 | // Arrange 30 | 31 | var service = new FilePathService(); 32 | 33 | // Act 34 | 35 | var path = service.ReducePath(@"C:\Three\Two\One.txt", 1); 36 | 37 | // Assert 38 | 39 | Assert.That(path, Is.EqualTo(@"One.txt")); 40 | } 41 | 42 | [Test] 43 | public void TwoPathSegmentsIncludeFileAndOneParentDirectory() 44 | { 45 | // Arrange 46 | 47 | var service = new FilePathService(); 48 | 49 | // Act 50 | 51 | var path = service.ReducePath(@"C:\Three\Two\One.txt", 2); 52 | 53 | // Assert 54 | 55 | Assert.That(path, Is.EqualTo(@"Two\One.txt")); 56 | } 57 | 58 | [Test] 59 | public void FullNameIsReturnedIfPathSegmentCountIsGreaterThanSegmentsInFullName() 60 | { 61 | // Arrange 62 | 63 | const string fullName = @"C:\Three\Two\One.txt"; 64 | 65 | var service = new FilePathService(); 66 | 67 | // Act 68 | 69 | var path = service.ReducePath(fullName, 9); 70 | 71 | // Assert 72 | 73 | Assert.That(path, Is.EqualTo(fullName)); 74 | } 75 | } 76 | } 77 | --------------------------------------------------------------------------------