How To Restore Resharper Options from Computer - resharper

With the release version of ReSharper, I made lots of ReShaper option changes. In each case, I chose to save those changes to my computer, rather than the solution or source control.
Unfortunately, I incautiously installed the 2021.1 EAP 9 version, then made lots of changes to those options, also saving them to the computer. Don't think that was a very smart move. This version, I think, is causing me all kinds of fits with code hints/completions, to the point where it takes many tries to code a simple method.
I am going to downgrade to the latest release version, but want to restore all those options changes from the options XML file on my computer. However, I can't find a means to import the file.
How does one do this?
Thanks

If you're asking how to import an XML file with settings, then open the "Extensions | ReSharper | Manage Options" dialog and then "Import and Export | Import from File".

Related

Any way to circumvent inbuilt auto save in android studio?

The current Android Studio version has inbuilt auto save. Which means if you close a file, it will automatically save the changes.
This is inconvenient, it means when experimenting with code, all changes need to be noted as there's no option to have a dialog requesting to save changes on closing a tab or the project, as in many other ides.
According to documentation IntelliJ IDEA 15.0 Help/Saving and Reverting Changes:
When does IntelliJ IDEA auto save changed files?
Autosave is initiated by:
Compiling a project, a module or a class
Starting a run/debug configuration
Performing a version control operation such as pull, commit, push, etc.
Closing a file in the editor
Closing a project
Quitting the IDE
.../...
Note that those are optional autosave triggers, and you cannot turn off autosave completely.
These are the auto save settings that can be changed in Android Studio:
TLDR
Is there any work around to circumvent this autosave?
These questions are related, but do not acknowledge that this intended behaviour of the ide and are rather asking for fixes within the ide.
Related:
How to disable Auto Save save in Android Studio
How turn off autosave in Android Studio?
If you want to experiment, use the revert button at the top right. This works especially well if you are using a VCS (like git...) as it will revert to the last committed version. And since commits are still manual, this will soon replace your traditional save.
If you are not using a VCS the point in time to which it reverts is a little more arbitrary, but in my experience it takes a pretty good guess. If that doesn't suffice, you can use the history button next to the revert button, which keeps track of every version IntelliJ saved, and you can then go back to any point in time you like. :)
Android Studio as a software is very much based on the JetBrains software solutions such as IntelliJ (used for Java) and PHPStorm (used for PHP, as its name shows).
As a concept in itself, JetBrains have implemented this feature and as a company believe that it's much more efficient and productive than manual save. Hence, there is no way to disable this behavior or enable any confirmations in Android Studio either.
Taken from JetBrains FAQ for IntelliJ:
Because IntelliJ IDEA has the ability to change so many files simultaneously in large refactoring actions, and change them without ever opening them, single file saves don't make very much sense. In recognition of this, IntelliJ IDEA reserves the right to save any of your files literally whenever it wishes. It's actually quite nice to never have to worry about your file's save statuses, once you get used to it.
Having said that, and encountering this issue myself too as a developer, I agree that it would be a good idea if the Manual Save feature were enabled by the Android Engineers (or JetBrains themselves). After all it is up to the developer to choose whether he needs this feature or not.
To Jetbrain's defence, they have a very good Undo function through their Ctrl + Z shortcut keys, letting the developer go back many steps and find where a certain error has occured.
All IntelliJ based products nowadays save any opened or modified files whenever they wish - read this as "immediately".
I would suggest you give up on trying to disable it (trust me, it's not possible to hack it) and either change your work flow or work on copies of the files.
As background I should mention that I am a plugins author for IntelliJ (with 3 publicly released plugins in the JetBrains repository) and thus have a reasonable understanding of the internal IntelliJ architecture.

How to add gvim icon to openwith menu

I have installed gvim in windows 7. When I right click on a file, I get list of editor to be opened with. I see a icon for notepad++, 7zip and beyond compare, but not for vim. it is tough to search "Edit with Vim" in the big list. Is it possible to add icon to "Edit with Vim". I tried setting ICON in registry to gvim.exe path, but that didn't work
I am currently having a crack at coding this up "for real" (but no success yet).
In the meantime, here's what I did on my machine as a sort of workaround:
Create a new text file and call it (for example) vim.reg
and paste this into the file:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Edit with Vim]
"Icon"="\"C:\\Program Files (x86)\\Vim\\vim74\\gvim.exe\""
[HKEY_CLASSES_ROOT\*\shell\Edit with Vim\command]
#="\"C:\\Program Files (x86)\\Vim\\vim74\\gvim.exe\" \"%1\""
and then right-click on the file and select Merge.
Or just manually add those keys directly in RegEdit if you're comfortable with that.
You may need to restart Explorer.exe (eg. log out and back in) for it to take effect.
This will add a new "Edit with vim" entry, with the icon, to the context menu for every filetype.
If you want it only for text files, for example, then change the two occurrences of "*" in the file to "txtfile".
The other vim context menu entries (eg. open with existing vim session) will not be affected - they will still not have icons.
UPDATE:
From the bug report that Christian mentioned, it looks like someone else has now implemented this, in version 7.4.724.
Vim.org reports that the currently release is 7.4.729, so it should include that.
The only trouble is that the Windows binaries available for download from the site are from 2013.
But vim.org also suggests a way to get the latest version, precompiled for Windows:
For the latest version with all patches included see Cream below.
These versions are unofficial, but the download number is high and
complaints are few.
And
For an unofficial version that does include all the latest patches and
optionally a bit more: Cream.
The "one-click installer" mentioned includes the Cream changes.
For the "real Vim" use the "without Cream" version listed further down.
As far as I know, this is not possible yet. There is a whishlist bug that requests this feature, but no one has contributed code yet.

Monodevelop - when does it save csproj files?

When MonoDevelop crashes (somewhat often unfortunately) I usually have to re-do changes to the project that seem to not be written to disk. As a result my work flow has become - change project, restart monodevelop (hoping changes are saved during a close). I find this to be a little frustrating. Ideally there would be an explicit save button in the UI so that I know for a fact my changes are written when I expected them to be. I am not sure where to file enhancements requests - through Xamarin (since this is monodevelop with monotouch)? Any chance someone has written an Add-In to do this?
If everything is OK with your MD installation the Save All command/button should save all the project files and solution. I regularly use this command as a safeguard. On my experience just hitting Save only saves the file you are editing on the moment, keeping the solution and project files unsaved.

ReSharper Settings Grayed Out

Today I tried to made "Code Cleanup" of single file in ReSharper 6.0 (VS 2010). The Code Cleanup dialog did not show up so I tried again.
I then discovered, that the feature is grayed out and when I press hotkey for Code Cleanup, the notification area shows that the "command is not available at the moment".
Even the Code Cleanup settings are hidden. The panel where settings should be shown says that the settings are solution-specific and thus a solution needs to be opened (although it is, however).
All other solution-specific settings and features work, except for Code Cleanup.
I want to avoid re-installing ReSharper or resetting its settings, because otherwise I would need to set it up again (long and annoying work of setting all the options as before re-install).
I am afraid that backing up settings and restoring it again restores the problem as well.
Any suggestions?
Suggestions:
Ensure that the file that you're trying to cleanup is included in your solution.
Try to reopen solution (close and then open again).
Upgrade to 6.1.1, maybe its fixed there.
File a bug report at http://youtrack.jetbrains.com
Both ReSharper 7 and 8 seems to work OK.
I know this is an old answer, but I found a little more insight on this. According to Jerrie Pelser in this blog post from last year, this may have to do with the file being part of a NuGet package. In my case, this was definitely it!
In case of link rot, basically the post mentions that ReSharper will avoid refactoring/code cleaning for files it detects were added as part of NuGet packages. This is similar to how it will not allow code cleanup for generated code.

How do I backup my C++ Builder component installation?

I finally have my C++ Builder 2010 installation the way I want it, with all my components upgraded and installed. (touch wood)
I have been working with C++builder since version 1 and I know from countless previous traumatic experiences that this state of affairs could change in an instant. I would like to backup the installation and component set.
Is there a way to do this? A tool perhaps? A menu command that I have maybe missed all these years? I don't want to have to reinstall all the components from the bpl source again.
I make nightly backup images of my entire drive, I would like to do this for c++builder only if possible.
If it's a matter of simply copying files, which files would I need to copy? Are there entries in the registry that would need to be restored?
Thanks in advance for any thoughts and suggestions
The HKCU\Software\CodeGear\BDS\7.0\ registry section contains the "known packages" subtree that contains which components you have installed. reg export/import should save you some trouble.
You'll also want to backup/restore the actual files referenced there as well.
It has been a while since I used C++ Builder, but I will make two suggestions...
1) run regedit and looks for "builder". You will probably find a hive like hk_local_machine/software/codegear or such. Export that and you can import it later
2) have a look at GExperts - is they don't have the exact solution, they still have some pretty useful (and free) tools

Resources