It's all about the answers!

Ask a question

RTC and Eclipse: is it necessary that code be stored in a fully configured Eclipse project?


DJ Wight (1111) | asked Aug 05 '15, 4:42 p.m.
Apologies for what promises to be a dumb-newbie question...

Recently my project group bought a C/C++ codebase from a contractor which does not use Eclipse as part of its development picture. Basically a big /src tree organized for building with Autotools, with a few top-level build scripts masking some of the Autotools complexity.

Since then, developers on our project team have been successful in setting up the code within Eclipse (Luna) as an Autotools project, as an experimental exercise...but what is currently causing grief, is that as we begin to work with this code, our project is also moving to Jazz / RTC 5 (Formal process, not Agile) for CM. 

None of us are clear about whether the code is required to go into the RTC repository in the form of a fully configured Eclipse project ready for developers to use. 

My reading as a developer is that it must:  if it doesn't, when I download the code to my repository workspace, I have to begin by bringing in new .project, .cproject, and .autotools files "behind the scenes" to get to a project that has the include paths I need specified, allows for doing C/C++ code analysis, and (hopefully) can be tweaked to allow for Autotools building from within Eclipse.  It also means when I deliver change sets back, it is likely to take a variety of error-prone workarounds to avoid delivering project-specific settings that aren't part of the codebase as conceived by CM right now. Right now, that's code being held as close as possible to the contractor's delivered (non-Eclipse) package, because the CM role doesn't use Eclipse for anything except looking at the code.

None of the documentation I've seen so far says anything about how close the setup of code in Jazz / RTC needs to be, to a developer's ready-to-use Eclipse project, before we set about using it.

My question is, can anyone recommend a reference that might clarify this issue for us?

2 answers



permanent link
Karthik Krishnan (8846121163) | answered Aug 06 '15, 12:49 a.m.
We also work with C, C++ & VC++ code in our environment and we use Eclipse & Visual studio RTC clients

The advantage of setting up the .Project flle is that Eclipse (when using CDT) one could load the components as project in Eclipse. It would be easier to do this way if the components needs to be build-able on its own along with other advantages. Also useful during builds on how the components get loaded

In the Visual Studio world, the .Project file has no real value in my experience

Hope this helps

Comments
DJ Wight commented Aug 06 '15, 8:54 a.m.

Thank you!  I think it does help...as a developer I do want to be able to build the code I have loaded to my repository, using Eclipse.  (Not a priority for CM, as they are required to build baselines using the contractor's scripts).

I guess I was hoping that anyone could tell me it is standard practice when using RTC with Eclipse, to set up one's code in RTC in the form of fully configured, ready-to-use Eclipse projects. The language used in the articles I'm finding suggests it, eg., when they talk about "Find and load Eclipse projects", but nothing I've seen makes it explicit that it might even be desirable to store the code in such a project, configured ready-to-use.


Karthik Krishnan commented Aug 07 '15, 7:44 a.m. | edited Aug 07 '15, 7:45 a.m.

Well we (as RTC administrators) while creating  a component will also create a .project file (using Eclipse client)  irrespective of the contents of the component

This helps the team to load all the components as Eclipse projects (using Eclipse client)

Of course the .Project file can also be delivered by the team members but just as a process we do it.

IT also gives freedom for the team members to restructure files and still use features from Eclipse

These helps if we you need this feature (use Find and load eclipse projects") while loading the repository.



permanent link
Ralph Schoon (63.3k33646) | answered Aug 06 '15, 10:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Aug 06 '15, 10:56 a.m.
Hi,

there are many ways to load. The default way however in Eclipse is to find the Projects and load them into the workspace. You have many benefits like being able to have working sets (e.g. for the projects in a component which allows to limit what you see if there are many). You can use the browsers to go into the projects. Your natures (e.g. Java) work. You can build and debug locally. There is a lot of stuff that depends on the .project file.

You can also load the components as folders and let the .project files get created (and you can also ignore them if you don't want to see them in SCM) but you loose all the things that you need in Eclipse and it is only practical if you don't need the natures.

As an Example, I load the article folder structure for this web site, where I contribute, that way. I even load only a part of the component and let Eclipse create the artificial .project file which I never check in. This is fine, reduces the amount to load, but only really works, because I use external editors for the web pages and need no Java nature etc.

In all other projects I create and use, I use real Java/Plugin projects and really need and use the capabilities that come with the natures.

Hope this help a bit further.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.