├── .gitattributes ├── .gitignore ├── icon.png ├── images ├── clippy_in_action.png ├── inplace_refactoring.gif └── unit_tests.gif ├── install └── resharper-clippy.nuspec ├── lib ├── DoubleAgent-01-expose_character_window.patch ├── DoubleAgent-02-show_not_activate.patch ├── DoubleAgent.Control.dll ├── x64 │ ├── Debug │ │ ├── DaControl.dll │ │ ├── DaControl.pdb │ │ ├── DaCore.dll │ │ └── DaCore.pdb │ └── Release │ │ ├── DaControl.dll │ │ └── DaCore.dll └── x86 │ ├── Debug │ ├── DaControl.dll │ ├── DaControl.pdb │ ├── DaCore.dll │ └── DaCore.pdb │ └── Release │ ├── DaControl.dll │ └── DaCore.dll ├── license.txt ├── readme.md ├── src ├── .idea │ └── .idea.resharper-clippy │ │ └── .idea │ │ ├── .gitignore │ │ ├── .name │ │ ├── encodings.xml │ │ ├── indexLayout.xml │ │ ├── runConfigurations │ │ └── VisualStudio.xml │ │ └── vcs.xml ├── Directory.Build.props ├── Plugin.props ├── TestHarness │ ├── App.config │ ├── App.xaml │ ├── App.xaml.cs │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ └── TestHarness.csproj ├── resharper-clippy.sln ├── resharper-clippy.sln.DotSettings ├── resharper-clippy │ ├── AgentFiles.proj │ ├── DoubleAgent.x64.sxs.manifest │ ├── DoubleAgent.x86.sxs.manifest │ ├── readme.md │ ├── resharper-clippy.csproj │ └── src │ │ ├── AgentApi │ │ ├── Agent.cs │ │ ├── AgentCharacter.cs │ │ ├── AgentManager.cs │ │ ├── Balloon │ │ │ ├── BalloonActionEventArgs.cs │ │ │ ├── BalloonStyles.xaml │ │ │ ├── BalloonWindow.xaml │ │ │ ├── BalloonWindow.xaml.cs │ │ │ ├── BalloonWindowHost.cs │ │ │ ├── Commands.cs │ │ │ ├── CustomChromeForm.cs │ │ │ ├── DefaultStyles.xaml │ │ │ ├── Indexed.cs │ │ │ └── JustifiedUniformGrid.cs │ │ ├── BalloonManager.cs │ │ ├── BalloonOption.cs │ │ ├── ICharacterEvents.cs │ │ ├── IUntypedSignalEx.cs │ │ ├── IWin32WindowEx.cs │ │ ├── OleWin32Window.cs │ │ └── SxS │ │ │ └── ActivationContext.cs │ │ ├── AgentClickHandler.cs │ │ ├── AltEnterHandler.cs │ │ ├── BuildAnimations.cs │ │ ├── ClippySettings.cs │ │ ├── HighlightingTracker.cs │ │ ├── InplaceRefactoringHandler.cs │ │ ├── OverriddenActions │ │ ├── AgentExtensibleAction.cs │ │ ├── FileTemplatesGenerateAction.cs │ │ ├── GenerateAction.cs │ │ ├── GotoRecentFilesAction.cs │ │ ├── IOriginalActionHandler.cs │ │ ├── InspectThisAction.cs │ │ ├── NavigateFromHereAction.cs │ │ └── RefactorThisAction.cs │ │ ├── OverridingActionRegistrar.cs │ │ ├── SaveAnimations.cs │ │ ├── SolutionVisibilityScope.cs │ │ ├── UnitTestAnimations.cs │ │ └── ZoneMarker.cs ├── runVisualStudio.ps1 └── settings.ps1 └── tools ├── nuget.exe └── vswhere.exe /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | install/*.nupkg 2 | src/output/*.nupkg 3 | 4 | *.log 5 | 6 | # Include the custom builds of the DoubleAgent dll, don't include the character file(s) 7 | !lib/ 8 | lib/*.acs 9 | 10 | # User-specific files 11 | *.suo 12 | *.user 13 | *.sln.docstates 14 | 15 | build/ 16 | [Bb]in/ 17 | [Oo]bj/ 18 | .vs/ 19 | 20 | Thumbs.db 21 | Desktop.ini 22 | .DS_Store 23 | 24 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/icon.png -------------------------------------------------------------------------------- /images/clippy_in_action.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/images/clippy_in_action.png -------------------------------------------------------------------------------- /images/inplace_refactoring.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/images/inplace_refactoring.gif -------------------------------------------------------------------------------- /images/unit_tests.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/images/unit_tests.gif -------------------------------------------------------------------------------- /install/resharper-clippy.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CitizenMatt.Clippy 5 | Clippy for ReSharper 6 | 1.2.0 7 | Matt Ellis 8 | Matt Ellis 9 | A digital assistant to help you with all your ReSharper needs! 10 | • Updated for ReSharper 10 11 | http://github.com/citizenmatt/resharper-clippy 12 | http://raw.github.com/citizenmatt/resharper-clippy/master/icon.png 13 | Copyright 2015 Matt Ellis 14 | false 15 | 16 | 17 | 18 | resharper clippy 19 | 20 | 21 | 23 | 25 | 27 | 29 | 31 | 33 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /lib/DoubleAgent-01-expose_character_window.patch: -------------------------------------------------------------------------------- 1 | Index: DaCtlCharacter.cpp 2 | =================================================================== 3 | --- DaCtlCharacter.cpp (revision 497) 4 | +++ DaCtlCharacter.cpp (working copy) 5 | @@ -5407,3 +5407,25 @@ 6 | #endif 7 | return lResult; 8 | } 9 | + 10 | +HRESULT STDMETHODCALLTYPE DaCtlCharacter::GetWindow(HWND *phwnd) 11 | +{ 12 | + if (!phwnd) return E_POINTER; 13 | + *phwnd = NULL; 14 | + 15 | + if (mLocalObject) 16 | + { 17 | + CAgentCharacterWnd* agentCharacterWnd = mLocalObject->GetCharacterWnd(); 18 | + if (agentCharacterWnd) 19 | + { 20 | + *phwnd = (HWND) *agentCharacterWnd; 21 | + return S_OK; 22 | + } 23 | + } 24 | + return S_FALSE; 25 | +} 26 | + 27 | +HRESULT STDMETHODCALLTYPE DaCtlCharacter::ContextSensitiveHelp(BOOL fEnterMode) 28 | +{ 29 | + return E_NOTIMPL; 30 | +} 31 | \ No newline at end of file 32 | Index: DaCtlCharacter.h 33 | =================================================================== 34 | --- DaCtlCharacter.h (revision 497) 35 | +++ DaCtlCharacter.h (working copy) 36 | @@ -30,6 +30,7 @@ 37 | public CComCoClass, 38 | public IDispatchImpl, 39 | public IProvideClassInfoImpl<&__uuidof(DaCtlCharacter), &__uuidof(DoubleAgentCtl_TypeLib), DoubleAgentCtl_MajorVer, DoubleAgentCtl_MinorVer>, 40 | + public IOleWindow, 41 | public ISupportErrorInfo 42 | { 43 | public: 44 | @@ -77,6 +78,7 @@ 45 | COM_INTERFACE_ENTRY_IID(__uuidof(IAgentCtlCharacterEx), IDaCtlCharacter2) 46 | COM_INTERFACE_ENTRY(ISupportErrorInfo) 47 | COM_INTERFACE_ENTRY(IProvideClassInfo) 48 | + COM_INTERFACE_ENTRY(IOleWindow) 49 | END_COM_MAP() 50 | 51 | BEGIN_CATEGORY_MAP(DaCtlCharacter) 52 | @@ -199,6 +201,10 @@ 53 | HRESULT STDMETHODCALLTYPE get_SuspendHide (VARIANT_BOOL *Enabled); 54 | HRESULT STDMETHODCALLTYPE SetSize (short Width, short Height); 55 | 56 | + // IOleWindow 57 | + HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd); 58 | + HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); 59 | + 60 | // Implementation 61 | public: 62 | IDispatchPtr mBalloon; 63 | -------------------------------------------------------------------------------- /lib/DoubleAgent-02-show_not_activate.patch: -------------------------------------------------------------------------------- 1 | Index: Control/DaCtlCharacters.cpp 2 | =================================================================== 3 | --- Control/DaCtlCharacters.cpp (revision 497) 4 | +++ Control/DaCtlCharacters.cpp (working copy) 5 | @@ -559,7 +559,7 @@ 6 | && (SUCCEEDED (lResult = CComObject ::CreateInstance (lCharacter.Free()))) 7 | && (SUCCEEDED (lResult = lCharacter->SetOwner (mOwner))) 8 | && (SUCCEEDED (lResult = lCharacter->mLocalObject->OpenFile (lAgentFile, lFilePathIsDefault))) 9 | - && (SUCCEEDED (lResult = lCharacter->mLocalObject->RealizePopup (mOwner, mOwner->mLocalCharacterStyle, WS_EX_TOPMOST))) 10 | + && (SUCCEEDED (lResult = lCharacter->mLocalObject->RealizePopup (mOwner, mOwner->mLocalCharacterStyle, 0))) 11 | ) 12 | { 13 | if (lLoadFile == lAgentFile) 14 | Index: Control/LocalCharacter.cpp 15 | =================================================================== 16 | --- Control/LocalCharacter.cpp (revision 497) 17 | +++ Control/LocalCharacter.cpp (working copy) 18 | @@ -230,7 +230,7 @@ 19 | && (lPopupWnd = GetPopupWnd (false)) 20 | ) 21 | { 22 | - lPopupWnd->ShowWindow (SW_SHOW); 23 | + lPopupWnd->ShowWindow (SW_SHOWNA); 24 | } 25 | 26 | if ( 27 | Index: Core/AgentPopupWnd.cpp 28 | =================================================================== 29 | --- Core/AgentPopupWnd.cpp (revision 497) 30 | +++ Core/AgentPopupWnd.cpp (working copy) 31 | @@ -554,7 +554,7 @@ 32 | UpdateNotifyIcon (); 33 | if (pLastActive) 34 | { 35 | - BringWindowToTop (); 36 | + SetWindowPos(HWND_TOP, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW | SWP_NOOWNERZORDER); 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /lib/DoubleAgent.Control.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/lib/DoubleAgent.Control.dll -------------------------------------------------------------------------------- /lib/x64/Debug/DaControl.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/lib/x64/Debug/DaControl.dll -------------------------------------------------------------------------------- /lib/x64/Debug/DaControl.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/lib/x64/Debug/DaControl.pdb -------------------------------------------------------------------------------- /lib/x64/Debug/DaCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/lib/x64/Debug/DaCore.dll -------------------------------------------------------------------------------- /lib/x64/Debug/DaCore.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/lib/x64/Debug/DaCore.pdb -------------------------------------------------------------------------------- /lib/x64/Release/DaControl.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/lib/x64/Release/DaControl.dll -------------------------------------------------------------------------------- /lib/x64/Release/DaCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/lib/x64/Release/DaCore.dll -------------------------------------------------------------------------------- /lib/x86/Debug/DaControl.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/lib/x86/Debug/DaControl.dll -------------------------------------------------------------------------------- /lib/x86/Debug/DaControl.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/lib/x86/Debug/DaControl.pdb -------------------------------------------------------------------------------- /lib/x86/Debug/DaCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/lib/x86/Debug/DaCore.dll -------------------------------------------------------------------------------- /lib/x86/Debug/DaCore.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/lib/x86/Debug/DaCore.pdb -------------------------------------------------------------------------------- /lib/x86/Release/DaControl.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/lib/x86/Release/DaControl.dll -------------------------------------------------------------------------------- /lib/x86/Release/DaCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/citizenmatt/resharper-clippy/5df79e8c51d038941605283cd596861a4c44427d/lib/x86/Release/DaCore.dll -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | Copyright 2024 Matt Ellis 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Clippy for ReSharper # 2 | 3 | ReSharper is, obviously, awesome. It does so much for you already, what could you possibly add to make life even more awesomer? 4 | 5 | Clippy. That's what. 6 | 7 | ![Clippy says "it looks like you're refactoring. Would you like help?"](images/inplace_refactoring.gif) 8 | 9 | This is a plugin for ReSharper to add Clippy support to your day to day ReSharper activities. It's fully operational. It handles/takes over: 10 | 11 | * Alt+Enter 12 | * Navigate To shortcut 13 | * Refactor This shortcut 14 | * Inspect This shortcut 15 | * Generate (class, ctor, equality, etc) and Generate From Template shortcuts 16 | * Go to recent files and go to recent edits 17 | * In place refactoring, such as renaming a variable or class (my favourite) 18 | * Reporting unit test runs 19 | * Various animations for build, running unit tests, saving, etc. 20 | 21 | And it provides a simple menu of items when you click Clippy, providing quick access to the Refactoring, Navigate, Analyze and Generate methods, as well as Code Cleanup, Find Usages and Go to Symbol. 22 | 23 | ![Clippy showing the Navigate to, Refactor This and Generate menus](images/clippy_in_action.png) 24 | 25 | You can install it using the Extension Manager. Go to ReSharper -> Extension Manager -> Online and search for "clippy". Once installed, there's nothing more you need to do, just open a solution and off you go. Clippy will popup and intercept all your favourite keystrokes. 26 | 27 | For more information, [see the original blog post](http://blog.jetbrains.com/dotnet/2014/04/01/clippy-for-resharper). 28 | 29 | ![Clippy running unit tests](images/unit_tests.gif) 30 | 31 | ## Building ## 32 | 33 | This extension uses the open source [Double Agent](http://doubleagent.sourceforge.net/) library to host the Agent. Some minor changes were made for the binary that is shipped - patches are included in the repo. It also does some nice side-by-side activation context to load an unregistered COM object. Thanks to [Samuel Jack](http://blog.functionalfun.net/2012/09/a-quick-guide-to-registration-free-com.html), [Spike McLarty](http://www.atalasoft.com/blogs/spikemclarty/february-2012/dynamically-testing-an-activex-control-from-c-and) and [Junfeng Zhang](http://blogs.msdn.com/b/junfeng/archive/2006/04/20/579748.aspx) for notes on getting that working. See the [src/resharper-clippy/readme.md](src/resharper-clippy/readme.md) for more details. 34 | 35 | It also uses the ReSharper SDK, which is referenced as NuGet packages. 36 | -------------------------------------------------------------------------------- /src/.idea/.idea.resharper-clippy/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Rider ignored files 5 | /modules.xml 6 | /.idea.resharper-clippy.iml 7 | /contentModel.xml 8 | /projectSettingsUpdater.xml 9 | # Editor-based HTTP Client requests 10 | /httpRequests/ 11 | # Datasource local storage ignored files 12 | /dataSources/ 13 | /dataSources.local.xml 14 | -------------------------------------------------------------------------------- /src/.idea/.idea.resharper-clippy/.idea/.name: -------------------------------------------------------------------------------- 1 | resharper-clippy -------------------------------------------------------------------------------- /src/.idea/.idea.resharper-clippy/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/.idea/.idea.resharper-clippy/.idea/indexLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/.idea/.idea.resharper-clippy/.idea/runConfigurations/VisualStudio.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | -------------------------------------------------------------------------------- /src/.idea/.idea.resharper-clippy/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Latest 5 | MSB3277 6 | true 7 | false 8 | None 9 | 10 | obj\$(MSBuildProjectName)\ 11 | $(DefaultItemExcludes);obj\** 12 | bin\$(MSBuildProjectName)\$(Configuration)\ 13 | 14 | 15 | 16 | TRACE;DEBUG;JET_MODE_ASSERT 17 | 18 | 19 | 20 | 21 | 22 | $(SdkVersion.Substring(2,2))$(SdkVersion.Substring(5,1)).0.0 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | JetResourceGenerator 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/Plugin.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 2024.1.4 7 | 8 | Clippy for ReSharper 9 | Your automated ReSharper assistant 10 | 11 | Matt Ellis 12 | Copyright Matt Ellis, $([System.DateTime]::Now.Year) 13 | resharper plugin clippy 14 | 15 | 1.3.0.0 16 | 1.3.0.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/TestHarness/App.config: -------------------------------------------------------------------------------- 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 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /src/TestHarness/App.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/TestHarness/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace TestHarness 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/TestHarness/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 |