Is Android Studio 4+ text search across all files gone? - android-studio

In previous versions of Android Studio before 4.0, you can search across all text based files.
Now, not only is the short cut to launch the search is gone. The "search everywhere" command only search across file names.
Did I miss something in the update.

You can still search across all files for specific text in AS 4+ by using:
ctrl+Shift+7
or from menu:
Edit > Find > Find in path

In case you don't know, the shortcut for 'Search everywhere' is achieved by quick double-press Shift. I have got AS 4.1. It works well, maybe something is missed when you updated, maybe the restart is required after the update. If restarting doesn't help, you can 'invalidate caches / restart'. Sometimes, IDEA/AS goes mad, fails to find references.

Related

Android Studio/IntelliJ - Where do I manage the JRE list for unit tests?

I must be missing something terribly obvious here: Since some recent Android Studio update/reinstall (I can't remember) I have to manually set the JRE that should be used - otherwise, an invalid path will be used and the test will fail.
Where do I manage this list? I would like to remove all invalid entries and duplicates.
Currently Intellij Idea does not provide a way to remove the list of JRE Entries. You can try the followings.
First uninstall Intellij Idea editor.
Go to the directory C:\Users\ if you are using windows, remove the folder/s like .IdeaIC. or .IdeaIU.
Reinstall Intellij Idea and select the appropriate JDK version.
OR You can do the following.
As per the above screen shot point to you JDK location.
It will solve the problem.
After following #Sambit's hints and looking around some more I found the solution: The list is stored in (in my case) ~/.AndroidStudio3.4/config/options/jdk.table.xml. There, each list item is represented by a <jdk> element. After removing all the unwanted entries and restarting Android Studio (complete restart, not just close/open project) I now have list that looks much nicer:
I have not tried what happens when you mess up the XML structure so take care!

"Device in editor" list is empty

Following some annoying glitches, I decided to invalidate caches and restart. Now, my layout editor is broken: nothing is rendered, and the device list is empty (and the API version drop down simply says "<null>"). Further invalidate & restarts or removing the .idea folder do nothing.
The version is Android Studio 3.1.2, specifically. I've included a screenshot to show what is (not) happening.
"Sync Project with Gradle files" did the trick. Naturally, after an hour or two of looking for solutions, the solution appears two minutes after posting the question.

Visual Studio 2012 "Find in Files" searches far beyond the solution when "Entire Solution" is specified

While performing Find and Replace operations in Visual Studio 2012; using the Find in Files/Replace in Files dialog window, setting the "Look in" scope to "Entire Solution", and using Regular Expressions on all file types, Visual Studio is busy searching the WHOLE HARD DRIVE! Some of my searches take a very long time and when I look at the Visual Studio Status Bar, it shows the currently searched directory/file is something well outside of the solution folders - sometimes it is even searching the C:\Windows\System32 directory or similarly irrelevant locations.
Has anyone else seen this behavior? More importantly, does anyone have a solution to fix it, so my search and replace operations stick to the solution files and don't waste time searching the other million files on the computer?
I've not had it searching the whole drive, but I have had it return matches from files outside my project (this in VS 2010). In my case deleting the .suo file appeared to fix this issue.
My suspicion is that the files being searched are files I stepped into during a debugging session (or more accurately stepped out of my code into the calling code). Somehow these files are remembered and included in searches.
This wouldn't explain a full drive search, but could explain my "out of solution" results
I was having a similar problem with Visual Studio 2013 with Update 4 installed - in my case I was getting search results from files that had been in the Miscellaneous Files 'Project', even after removing them from Miscellaneous Files.
Deleting the .suo file from the solution directory solved the problem; however, doing so causes VS to forget which files you had open in the solution (and probably some other things).
Still occurring in Visual Studio Enterprise 2017, Version 15.8.6.
Deleting the .suo file (found in .\.vs\YourSolutionName\v15\) and rebuilding the solution fixed the issue.
I suspect it's known directory/targeted directory to search was being cached there because the Find Results would show up very quickly. Indicative of it not searching the "whole hard drive", or even my whole mapped workspace "Local Folder". Typically if I am performing a search on even a more parent branch in source control, it will take close to a minute.
For me the solution was to move the file .sln into the solution directory.

Syntax highlight fail on Classes in Visual Studio 2012

I recently installed Visual Studio on a laptop and the syntax highlight fails to change Classes colors.
I tried exporting and importing the full, complete set of settings and it is still looking like that.
EDIT
I tried those websites with schemes and decided to try one, the Humane scheme, and this is how the sample code looks in my laptop after installing those settings:
However, this is how it is supposed to look:
Note the lack of highlight in class names.
What could it be causing this?
I'm starting to think that's another setting at another place which causes this.
Finally, it worked by resetting user data, running this from the Visual Studio Command Prompt
devenv /Resetuserdata
Found the hint here:
https://stackoverflow.com/a/11988265/1213246
Changin syntax highlight could be done through the menu Tools - Options - Environment - Font & Colors. It's a try and test approach that is not much improved from earlier versions of Visual Studio.
Fortunately, today there are entire sites with themes that simply need to be choosen and installed
I suggest you to visit http://studiostyl.es/ where you can find thousands themes or, for more generic go to http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx

IntelliJ IDEA global search

I would like to search across projects for variable usages, or at least for strings. I've got IndexYourFiles which works well for text searches, but I have to re-index every now and then and would like an integrated solution.
Is there any way that I can search across projects in IntelliJ IDEA? So far I have only been able to search within the currently-open project. I'm guessing IntelliJ can't do this natively; are there any plug-ins out there to support this?
Thanks.
IntelliJ is project based so you can only search within the open project using Ctrl + Shift + F(Windows) or Cmd + Shift + F(Mac).
When I need to search across a set of projects I use Agent Ransack
IntelliJ 13 (at least) has "Edit/Find/Find in Path...".
It has the Scope option which can be set to a directory, so if all projects are in the same directory (e.g. IdeaProjects) then it will search all projects.
Use grep.
In the terminal, go to the root directory of your project, and type grep -r my_string_here ..
You can add color to your search with --color (just add alias grep='grep --color' to your.bash_profile, and add-i` to make your search case-insensitive.
In the IntelliJ now it is very easy to find the anything through just two clicks and search on the bar.
Double click on shift and enter the keyword in the search bar.
I'm using ubuntu which I found the shortcut.
My workplace eventually set up Atlassian Fisheye which allows us to search for code or specific files across all of our projects, and it's working well.

Resources