Eclipse project and Eclipse Workspace work under GIT or Bitbucket

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
romanf
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi all,

Workspace keeps important settings - debugging settings for example. So, it has to be kept under CMS - GIT or  Bitbucket for example. On the other hand it keeps absolute passes (like <item value="C:\dev\repos\fx3_video_bridge\FX3_FW"/>) to the project that I am working with.

Is it possible to substitute absolute passes with environment variables, so that user that clones project repository from Bitbucket can do  it anywhere on the disk?

Thank you in advance..

0 Likes
1 Solution
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello Roman,

I checked these files and found just debug configuration relevant to another developer no other fine needed, the best workflow will be just committing your project folder not workspace and other developers have their workspace and open repository project in their workspace, just xxxxxxxxDebug.launch file need to copy to workspace this can be done using githooks.

Regards,
Biren

View solution in original post

0 Likes
5 Replies
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello,

for debug configuration you can copy this "Workspace\.metadata\.plugins\org.eclipse.debug.core\.launches\xxxxxxxxDebug.launch" file from workspace to repo and commit it, may be you can use githooks to automate this copy from workspace to project and back to workspace.

and can you please provide more info about <item value="C:\dev\repos\fx3_video_bridge\FX3_FW"/> and other important settings details.

Regards,
Biren

0 Likes
romanf
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hello Biren.

First of all thank you for the quick response.

In order to understand the files that hold the hard coded project path, I have performed search for the name "fx3_video_bridge" throughout the workspace files using for example notepad++ search in files.

The name can be find inside files below or in the filename itself.

The results can be grouped into 3 categories to my mind:

1. files with .log extension. I suppose I do not have to do anything with them. They are generated files:

- ..\.metadata\.log\

- ..\.metadata\.plugins\org.eclipse.cdt.ui\fx3_video_bridge.build.log

-..\.metadata\.plugins\org.eclipse.cdt.ui\global-build.log

2. Files  with non binary data or concludes references to building process, for ex. files that include source files with .o extensions. I suppose that I have to do nothing with them as well :

- \.metadata\.plugins\org.eclipse.core.resources\.projects\fx3_video_bridge\.indexes\properties.index

- \.metadata\.plugins\org.eclipse.core.resources\.projects\fx3_video_bridge\.location

- \.metadata\.plugins\org.eclipse.core.resources\.projects\fx3_video_bridge\.markers

- \.metadata\.plugins\org.eclipse.core.resources\.root\58.tree 

3. Files that are suspicious for me. I think I have to treat those files in order to make project portable:

- \.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.egit.core.prefs

- \.metadata\.plugins\org.eclipse.debug.core\.launches\fx3_video_bridge fx3_fw debug.launch   (debug configuration is located here) 

- \.metadata\.plugins\org.eclipse.debug.ui\launchConfigurationHistory.xml ( not sure about this file)

- \.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi

- \.metadata\.plugins\org.eclipse.ui.ide\dialog_settings.xml (my example was taken from this file)

The best way to treat the problem would be if it will be possible to define relative path to the project somehow.

Roman

 

0 Likes
romanf
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi once again.

There is one small correction to the previous mail.

the files :

\.plugins\org.eclipse.debug.ui\launchConfigurationHistory.xml

\.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi

as well as files with project name in the file name only can be removed from the list because they do not have project path. They have project name only.

Roman

0 Likes
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello Roman,

I checked these files and found just debug configuration relevant to another developer no other fine needed, the best workflow will be just committing your project folder not workspace and other developers have their workspace and open repository project in their workspace, just xxxxxxxxDebug.launch file need to copy to workspace this can be done using githooks.

Regards,
Biren

0 Likes
romanf
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hello Biren,

Thank you very much. I will do it as you have recommended.

Roman 

0 Likes