Intellij - Revert Template Edit - intellij-idea

This is referring to the templates for IntelliJ found at:
Settings -> Editor -> File and Code Templates
I made changes to the Class template and completely broke my ability to create Class files in IntelliJ. How can I revert my changes and put them back to the original values?
Thank you.

Ok this one I solved right after posting. There is a button at the top of the template dialog that reverts the changes back to the original value.
Maybe this will help someone in the future.

Related

Refactored "MySettings" to "Settings" on accident. Cannot revert back to normal

I was trying to troubleshoot why my default settings. Settings values weren't updating. Visual Studio showed me a recommended fix of refactoring "MySettings" to "Settings" and now every reference to My.Settings is broken and the word settings has turned green (used to be white).
I tried just hitting the undo button, and then closing without saving. But it didn't fix anything. Makes me think it isn't a project issue but a VS2016 issue.
My.Settings.ActiveDrive = My.Settings.Default.ActiveDrive
My.Settings.Save()
This is the code I was altering. I was trying to error proof my code and reset the value to the default to simulate a new user with no saved settings yet. Then I switched Settings to MySettings to see if that'd do anything and VS asked if I wanted to refactor MySettings to just Settings. I said yes... And now the code is broken.
I just want Settings to go back to normal. The way it worked before I hit "refactor MySettings".
I was actually able to figure it out.
For anyone out there that runs into this issue in the future (Since I found 0 results on google about this), you simply go to your solution explorer in the top right, click the drop down icon next to Settings.settings, double click on Settings.Designer.vb, ctrl+f and search for "settings" and rename any class designated "Settings" result back to "MySettings". Don't rename the other "Settings" appearances otherwise it'll break again.
Then your code will go back to having a read-only "settings" option and a class option called "MySettings".

File changes do not show up in Visual Studio Code (VSCode)

I'm experimenting with VSCode(specifically version 1.17.1),
and I noticed if I change the content of some files programatically, the updated content doesn't appear immediately and I need to close and reopen the file!
Is this a common issue with VSCode, and how to solve it if there is any solution that doesn't involve a refresh command or a key binding like alt+f5.
Thank you in advance.

IntelliJ File and Template Macro Missing

I just updated my IntelliJ and have found that when I create a new class or page the auto completion tags are not generated anymore. Meaning that I get a blank page with no tags. I assume it was a Macro that was helping to generate these header and footer tags. Does anyone know if there is another way of re-instantiating this functionality? If the only way to do this is via File and Code Templates, does anyone have the macros for the tags? Thank you!!
Picture 1 is what the class looks like when I create a new class. I then have to manually add in the tags as you can see in picture 2. Before the update intellij was auto populating the class name and the brackets.
After speaking with support, it appears there is a bug in one version down from 2017.2.2 of intelliJ.
After I updated my intelliJ, my templates were being populated again. Here is the link to the download:
https://www.jetbrains.com/idea/download/#section=windows

Intellij new Java Class opening a different dialog than usual

When creating a new java class via new -> Java Class while using IntelliJ IDE, a random Dialog started appearing, and I can't find how to disable it.
This is the strange dialog that started showing, a sort of a wizard. Clicking the help button get's me There is no help for this dialog message.
How can I disable this window in the Intellij IDEA?
I too had the same problem, the exact same dialog. In my case, it actually ended up not being a bug, but IJ acting properly (kinda).
TL;DR: The template code for creating a "Class" object got automagically changed after an IJ update so that it would prompt for answers from the coder when creating a new class file. Changing it back in "Settings/File and Code Templates" to the default template code removes the problem, as the default template code does not use any variables that are prompted for upon class object creation (ex.: ${IMPORT_BLOCK}).
Long version ...
Bring up the Settings dialog for IJ, and in the search field type "template", and then select the "File and Code Templates" option. You'll see on the right side of the dialog the "Editor > File and Code Templates" area. If you select "Class" from the list of template types, to the right of that list of template types you'll see the template used when you create a class ...
Now I don't know why, but after a particular IJ update some months back, via their Toolbox app, the default template text/code was different, so that it looked like this ...
... and that latter template code/text caused the second dialog to appear that you see.
To fix the problem, highlight the "Class" template from the list, then click on the "Reset to Default" button that appears below the Files/Includes/Code/Other tabs (looks like a piece of paper with a 180 degree curving arrow on top of it), so that the template text goes back to what I have showing in the first screenshot, and then select the OK button.
Assuming your "default" template for the Class template is not corrupted/bad, you should no longer see the dialog that you asked about.
Go to Settings/File and Code Templates -> class and change it to:
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public class ${NAME} {
}
You can also try hitting the reset to default button, as Adrian Romanelli suggested.

Intellij 13 merge conflicts dialog loses gets stuck

I am having a problem with Intellij 13 when merging conflicts. When I apply my last merge change, Intellij tries to show me the "Save and finish" dialog, but apparently the merge window remains above that one (which loses its focus). At that point I cannot click on any part of Intellij and I have to kill the process.
I remember reading something about this and a change to idea.properties was the solution proposed, but I cannot find that discussion again.
Is there anyone who has a solution for this or remember the right property to add to idea.properties?
Thanks!
I was actually able to find it.
On a mac you need to add this property to the idea.properties file:
ide.mac.message.dialogs.as.sheets=false
And the problem disappear.
Thanks!
Roberto