How to exclude some directories from "Analyze -> Inspect Code" in Android Studio? - android-studio

One code directory is from a long working library, but the code inspector complains about many issues in it. How do I exclude it from analysis?
I've tried looking at the settings, and also tried right clicking on various things through the analysis.
I'd like the code inspection to work for most of my project, but not from parts of it that work and analysis is unneeded. In this case, it is a complex open source C language library where I do not want to touch the code.

Okay - I feel a bit dumb, but so others don't have to go through this, here are details. Also, it is very easy to screw this up - the Android Studio GUI will let you do stuff that looks good in the dialog, but doesn't work. It took me several tries to find the magic that works.
Here is the procedure:
From the main menu, select "Analyze" then "Inspect Code"
Click the button next to "Custom Scope"
Click the three dots button - to the right on the same line. A new dialog will pop up.
Click the plus ( + ) - upper left, to start a new Custom scope
Give it a name
Select "Local" or "Remote"
In the drop-down of the new dialog, select Project view
Of the four icons, click them until only the one for file display is emphasized
Find the top directory of what you want to analyze, and click "Include"
Find each directory you want to exclude, and click "Exclude" for each
Click OK - the custom scope dialog will close
Click OK - the analysis will run
In the future, that scope is available by name, but remember that it does not honor the implied scope if you right-click a directory in the hierarchy.

Related

Gitlab: bookmark repo functionality - how and what?

Gitlab has little bookmark icons next to each repo (see screenshot below). However, clicking the icon (or anywhere in the row for that repo) takes you to the repo - the whole thing is a link, so clicking the icon doesn't bookmark the repo. I also can't find a way to bookmark a repo via its settings.
Furthermore, what does the bookmark functionality do? I was imagining that it pins it to the top of your list, or makes it available on a bookmarks page, both of which would be really useful for me ... but I'm not actually sure.
Weirdly enough, google really isn't helping me out with this one. Does anyone have some info about this functionality?
This is an example of a bit of a UX convention violation - you're right that icon is absolutely a bookmark and typically used for bookmarking something. However in this case it just signifies that row is a Project as opposed to a Group. If that icon is a bookmark, it's a Project. If that icon is a folder, it's a Group.
If you want to favorite Projects, you should star them by clicking on the Star icon in the upper right of the Project home screen, then when you click on "Projects" you can click on "Starred Projects" and see all your projects you've currently starred. You can also filter activity based on starred projects.

In Windows 10 how do I add a program to the main "Open With" menu not "Choose another App"

With Windows 7 I could easily use the Open With context menu to add a new program which would thereafter appear in the Open With menu (I can't remember the exact sequence, but it was easy and worked fine). However I have now upgraded to Windows 10. The programs that I associated with my particular file extension in W7 still appear in the Open With menu in W10. If I want to add another one I select "Choose Another App". However, any app I add with W10 does not appear in the Open With menu - I have to select Choose Another App every time to get to it. I now have two lists of available apps, one in Open With (the ones I set up with W7) and one in Open With | Choose Another App (the ones I set up with W10). It's not exactly a show stopper but it's irritating. Does anyone know what this is all about and how I can get the apps into the main Open With menu?
The reason why it doesn't appear in "Open with" menu is most likely because application's VERSIONINFO is not properly filled out with all the relevant details. If you are application developer you should create VERSIONINFO resource as clarified here:
https://learn.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource
If you are not the developer, then you can still fix this by editing registry - see here:
https://superuser.com/questions/1199648/strange-open-with-list-inconsistent-with-registry/1256482#1256482
Basically under the registry key: Computer\HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\Shell\MuiCache there should be 2 keys for YourExampleApp:
One that ends with .FriendlyAppName
One that ends with .ApplicationCompany
For example:
C:\Program Files (x86)\ExampleApp\YourExampleApp.exe.FriendlyAppName
C:\Program Files (x86)\ExampleApp\YourExampleApp.exe.ApplicationCompany
Most likely one of these 2 is missing which causes the application to be dropped out of the "Open with" menu.
The MuiCache list is cached from the properties of the application's VERSIONINFO resource embedded in the application, so if such resource is missing from the application, some items may be missing from the cache as well. For more details have a look at the above references.
Coder12345 had the correct answer for me, thanks a ton! I would like to expand on it briefly; I wanted Shotcut to appear in the first open with... context menu. I had to add the registry entry for ApplicationCompany. It appears that it doesn't matter what you put for the value of that key, just as long as it's there. No restart of file explorer was required, the change takes place immediately.
Also, the FriendlyAppName changes what text appears in the open with submenu. Shotcut appeared as shotcut.exe so I changed it to just Shotcut.

How can I exclude all build files in quick file search at Android Studio?

When I used Command+Shift+O search file in my AndroidStudio for Mac.The result will has too many unnecessary files like in "build" folder. I've never seen before until recently.How can I exclude these?
Android Studio (like its progenitor IntelliJ) allows you to define a
custom scope to help you exclude intermediates files when searching.
Here are the steps I use to set this up:
Bring up Find in Path dialog (Ctrl+Shift+F on my machine).
In the Scope area, select the Custom radio button. Then tap the "..." button on the right side of the dropdown. This brings up the
Scopes dialog.
Click the "+" button on the left side of the Scopes dialog, which will bring up the Add New Scope dialog. Name it
"ExcludeIntermediates".
In the Pattern field, paste in the following pattern and click OK:
!file:*intermediates*/&&!file:*generated*/
This pattern excludes R.java files and other intermediates such as
layout files in exploded-aar and AndroidManifest.xml copies in
filtered_manifests folders.
https://stackoverflow.com/a/32238593/1815624

Unable to find TFS 2012 labels in VS2012

This has never worked for me in VS2012. I can right click a folder in Source Control Explorer, select "Advanced -> Apply Label..." and enter a name. TFS plugs away, and the Output window states that the label has been created. Everything seems fine.
However, any attempt to find the label fails. Immediately after applying the label, I can right click the same folder and select "Find -> Find Label..." and I get nothing. I can search All Projects - nothing. I can search by Owner - nothing. I can even enter the label name - nothing.
Using the command line is no better. I go to the mapped folder which was just labeled, and "tf labels [any and all options]" always returns 'No labels found'.
BUT using the label works. If I specify the label name in either VS2012 when getting a specific version, or from the command line 'tf get /v:L'lable name' TFS is happy to comply.
It's obvious the label is in fact being created, and it can be used, but how can I list available labels?
Does this work for you?
Right click branch/project in Source code explorer.
Choose History.
At the top there should be two tabs "Changesets" and "Labels".
My "find label" does work in VS2012. I can't seem to find any labels in VS2008!

How to force IntelliJ to always search in "Whole Project"

I like to use the Find in Path function CTRL+SHIFT+F, that searches for text strings in several files.
One thing I often run into though, is that I search for something that I know exists in at least one file, I get zero results or I find just some of the files that contain the search term.
Then I realise that the Scope setting in the Find Dialog box has been set to Module or Directory for some reason rather that "Whole project" which is what I almost always want.
What fools me here is that this only seems to happen occasionally - often I'll have the scope set to Whole project like I want to, but sometimes it will be something else.
How does IntelliJ decide which scope to use?
Also, is there some setting that can be used to force IntelliJ to always select "Whole project" as the default?
Just collapse the project tab before: Command + 1 or Alt + 1
The default selection depends on the context which launched the search. If you have the project tab open with a folder/file selected it will search in that folder or the parent of that file.
To search by default just close that panel (this will make the context be the whole project) and press the search shortcut and it will be scope properly.
Not really a solution, but how to avoid using the mouse for this:
When the dialog is open, press Alth before pressing enter. This will cause the scope to be set to Whole project.

Resources