I use code regions in Android Studio this way:
When collapsing all my code, Android Studio used to do this:
But with the latest update (3.1.1), it now does this:
Is there a way to revert to the previous behaviour?
EDIT: yes I've been to Preference > Editor > General > Code folding. I unchecked all the boxes, restarted, the problem is still there.
Related
In my GitHub README.md file, which is in the root of my Android project, I have code snippets like the following ones:
```xml
android:windowSoftInputMode="stateHidden"
```
```java
MongolToast.makeText(getApplicationContext(), "ᠰᠠᠢᠨ ᠪᠠᠢᠨᠠ ᠤᠤ︖", MongolToast.LENGTH_LONG).show();
```
However, in Android Studio these code snippets give errors
I don't want to be warned of supposed code errors in the README file. How do I disable all errors here?
Notes:
I know how to suppress inspections normally in code with #SuppressLint or going into settings and unchecking the lint inspection. I don't want these errors to be suppressed in other areas of my project, though.
Somewhat similar question (without an answer): Android Studio - disable errors highlighting for excluded files
After doing some further research I come to conclusion that these errors are not from Android Studio itself but there are plugins for markdown format like Markdown Navigator and Markdown Support if any of them is installed and enabled then you will see above errors in README.md file.
I think this spell check is built in feature of these plugins and can not be controlled from Android Studio.
One option what I think is to disable these plugins and you are good to go.
You can disable these plugins from (Android Studio 3.1.4 MacOS) Preferences > Plugins (or File > Settings > Plugins in Linux) by unchecking them and restart (don't forget it) your Android Studio:
First you need to create a scope (Settings->Scope)
and add the files you want to keep out of scope for the Lints you wanna suppress.
Then go to Settings->Inspections, chose the inspection you wanna remove,
and then on the right choose from the drop down your scope to define the wanted behavior.
In this case, my scope is called AVOID_LINTS, and won't show any typo warnings.
EDIT
In the first step, when you create the scope, you need to add your README to the new scope.
EDIT2
Where to find the scopes:
You may search for the files you want to add, select and click include.
Remove code type annotation, change from:
```xml
android:windowSoftInputMode="stateHidden"
```
```java
MongolToast.makeText(getApplicationContext(), "ᠰᠠᠢᠨ ᠪᠠᠢᠨᠠ ᠤᠤ︖", MongolToast.LENGTH_LONG).show();
```
change to:
```
android:windowSoftInputMode="stateHidden"
```
```
MongolToast.makeText(getApplicationContext(), "ᠰᠠᠢᠨ ᠪᠠᠢᠨᠠ ᠤᠤ︖", MongolToast.LENGTH_LONG).show();
```
Newer versions of Android Studio starting with 2022.2.1 Flamingo (at least from Beta 1) have an option to toggle "Show problems in code fences" under Preferences > Languages & Frameworks > Markdown.
Note that this toggles all problem types at the same time (typos, warnings and errors).
I have turned off Code Folding using the procedure described here.
However, my imports are still folded away, hidden by an Ellipsis, as shown here:
I really don't see the point of having code hidden away so that extra key presses or mouse clicks are required to see it.
How can I make Android Studio just show me everything?
Launch Android Studio
Configure > Settings > Editor > General > Code Folding
Uncheck "Imports"
I am wondering whether there is a way to increase the amount of times one can use the undo button in Android Studio. I couldn't find it in settings.
At the moment after a few undos, it stops allowing further ones.
Follow this:
From menu on the top Go to Help > Find Action > Type Registry > It will open Registry Dialog > start typing undo > you will find "undo:globalUndoLimit" > change it from 100 to 1000 or any higher.
Since Android Studio is a fork of JetBrains IntelliJ, this should work.
Alternative Link: How to increase undo and redo steps in android studio
After installing Resharper 8 on Visual Studio 2012 my TODOs are now a retina-searing blue of which this screenshot does not do justice:
I've found similar questions here and here they don't seem to apply to VS2012 and/or RS8, as there is no "Resharper Todo Item" nor any other Resharper items under the Display Items for Fonts & Colors.
Just to post a possible workaround if somebody has the same behavior - apply actions from the following article. It looks oddly but works.
Close all Visual Studio instances
Open C:\Program Files (x86)\Microsoft Visual Studio {VS
version}\Common7\IDE\Extensions\extensions.configurationchanged file
Type anything there
Save the file
Open VS and check Fonts and Colors in Tools | Options | Environment
Navigate to environment settings using Visual Studio (Tools -> Options -> Environment -> Fonts and Colors) and change the colour of the TODO items in the text editor. Scroll to the item in the "Display items" list which shows as "Resharper TODO item"
A Visual Studio crash and restart later, Resharper display items are suddenly showing up under fonts and colors. I contacted Jetbrains and apparently this was a verified bug, though that link is now dead which would lead me to believe that they fixed it, but for some reason this answer is still getting upvoted so maybe not.
Maybe the next upvoter can edit this answer or provide a comment with the current state of affairs?
This is not a Win 8.x issue; I am using Windows 7 and encountered the problem when I applied Resharper 8 to VS2013. The link that Alexander posted resolved the problem for me. I did, however, have to copy the file to My Documents, make my edit there (a simple hash symbol) and then copy it over the source location.
Adding an empty line in the file extensions.configurationchanged worked for me.
Visual studio 2013 with Resharper 10
Back when I had ReSharper 5 my files would have all kinds of syntax highlighting and a bar next to the scrollbar to the right. It was wonderful because it would highlight redundant imports and possible code smells, as well mark things in the bar next to the scroll bar.
With ReSharper 6 I don't have any of that. I have to actually have cursor on what I want to change and wait for the pencil or light bulb to show up. Is this how ReSharper 6 is by default or do I have to reinstall it?
First make sure ReSharper is acutally activated. If it is, there should be a ReSharper top level menu entry in Visual Studio at the top.
If it is, make sure "Enable Code Analysis" is turned on in the ReSharper settings.
If it is not, enable ReSharper in the Visual Studio settings (Tools->Options). There should be an extra entry "ReSharper" in the list on the left side. Click the "Resume" button.
If you don't have such an entry in your Visual Studio settings, ReSharper is either not or not correctly installed.
Maybe the settings were not taken from the version 5 folder to the version 6 one. Try the following:
Make sure you close Visual Studio.
Go to:
Note: this folder is from a Windows 7 machine, since you didn't provide information on which version of visual studio you are using I'm putting 'x'
"c:\Users*your user*\AppData\Roaming\JetBrains\ReSharper\v5.x\vsxx.x"
In there you'll find a UserSettings.xml file open it for edit.
Look for the "SeverityTable" node. Select it and copy it.
Paste it on the same file that you'll find on the "c:\Users*your user*\AppData\Roaming\JetBrains\Resharper\v6.0\vsxx.x" folder. I recommend making a backup of the file before doing that.
Reopen visual studio. Resharper should be indicating all the recommendations and smells as it did before you updated it.
Hope this helps.