Why go to file in WebStorm IDE is not working properly? - ide

WebStorm is unable to locate a file. I hit Ctrl + Shift + N and start typing file name, but no files found:
I have tried to invalidate and restart, also I have checked that folder is not marked as excluded, but no success - still can not navigate to case-request. I have checked that everything working. Tha only problem with folder at App/case the folder itself and everything under it is not searchable, however I still can open it manually from the source tree and edit. The app is a root for angularjs application.
Does anyone know what can be wrong? The same project opened in Visual Studio locates the file:

Please try invalidating caches (File | Invalidate caches, Invalidate and restart).
If the issue persists, make sure that the folder file resides in is not excluded from project (marked Excluded)

I have no idea what wrong. Finally I have tried to app/case as separate content root, seems it is working.
Steps I followed:
Press ctrl + alt + s
Select directories if it is not selected at left pane
Exclude Case from project (right click on the case folder and select excluded)
Press "Add Content Root" at right pane
Select the case as content root
Remove excluded flag from case folder (right click on the case folder and select excluded)
After this the case folder became searchable. I have tried to remove content root but as result case again became not searchable.
I don't know if it can lead to any issues in future.

Related

how to properly remove files added under "My Project" in solution explorer?

I deleted the file Form1.vb on folder/explorer because I accidentally created it under MyProject in the solutions explorer. but when I tried to rebuild it I'm having below error already.
Severity Code Description Project File Line Suppression State
Error Unable to create a manifest resource name for "My Project\Form1.resx". Could not find file 'C:\Users......\My Project\Form1.vb'.
all data of files is stored in the solution itself, Go to Solution Explorer, Select the file
Either
1.) Right click the folder, Click Delete, Confirm Deletion Process if prompted.
2.) Left click the folder and hit the Delete key on your keyboard.
Do either of these will remove it from your solution and thus, the project. If you have folders being sync'd with git hub it will also update it this way, don't just straight up delete folders from the actual windows explorer though, this could cause pointer issues for reference.
I found the solution.
I created same file with same filename confirmed to replace this with the missing.
then added it again on "MyProject". Project -> Show All Files from the main menu.
I think what I needed was just the Project > show all files.
thank you to everyone who answered above it made me search for this

Change home directory for opening projects in IntelliJ

I've been searching around and confused with the results here as the others here in stackoverflow are saying its not possible or is via the vmoptions file. But all I wanted was just simply change the projects home directory showing when I'm opening my projects as I have to navigate too many folders just to get to my directory where all my projects are. Hence I'm posting this question.
To do so, after opening IntelliJ with any existing project,
Go to File > Settings / Ctrl + Alt + S
On the left pane, navigate to Appearance & Behavior . System Settings
Find the Project Opening section, and then click the folder icon to find the directory to set the new home directory for opening projects.
Click Apply
Then you'd now be able to automatically navigate to this directory whenever trying to open your projects folder.

Intellij IDEA: Reopen files (Tabs) on start

When I close IDEA and start it again, all open Files (Tabs) are closed and the project tree is collapsed. How can I restart IDEA such that it reopens the files and the project tree?
Thank you.
EDIT: .idea/workspace.xml was broken - about 75 kb of nullbytes. Strange behaviour not to ask the user how to handle a broken config file.
I closed IntelliJ IDEA and deleted the file. Now files are reopened when a project is opened.
Sometimes the file .idea/workspace.xml may become corrupted. As a consequence, the project stops remembering the open files. Please check this file. If it contains anything else than proper XML, deleting the file and reopening the project helps.
You can go to File | Settings, select Appearance & Behavior in the left panel, select System Settings in the left panel, and then select the "Reopen last project on startup" check box. If this option is selected, your last project should be opened after a restart, including the files that were open and the project tree.
Screenshot:

Can't see project folders in IntelliJ IDEA

Every once in a while, I open an old project and I can't see any of the folders in the intelliJ project viewer. I can see all the files at the root.. but no folders. Yes I can delete the .iml file and .idea folder and re-create the project, but come on.. there's gotta be an easier way to fix this.
Is there?
If you look in project settings (ctrl-shift-alt-s), you should see a module structure. If you instead see "Nothing to see", do the following:
In Project Structure -> Modules, press the + button,
press enter (since, for some weird reason, it won't let me click on "New Module")
In the window that pops up, click on the "..." next to Content root, find your root folder, and select it
Press ok
ignore any warning that says the name is already in use (or to that effect)
the simplest solution worked from me, just delete the .idea folder
keep in mind this will delete all of idea's current project configuration, it'll create the folder with default settings when reload the project again... but all other configuration will be lost if not properly backed-up
It might be because the project didn't have any modules defined. Try adding existing source code by hitting File > New > Module from Existing Sources and select the parent directory of the project for source code
Go to pom.xml file -> right click -> maven -> generate source and update folders. You will see your files and folder structures in left hand side.
All the project-specific settings for a project opened through Intellij IDE are stored in the .idea folder.
The .idea folder (hidden on OS X) in the solution root contains
IntelliJ’s project-specific settings files. These include per-project
details such as VCS mapping and run and debug configurations, as well
as per-user details, such as currently open files, navigation history
and currently selected configuration.
So, if you are not able to see the project file structure in your Intellij IDE, just delete the .idea folder,
rm -rf .idea
and reload the project, then after reload you'll be easily able to get your project structure displayed.
Thank you very much. I just remove the .idea folder and works in my case.
rm -rf .idea
For me, the java folder was not showing up. I went into File->Project Structure. In the second column, I selected on _main. In the third column, I selected the tab "sources". In what I call the fourth column, where the "+Add Content Root" is shown, I verified, the java source/folder was present. In my case, there was an extra source folder, which was the current location. I removed this, applied and the java folder immediately showed up.
Right click on the Project name -> Open Module Setting -> Check the application context path set it up at your project location.
Check your idea.log -- it may have some details explaining why or what is happening (Help | Reveal log in Explorer). Possibly one of the config files got corrupted.
You can always backup and delete .idea subfolder (project settings) and re-create project from scratch. When it's wroking again (after basic configuration) you may copy some of the files from that folder back to recover some of your settings (if there were many).
This happened to me on a new computer when I opened up a Java project in the newly installed Intellij.
The problem was that I had not installed any JDK on the machine.
I had to install a JDK and then go into the settings at ctrl-shift-alt-s and add a JDK by specifying the folder where I installed it. It's possible that IntelliJ would have found it if I closed it and reopened it.
In my case the solution was to create a new project, specifying the project type and creating it within the same directory path as the project that does not load the project files correctly.
PhpStorm automatically detects that the directory exists and gives you the option to create project from existing sources.
This can be found under:
File --> New project...
For gradle users: "Reload All Gradle Projects" option should help.

How do you move projects around in IntelliJ/Webstorm?

I have a webstorm project which i have in a certain directory. I want to move this project to another directory.
If I move the .idea folder, then nothing works at all. It seems like all the links in the project are absolute, not relative.
The links in a WebStorm project are relative (using $PROJECT_DIR$), not absolute.
To move a WebStorm project:
Close all open projects in WebStorm.
Close WebStorm.
Use a file manager to move (i.e. cut and paste) the project folder to its new location. For example, use Windows Explorer to move C:/dirA/MyProject to C:/dirB/MyProject
Start WebStorm. The "Welcome to WebStorm" screen should be displayed.
If the old project you just moved is in the "Recent Projects" list then select it, then press Delete to remove it from the list.
Select "Open Directory" from the Quick Start list, then select the project folder you just created. Your relocated project will open in WebStorm. That's it.
This approach works under Windows 7 using the latest version of WebStorm (8.0.4).
It looks tempting to select the project within WebStorm, then select Refactor > Move..., but don't go there. That is not relocating the entire project. From the documentation: "The Move refactorings allow you to move files and directories within a project".
You should simply move the entire project folder, that contains the .idea. This works fine for me in every situation I try. The links are relative to the folder containing the .idea, not the .idea folder itself. It's not like git where you can move just the .git folder, and nothing else.
For IntelliJ IDEA 2016.1.4, I encountered an issue because my imported modules' .iml files weren't found after I moved the folder in Windows Explorer.
This is because the paths to the imported modules are relative to the project directory. To fix this, you have to go to:
<Project Directory>/.idea/modules.xml
and modify all of the fileurl and filepath attributes to match the new relative location.