How do I open the same project twice?

I want to know how and if I can open the same project twice.

I think that would make it easier to navigate.
If I for example have all design/css in one window and php in the other, I aslo want to have different folder structure in them.

Is this possible? Or are there any other way to do something simular?

4
5 comments

Hi Andreas,

Technically that is possible, but I do not see real need for this.

You can define multiple Custom Scopes (Settings | Scopes) to include only files/folders you are interested in and then switch between them in Project View panel when desired (use drop down box on top left of it).

0

Hmm, not quite what I was looking for. (maybe I'm doing it wrong)

But I don't want the same tabs or anything.

Normaly this is not a problem, but right now I'm working with Magento and there are a lot of folders for css/design and also for different php files.
I feel like that choose window to work with would make it easier to find correct file (tab).

Why I came up with this idea is because I have worked with a part of the prodject in local folders in a new window when I tested, and then I could Alt+Tab between them and I found that to be a nice way to work :)

But maybe it's just me that are dumb :D

0

Well ... technically  you cannot open exactly the same project twice in the same IDE. The project is identified by project settings/configuration, which is normally stored in .idea subfolder. This prevents particular IDE from opening the same project twice (at the same time).

What you can do here -- is some workaround, which will allow you to open the same folders/files (or whatever) in 2 different projects (which means 2 different PhpStorm windows). The general idea is here: http://youtrack.jetbrains.com/issue/WI-343

What you need to do in your case (if so desired):

  1. Go to anywhere where you want to keep your project settings (e.g. C:\MyProjects)
  2. In PhpStorm create new empty project there (e.g. C:\MyProjects\PHPonly)
  3. Go to "Settings | Directories" and detach current Content Root
  4. Now attach new Content Root with the files of your actual project (e.g. mark unwanted folders as Excluded on the same settings page)
  5. Repeat #2-#4 but for another folders/files (e.g. C:\MyProjects\CSSonly)


In the end you will have 2 separate projects (each has it's own configuration but can work with the same source files) which you can open in separate IDE windows.

I feel like that choose window to work with would make it easier to find correct file (tab).

What you can do here instead of using multiple windows:

  1. Tab colors:
    • Define Custom Scope (Settings | Scopes) to include some  files that belongs to some subject (e.g. this particular  theme/skin/module)
    • Settings | File Colors -- add your scope there and assign some unique color.
    • If you do that for few scopes you should be able to differentiate between them quite easily
  2. Tab labels:
  3. Other (less helpful/harder to use, I think)
    • Use "Navigate | File" or "Navigate | Class" (for PHP classes)
    • Use Contexts functionality (Tools | Tasks & Contexts) -- this will allow swicthing between sets of tabs (each Context will remember what files are currently open, status of tool windows and other small things)
1

Non technical approach may be like.....

Just make a copy of same project in different folder/directory and open it with intellij. If you have clone project then checkout different branches to work simultaneously.

0

In WebStorm you can open another project in a new window, then switch to the first opened project, leaving you with 2 editors open to the same project.. My guess is it will work the same with intelliJ.

 

1

Please sign in to leave a comment.