Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij - when the folder structure is different than the package name

My package name does not contain my full folder structure. For instance - in IntelliJ I have created a test class:

hierarchy

and its package was initialized with package com;

  1. How do I set which is the starting folder for the package name?
  2. What is the difference between blue and yellow/gold folder color in the IntelliJ project window?
like image 397
Bick Avatar asked Mar 26 '14 09:03

Bick


People also ask

How do I change folder structure in IntelliJ?

From the main menu, select File | Project Structure Ctrl+Alt+Shift+S and click Modules. Select the necessary module and open the Sources tab. to the right of the necessary folder (folder path). Specify the path relative to the output folder root, and click OK.

Is package and folder the same?

Packages are self-contained Project Files. Everything you need for your Project is saved inside the Package. Which makes it easy to share. Folders are slightly more transparent and accessible.

How do I change the directory of a module in IntelliJ?

From the main menu, select File | New | Module from Existing Sources. Select the directory in which your sources, libraries, and other assets are located and click Open. In the dialog that opens, select Create module from existing sources if you want to create a new module from the existing source code.

How do I change the project structure in IntelliJ?

You can configure project structure settings not only for the current project, but for all projects that you will be creating later. This means that you can set the new default structure for your projects. From the main menu, select File | New Projects Setup | Structure.


1 Answers

How do I set which isw the starting folder for the package name

File -> Project Structure. On the left, select Modules.

In the rightmost window, you will have a tab named "Sources". There you will have the opportunity to change your source/test directories. Note that a directory must exist before it is selectable this way.

Although I wouldn't depart from the setup you currently have, it's pretty standard.

What is the difference between blue and yellow/gold folder color in intelliJ project window

You will see that in the tab above ;)

like image 99
fge Avatar answered Sep 23 '22 06:09

fge