Cant create new directory inside existing directory in IntelliJ - intellij-idea

Im using IntelliJ community version for Spring project, and I have issue with creating new directory named images inside already existing directory resources -> static. When I right click on static and I add new directory images, instead of creating new directory this is created.
Someone could say that it is ok, this is a way new directory is shown, but I dont think that is correct. When I try to remove images directory I can remove only both directories static.images directory. If I try to add new directory into static directory, it goes into static.images and not into static.
So question is how to create directory inside another directory? There is no issue when I add new package inside another package in the src->main->java project structure.

The other person is correct. The directory was created as you desired, it is just displayed differently that you expected.
To verify this, open a shell and list the directories. The following shows all the directories under the current directory.
$ find . -type d
The directory parent is based on where in the path you click. If you click on the word static you will create a directory under the static directory. If you click on the word images you will create a directory under the images directory.

Related

VSCode esp-idf wont link my component folder to project

I'm trying to create new a folder, where I will keep my components, I already have default components folder (components), but I want to use two or more folders to keep my files sorted. I tried creating new folder (managed_components), adding files but my main file can't find new components folder
I have read, that I need to update my CMakeLists.txt file by adding EXTRA_COMPONENT_DIRS command, but I don't know how it works and can't find any information how to use it, what exactly should I do to tell my main.c file, that there are other component folders in this project and how to link them?
First of all, managed_components directory is used by the IDF Component Manager, so you should come up with a different name.
Secondly, consider if you really need multiple component directories. Do you know that you can have subdirectory for each component inside components directory? For example:
cd components/
idf.py create-component new_component
Finally, if you do want to add extra component directories, then edit the CMakeLists.txt file in the root of your project and add a line like so:
set(EXTRA_COMPONENT_DIRS my_extra_components)
See this example CMakeLists.txt.

revert source root folder to plain folder

I created .clj script in the package com.lapots.game.journey.math. I saw notification that my clj file is not under source root.
At that time I did not know that I could make clojure folder as source root so I made my new package as source root.
However now I am unable to unbind math folder as source root and display it as package com.lapots.game.journey.math instead of just math. As result when I made an attempt to create clojure namespace with clojure kind
As a namespace in my clojure file inside math folder I've got just
(ns script)
instead of
(ns com.lapots.game.journey.math.script)
How to revert math folder from source root to a plain package?
Right click the directory in the project pane and select Mark directory as -> Unmark as sources root.
Simple answer:
Close IntelliJ
Delete the .idea directory & all contents
Re-start IntelliJ and select File -> New -> Project from existing sources
Navigate to your root directory and select project.clj and click OK.
I'm not sure about your namespace organization, but I assume you know it must match the directory hierarchy for both clojure and java.

IDEA: How do I see subdirectories in an empty project?

I wish to use IDEA to edit a directory full of files of no particular type. So, I create a new project of type Empty Project and point it at my directory.
The project view now shows the files in the directory itself. But, it doesn't show any subdirectories. This is very strange.
Even more strangely, I can still use New -> Directory to create a new directory. From the command line I can see that the directory has been created; but, from within IDEA, it's still not appearing.
What's going on here? And, more importantly, how can I actually get it to show me my subdirectories?
This is IntelliJ IDEA 12.1.1. I did find IntelliJ does not show project folders, which sounds similar. But, it is referring to a different version of IDEA and they're not using an Empty Project. So, I don't think it's relevant.
In IntelliJ, you have to create at least one module. As CrazyCoder said in the comments, adding a module sets the root folder of what to display in the Project pane.
Here are steps that I took to show empty folders.
In a terminal window
mkdir one
mkdir one/two
mkdir one/two/three
mkdir one/two/three/four
In Intellij 15.0.2, I created a new project, selected Empty Project and set the Project Location to the one folder.
After creating the project, IntelliJ prompts me with a Project Structure dialog with Modules selected in the navigation tree. I clicked the '+' button in the middle pane to add a module. I chose Static Web as the module type to prevent creation of an additional src folder. I set the Content root and the Module file location of the module to the same one folder.
I clicked Finish and then Ok. This gave me this structure

How to add non-source folders to IntelliJ IDEA project

Recently set up a multi module project in IntelliJ with the following structure:
/module1
/module2
/web-module
/sql
/lib
/a few more folders
I set up module1+2 and web-module as modules in IntelliJ so those show up, but how do you make the sql and lib folder show up in the project panel? They should be included in VCS as well, but IntelliJ ignores them. How do you add folders outside modules to a project?
Screenshot of project and explorer view:
This is not a strict answer to the question, but it worked for me so I'm posting, perhaps someone will find this useful.
If you want to add an arbitrary folder to your project (even from some different location than your projects), just add it as a module. You needn't worry about the type so much e.g. I needed to add a folder with some SQL scripts, I added it as a Java module and it's nicely visible in IntelliJ even though it has no maven structure or Java sources.
This is how to do it:
File > Project Structure > Modules
Add > New Module > ... (e.g. Java Module)
In the new module settings mark the subfolders that you want to see as 'Sources'
VoilĂ ! :)
This is something that I typically see when creating a project from existing modules. All the modules will show in the project but not the other project related directories. These directories might be, configuration files, environment scripts or bundles of SQL scripts that don't fit neatly into an Intellij module type.
To show the rest of the project source files and directories, I create a parent module from the project root.
File->Project Structure->Modules
Create a new module using the + sign. The new module could be any type (I use java).
On the Next screen set the Content root and Module file location to the Project's root folder.
Select Finish
All of your other modules should now be submodules of the root, and your other project files should now show up.
Add and remove content roots
To add a new content root:
Go to File | Project Structure, or press Ctrl+Shift+Alt+S.
Select Modules under the Project Settings section.
Select the necessary module, and then open the Sources tab in the right-hand part of the dialog.
Click Add Content Root.
Specify the folder that you want to add as a new content root, and click OK.
source: https://www.jetbrains.com/help/idea/creating-and-managing-modules.html
I used File -> New -> Module from Existing Sources...
Then I simply select the folder and add it.
In Project view mode all directories (except the ignored ones from the settings) should show up. Of course the base folder for your multi-project has to be the folder above module1.
EDIT:
Your project should look like this (project view tree):
MY_PROJECT_ROOT (~/the/folder/to/your/project)
|- /module1
|- /module2
|- /web-module
And in this case, you should definitely see the other folders. I got a sample project set up where this is working.
EDIT 2:
From your screenshot, I assume you are missing the root directory (the project root is not as you expected). I added another screenshot. There should be a single root folder for your 3 modules. This one is missing at your screenshot. You have 3 separate folders with no common root folder. On MacOs, the project root is displayed in the window title. In my case it points to ~/devel/sandbox.
I guess you should try to create a new project in for that trunk folder. From the scratch. Then add the existing modules and you should be fine?!

how to install new oracle apex theme?

I'm trying to install new apex theme but the problem is that I don't know where to put theme images folder in apache webserver?
I tried to put it on the apache/images but this doesn't work
So does anybody know where to put the images folder
Note: I have successfuly imported the .sql file and already switched the theme to the new one.
It depends on how the template references the image files.
By default in Apex, there is a substitution value called #IMAGE_PREFIX# that points to a folder called /i/. This folder, in turn, is just an alias set up in the Apache config (see the dads.conf file to determine the actual location).
Your template should reference images using #IMAGE_PREFIX#some_folder_name/some_file_name, in which case you need to put the images in a folder called "some_folder_name" beneath the directory that the /i/ alias points to.