juzna.cz
juzna.cz

Reputation: 324

Simultaneous programming on the same project in PhpStorm/IntelliJ IDEA

Is is possible in PhpStorm/IntelliJ IDEA for two (or more) programmers to work on the same project simultaneously, i.e. editing the same files at the same time? Imagine something like http://collabedit.com/, but in IDE.

When we start new projects, we would like a programmer and coder to sit to each other and edit the same files simultaneously, i.e. the programmer writes PHP code while the coder writes templates, both can look into each other's code and make some small changes where necessary.

We tried opening the same project via mounted drive on second computer, but Idea was confused and often happened, that the older version got flushed to disk and thus we lost our changes. Also, it's not possible to edit the same file simultaneously.

Upvotes: 12

Views: 9696

Answers (3)

Sebastian
Sebastian

Reputation: 6057

Maybe it's worth to give Floobits for IntelliJ a try: https://floobits.com/help/plugins/intellij

From their FAQ page:

Floobits allows multiple users to simultaneously edit any file using the text editors they already know.

Upvotes: 1

Vic
Vic

Reputation: 22041

I'd suggest having both programmers work against a shared git repository and perform frequent pushes/pulls into/from it.

Its not as fast of a process like working with the same set of files, but it's guaranteed that nothing will be lost.

Also, maybe the following plugin is worth looking into it.

IdeTalk lets you work semi-interactively. See what you can do from its context menu:

enter image description here

Upvotes: 3

zpontikas
zpontikas

Reputation: 5662

Long story short you cant work like you do in collabedit.com in IntelliJ. ie. You cant see the other person typing the code on the same file that you have open....
Anyway the way to do it is to create a sync with a shared directory that both (or whoever you want) can access. Ok so here it goes....

  1. Go to "Project settings"

    (alt+ctrl+shift+s)

  2. Go to deployments and setup the info for the remote path that you want your developers to access simultaniously. If you this has an apache there you can add the server root path as well.
    Deployment connection settings

  3. Go to mappings and set the local folder that you want to sync with your remote folder. Note that: Local path should be the local root path of your project and deployment path on server is relative to the Root path you set on the previous tab (connections tab) Deployment mappings

  4. Go to Tools -> Deployment and check the Automatic upload (always)Tools deployemnts features

  5. Now Go to Tools -> Deployment -> Options and set the following marked settings Sync Options

  6. You can see now the deployment path that will be sync with your local files here. The green font indicates that this folder (or file) is linked to be synced with your own files. If you dont want a file or directory to be synced you can right click on it an select "exclude path" so it wont be synced. Deployment server



Ok so what have you acomplised with this setting?

  1. Whenever a file is localy changed it will be automaticly uploaded to the remote server/path
  2. If a file is changed on the server (by another dev probably) then this user will get a notification that this file changed.
  3. I think you can find your way from here and configure it the way you want to :)

Upvotes: 14

Related Questions