IntelliJ IDEA folders instead of packages in project view - view

Is it possible in IntelliJ IDEA to show folders instead of packages in project view? There is such a feature in Eclipse: we can just switch from "package explorer" to "project explorer" and here we go.
To make it more clear:
I want to see packages as hierarchy of folders.
I wanna see this:
but instead I see this:

Yes you can switch "View as" from Packages to Project.
For expanding folders uncheck Compact Empty Middle Packages

Simple, follow these steps and you should able to resolve the issue
Then
Done :-)

You can do it by going to options menu, please follow the below images.( This is not that much useful)

Related

Where do IntelliJ IDEA store "Use project settings" settings

I'm trying to make Maven run faster by "work offline" & "skip tests" inside IntelliJ IDEA 2019.
Online guides tell me to go into "Run > Run/Debug Configurations" and change appropriately.
All of them are grayed out, except for a checked "Use project settings". I figured I would like to change the "project settings" because its not something I want to use on all projects.
But I cannot find where do I change the project settings.
I've tried "File>Project Structure" and I can't find anything similar. Googling yield nothing of interest either. Can someone point me to the right direction?
Picture showing the "Use project settings" but not where they are stored
When you import a project into your IntelliJ IDE an .idea folder and a .iml file will be created. I think the information will be in there.
Here a link to another question which also catch up this theme: Other question
NOTE: #Ersoy and #Mafick explained on the actual file location, which also addresses this question. Here's where to find them in IntelliJ GUI.
After some fiddling around after I gave up, found them in
"File>Settings>Build,Execution,Deployment".
Where to find the project-specific build settings in IntelliJ IDEA

How do I hide projects?

I have a large VS solution, but I'm only working on two different projects, but need all the projects loaded to do the build. I cannot change the structure of the solution.
Is it possible to hide the projects I'm not working on? They would still build, and be accessible when needed, but I'm getting tired of scrolling up and down in Solution Explorer.
If it's not possible, but work-arounds are available?
You can right click a project --> "New solution explorer view" and then you can play with the windowconfiguration like this:
I do it like this:
Right click solution | Add New Solution Folder
Then I just create some dummy folder. I drag all the projects and anything else I do not want to see into that folder.
Then right click the folder | Hide Folder
Note: If you work in a team environment, do not check in the solution file.
It works for me so hopefully it will work for you as well.
If only I could create a folder and throw some of the people I can think of into it and do the above trick...
for anyone looking for a way to do this, take a look at the "filtered solutions" feature of vs2019. worked pretty good for me and my team. enjoy.
https://learn.microsoft.com/en-us/visualstudio/ide/filtered-solutions?view=vs-2019

TFS - checkout in wrong folder, folder deleted -> trouble

I am experiencing trouble with the following:
In VS 2010, I followed these steps:
File -> Source control -> Open from source control
I selected a solution file from a project in TFS, and opened the project (obviously).
Unfortunately I opened the project in an incorrect folder, and I thought "If I delete the folder(s) and reopen the solution from TFS, everything will be fine". My bad!
TFS "reminds" that I checked out the project to this specific location, so now when I want to check it out again, the location box is greyed out.
Anybody got any clue how to fix this???
Thanks in advance!
Nico
Thanks for your answer Richard! Unfortunately this wasn't exactly what I needed, but I found the solution.
In Source Control Explorer, browse to the mapped source, right click and select "remove mappings".
Here you can edit the mappings to your local sources :)
Check out again and everything is in the right place!
There is a force option with get which will override TFS's knowledge odf the state of the workspace:
In Team Explorer use Get Specific Version: select latest as the version and tick "Overwrite all files ..."
With tf.exe use /force.
open source control. Go to the folder right click and select Add/ Edit Mapping whichever is available. This will prompt to download the new version. Do so and you will be good to go.

I open up a Design.csproj and a whole solution opens!

Why?
I expect only the project to open.
The only way that I could accomplish what I wanted to do was to create a new project test.csproj, add design.csproj, save the solution, and then remove test.csproj.
In Tools > Options > Projects and Solutions > General, there is a checkbox, labeled "Always show solution".
With this option checked, opening a project from within the folder stucture of a solution will still open the whole solution. If you click only the project, I believe the IDE finds the solution by simply traversing the parent directories for the .sln file.
The reason I say that is because if you copy the directory containing a single project and paste it somewhere else, then double click it, the project is opened on its own (still inside a solution, but a temporary one, which only exists as an .suo file for now (until you save the solution.))
So we are halfway there. Now if you uncheck the option which I mentioned at the start of my post, you will see the project open on its own like so:
I agree that it should be possible to open a project without a solution (and that it should be easier than it is currently.) I'd go as far as to say that VS should also give you the option to easily make and run programs in a single file without all the hand-holding and creating projects and solutions for you. Perhaps you can, but if so - it's not obvious.
Maybe because you have "Open most recent solution" in Options?
Maybe it was a Solution file (sln), wrongly labeled as a C# Project File (csproj).
If you open the file in a Text Editor you'll see references to other projects, like in a solution file.
Projects are linked to solutions; you cannot open a project without its parent solution.
Otherwise, things like project references wouldn't work.

Visual Studio: How to build only some projects

My VS solution has many projects.
I am currently only working on some of them so I want CTRL+SHIFT+B to only build some.
What's the best way to do it?
I thought about creating a new configuration but I would need to check it in and it does not seem right. I don't care if it will be only a "local" setting on my machine.
Right-click on the Solution and choose "Configuration Manager". Un-check the "Build" columns for each one you don't want built.
Creating a new configuration would be the best way to do it.
Alternately, create a second solution file and only add the projects you're interested in. We've done that for a few of our enterprise products where a full solution would load dozens of projects. The main reason we did this is to cut down on the resources that VS uses. Name the solution something like "My Product - minimal build". You have the option of checking it in or not.
Go to the solution explorer (CTRL+SHIFT+L for me), mark the projects you want to build, right-click them (SHIFT+F10 if you are a keyboard aficionado) and select "Build Selection"
Look into the solution explorer - right click the projects you don't want to build and unload them
Simply right click on the project you want to build in Solution Explorer, and select Build.
It will build that project only (including referenced projects).

Resources