I'm trying to set up a grails application and I've noticed that intellij doesn't recognize an external configuration file that i Have set up. When looking at another application, that I did not set up, an external configuration will display when listing project or project files in intelliJ's navigation panel on the left side. I believe I have my configuration file setup in the correct location with the correct naming convention. Grails looks for configuration files in the following locations
grails.config.locations = [
"classpath:${appName}-config.properties",
"classpath:${appName}-config.groovy",
"file:${userHome}/.grails/${appName}-config.properties",
"file:${userHome}/.grails/${appName}-config.groovy",
"file:${userHome}/.grails/${appName}/${appName}-config.properties",
"file:${userHome}/.grails/${appName}/${appName}-config.groovy"
]
I looked at the application.properties file and checked the app.name variable. It had a value of (as an example) website. So I set up my configuration file as such.
<root>\Users\<username>\website\website-config.groovy
when I open the project in intelliJ and ran the application (for good measure), i do not see the external configuration file listed in the navigation bar like my other project did. Do I need to enter that manually?
Related
I have a Git repo with two directories:
backend (PHP/Laravel code)
frontend (TypeScript/Vue code)
I would like that backend is marked as excluded when the project is opened in WebStorm and frontend to be excluded when it is opened in PhpStorm.
This is to ensure that searches/indexing only happen for the files that I would actually edit in that specific IDE.
When I change the excluded directory it seems to automatically apply this to the other IDE as well. Is there some way to keep this setting separate?
Comments:
I intentionally have both frontend and backend in one repository.
Opening the subdirectories in their own IDEA projects does not seem
to be an option because the Git integration only works when the
project is in the root folder of the repository.
When I change the excluded directory it seems to automatically apply this to the other IDE as well.
It is expected. That's because the project settings are stored in the .idea subfolder. All IDEA-based IDEs use the same .idea settings format. So opening the same folder/project in different IDEs simply makes them use that already-made config (shared between IDEs).
Plus, both PhpStorm and WebStorm use the same module type ID (WEB_MODULE) and can have only 1 module in total in a project. IntelliJ IDEA and some other IDEs (like PyCharm for example) can work with projects that can have more than one module and of different types.
Is there some way to keep this setting separate?
Yes, with the help of a small workaround: you need to store .idea used by another IDE in another place. As simple as that.
The setup and steps:
Lets assume that you have your project in C:\Projects\MyProject.
Make a brand new empty project in another place, e.g. C:\Projects\IDEProjectsStore\MyProject-frontend. It will be used for a frontend.
Go to Settings/Preferences | Directories and remove an existing Content Root (which will be C:\Projects\IDEProjectsStore\MyProject-frontend from the previous step).
Add new Content Root instead -- point to the actual project (C:\Projects\MyProject from step #1)
Save and configure as needed.
What you will have now:
This frontend project will now have its settings stored in C:\Projects\IDEProjectsStore\MyProject-frontend\.idea while another (original project with backend) will have them in C:\Projects\MyProject\.idea.
Projects (project-specific IDE settings) are stored in 2 separate places while they both use the same folder with the code.
Basically: a project in the IDE's eyes is an .idea folder with a parent folder added as a Content Root by default. Our workaround keeps the second project in a different folder while sharing the same Content Root between them.
https://youtrack.jetbrains.com/issue/IDEA-170102/ -- that's a ticket that asks for a straightforward way of doing this.
I would like that backend is marked as excluded when the project is opened in WebStorm and frontend to be excluded when it is opened in PhpStorm.
Why do you need two IDEs for this?
In case if you do not know: PhpStorm = WebStorm + PHP + Database. You do not really need WebStorm here. Just install any missing plugins that come bundled with WebStorm.
I am a developer of an IntelliJ Plugin. It is a color scheme where I only change the editor colors (not the colors of the IDE). I originally had only one color scheme file for my whole plugin (one .icls file), and that code is live and working online.
Recently, I updated my color scheme to include two additional color schemes, which meant I had to add two new .icls files. This works on my local IDE that I am developing on; however, when I tested the finished plugin, the new instance of IntelliJ IDEA CE cannot extract the content from the new files.
Problem
I need a working JAR file that I can upload into the JetBrain Plugin Repository; however, I cannot create a working Jar file anymore.
Note: I am not looking to import a color scheme. I am a developer of a color scheme that needs to upload my plugin into the Jetbrain Plugin Repository
When I tested the Color Scheme through build, deploy, and run, the new instance of the IDE will fail to find any color scheme. I cannot seem to narrow down why the IDE cannot load the color scheme; however, I was able to do the following...
From the deployed JAR file, rename the file to be a zip file
Extract the content of the zip file
then...
try Settings >> Editor >> Color Scheme >> Import Scheme... >> Settings (.jar) and find the JAR file. Nothing happens. No color schemes were imported.
...but...
try Settings >> Editor >> Color Scheme >> Import Scheme... >> IntelliJ IDEA color scheme (.icls) and find each of the .icls files. Each individual color scheme is successfully found and loaded into the IDE.
Additional Information
Originally, I was receiving the following issue that I filed in JetBrain's Issue Tracker. However, after some tinkering, I was receiving a different set of issues. So, I started a new project and just copied the source files and plugin.xml file into the new project. Built, Deployed, and tested. No errors, no warnings (that I saw), but the color schemes are still not being loaded into the IDE.
File -> Import Settings -> select settings file.
In the settings file: top-level dir colors where .icls files located.
Cristopher, currently color schemes are supposed to be imported from settings.jar created by Intellij IDEA upon File|Export Settings. The file has a certain structure, namely a 'colors' subdirectory with .icls files inside it. The IDE doesn't scan for other places where the files might reside.
If you create a plug-in, your users simply install it as a regular plugin, not importing any schemes. The difference is that these schemes become bundled. It means when a user makes changes to them, he can always revert to original color settings.
I've been searching for a solution but I can't find one.
I have a global configuration directory in my IntelliJ workspace. I also have several dozen modules. I would like each module to automatically include the global config directory in its path when I run or test a class.
Is there anyway to do this within IntelliJ? I don't think I should need to edit the configuration for each "Run/Debug" config to include the directory.
You'll want to set it in the Defaults for the type of Run or Debug Configuration that you are using.
For example, if I always want a Java Application to have the VM Option -XPutYourThingyHere, then I could go to Edit Configurations, Defaults, Application, and put -XPutYourThingyHere in the VM Options box. Then all new Applications that I run will have that option.
I have been trying everything to make IntelliJ allow the use of Struts2 taglib. However it keeps on complaining about <%# taglib prefix="s" uri="/struts-tags"%>. The error it shows in the IDE is:
Cannot resolve the uri /struts-tags
I have set up a new project from scratch and included the struts2 facet (which added the struts.xml file to src/META-INF and the struts2-core jar to myApp/lib).
Is there anything wrong with my project setup ?
Any help is appreciated as I have been stuck with this for a day now!
Environment: IntelliJ IDEA 12.1.6
The issue seemed to be due to IntelliJ caching and the problem is gone after invalidating cache and restart.
Re-indexing the project did the trick.
File > Invalidate Cache
Seems you are not configured a project feature Struts2 properly. You should add File Sets. Right click on the module in the project structure, use Module Config (F4), use Facets, use Struts2 Facet, use File Sets. Press + button to add configuration files. Make sure struts.xml and struts-default.xml, and struts-plugin.xml are added. The struts.xml should not be in src/META-INF but in src like shown in your picture. But struts2-core-x.x.x.x.jar should be on build path. Make sure you have properly configured a project build path, and it should be a valid file containing TLD files inside the jar in the META-INF folder.
At my work every project ha have two parts:
1. The project itself;
2. A external folder containing the JS, images and css.
We have an automated process that deploys this parts where they have to be. The first one at Weblogic and the second at Tomcat.
What I want to know is if there is a way to include this external folder with the application statics to the IntelliJ so I can edit them inside the IDE.
Now I'm editing the JS and CSS inside Notepad. And it is very annoying.
You can create another project via File -> Import Project, locate the folder of your static resources, then choose "Create project from existing resources".
You will end up with two projects but it should be easy to toggle between the two.