How to tell Intellij the file base when unshelving? - intellij-idea

I shelved files using Intellij with the intention of separating changes made in Master into separate branches. On trying to "unshelve", Intellij is telling me it cannot find the file base for many of my files.
For example, the Intellij "Unshelve Changes" dialog is complaining about files as:
C:\Users\rcoe\intellij-workspace\proj\D:\cygwin64\home\rcoe\git\proj 14 files
When I remap the 14 files and tell Intellij to remove files from the shelf that have been successfully unshelved, it fails to unshelf any. I am not able to unshelve any of these files. A huge problem, as my shelf contains many more than just these 14 files, as I have a maven multi module project and this problem exists across all of them.
When I manually remap the files inside the Unshelve Changes dialog, Intellij does show the base as being changed. But closing the dialog doesn't change a thing. Any help on making this work would be appreciated.
Thanks.
EDIT:
I managed to remove 14 of 16 files that I needed. I found that by selecting one file at a time, I could unshelve each file. I did not have to re-do the manual mapping process. It seems the two files that refuse to get re-mapped were causing the others to not get unshelved. There is nothing out of the ordinary with the last two files. When I try to unshelve and then find a new base for the files, the file chooser dialog takes me right to the files.

Related

How to efficiently work with related files in PhpStorm/WebStorm/IntelliJ IDEA?

I used to put my CSS, HTML, and JS all in the same file just so I could keep them grouped, open all at the same time, close all at the same time, and just search for style or script tags to switch between contexts. Now I'm using some tools that require these to be separated into their own files, and I'm finding it frustrating to be switching between these files all the time efficiently.
I've searched the web and documentation extensively for some advice. I've found I can:
create all the files together with a multi file template
configure files with the same name in the same folder to be nested.
However, I still cannot figure out how to do anything like the following:
open all related files together
when I close one file, close all other related files
Switch to a specific related file with a keyboard shortcut in the current tab/view
Open or go to a specific related file with a keyword shortcut in the opposite tab/view
Are there any keyboard shortcuts, tools, plugins, or intelligent approaches to work with related files in IntelliJ IDEA?

PhpStorm Search Everywhere is not working, do you know the solution?

I don't know this is off topic or not, I'm using general channels. Is there a solution for Search Anywhere in PhpStorm. I work with Laravel but when I use the feature I can't find the file even though it exists.
Looking at your screenshot: based on the fact that ALL files in the project tree have that sort of "dirty yellow" background color... it looks like ALL of your files are considered excluded / outside of the project for some reason.
Most likely a user error of some kind. E.g. you may have opened it from a different path (i.e. when symlink is involved), may have c=misconfigured it later somehow (marked folder as Excluded by mistake or whatnot) or maybe even some sort of config file corruption (pretty unlikely).
Anyway, please do this:
Close your project
Go to the project root folder and delete your .idea subfolder (that's where your project settings are stored).
If you have that project still visible in the IDE (Recent Projects on the Welcome screen) -- you may remove it there as well (to avoid any possible confusion).
Now create a new project in PhpStorm from scratch using existing files: just use "Open" and point to the folder with your project.
Please check filter option. If you are doing file search then click on Files tab.

File-based, not Folder-based, Projects in Atom?

I'm trying to switch to Atom as my programming editor so that I can gain handy features like linting for Perl, JavaScript, etc. However, over the last two decades, I've used a string of editors (UltraEdit, jEdit, BBEdit) that allowed me to add individual files from different folders into projects. My main coding project actually spans several remote SFTP servers and the "folders" in my BBEdit project do not necessarily correspond to any file structure on disk.
I cannot seem to figure out how to set up a project in this manner in Atom (or similar editors such as Brackets). Is there a way to configure Atom and its extensions to produce a result similar to an UltraEdit/jEdit/BBEdit/Komodo project? I thought about creating a new project directory and symlinking to the real files, but that seems like a hack at best.
I belive its File > Open Project or something like that. I personally like Sublime Text 3 but Atom and Sublime are the same.
The best solution I have found so far would be to install opened-files package. By default it persists all files you have opened (even after you close them) until you close atom editor. I don't think it would work well for bigger projects as it lists all the files under one tab in tree view.
If you want to persist open files you might want to use project-manager package. To keep files listed under 'Opened files' tab after you close them (and atom), you need to press bookmark icon next to tab name. Once you add the project it auto-saves file structure when you close atom. To add project to project-manager write project-manager save in command palette. To list all projects from project manager press shift-alt-P.

Intellij failed to detect file type

I have intellij 13.1.3 Ultimate and have been using it for my PHP projects. All my files.php are nicely hightlighted for php.
This morning I had to create a new file called "report.php". At first I create it with right click > new > file, but this gave me no hightlighting. So I deleted it and tried again with a right click > new > php file with same result. Now what ever the way I create it, it thinks the file is txt (it seems so) and there is no code highlighting. It's pretty frustrating.
I have tested the creation of a new file with a different name "reports.php" but this time with right click> new > PHP file, and it came nicely highlighted. i tried to rename the file to "report.php" but it came back to no highlighting!!
It seems Intellij is stuck with the name report.php being a type text.
I tried to delete the file, restart the IDEA, recreate it the right way, no luck.
I tried power save mode on, and off. No luck.
I tried File > invalidate cache/restart, ... no luck.
I'm out of options here...
Is there a way to FORCE intellij to interpret a file? Is the name "report" a reserved word?!?!?
How can it be so stupid...
edit: I also tried the suggestion in : IntelliJ: how to force editor to treat a file as javascript? but php is not in the list of the Template data language
Also in settings > file types, I saw two Php file entries. One with no extention, and one properly configured. I deleted the bad one but it reappears after a restart of the IDEA!
Please go to Settings | Editor | File Types and remove the association of "report.php" with the text file type. (The erroneous association was created because of a bug in IntelliJ IDEA, but unfortunately we don't currently have specific steps to reproduce for it.)

Embedding an image as a resource in a FireBreath plugin

While using VS (2010), I used to be able to add an image as a resource simply by going to the Resource view and then: Right click project > Add > Resource > Import.
I even asked a question about how to then load it: Loading an image from a resource embedded in a dll, but that changed for some reason.
Now when I try the same thing and save the .rc file, I get this message:
"The resource script FILE_PATH.rc was not created using Microsoft
Visual Studio. Comments, macros, preprocessor directives, and
conditionally included information may be modified and/or removed from
this file during the build process. Replace existing file?"
Even if I click "yes" (in order to just test things) then I get all kind of error messages at compile time:
ResourceCompile:
gen\firebreathWin.rc(8): error RC2144: PRIMARY
LANGUAGE ID not a number
gen\firebreathWin.rc(16): error RC2135: file not found VS_VERSION_INFO
etc...
I have two questions:
What is the correct way to add an image resource which will be added to the compiled plugin using CMake? I searched about it and couldn't find any helping information.
What can be the cause for this change in behavior? since I was able to use the same exact steps before and it worked.
Thanks.
First of all, I wouldn't do this; instead, I'd just put the file in the same directory as your DLL and use the path of DLL to find it.
That said, the "correct" way to do this would be to see what changes are made to the .rc file when you add it in the IDE, copy the .rc file from gen_templates/ in the root of the firebreath directory into your project, and then make those changes to your copy of the file. Any changes you make to the generated file will be overridden any time cmake is run again, which can happen any time your cmake files (CMakeLists.txt, *.cmake) change.