Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Adding a file to a project
Adding a file to a project [message #177827] Fri, 09 January 2004 14:33 Go to next message
Eclipse UserFriend
Originally posted by: erik.rogind.com

I must be missing something.
I would simply like to add a C++ file from a "common" directory into a C++
project, and not force the inclusion of all C++ files from that "common"
directory to be included in my project.
How do I do this? If I click Project Properties | Compiler | Extra Source
Paths, and add the "common" directory, then ALL C++ files in the common
directory are included. Not the intended result.
There should be a simple "Add File to Project" (where that file is not in
the project directory)
Can anyone help?
Thanks.
Re: Adding a file to a project [message #177835 is a reply to message #177827] Fri, 09 January 2004 14:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pablo.intiwawa.net

Hello,

> I must be missing something.
> I would simply like to add a C++ file from a "common" directory into a C++
> project, and not force the inclusion of all C++ files from that "common"
> directory to be included in my project.
> How do I do this? If I click Project Properties | Compiler | Extra Source
> Paths, and add the "common" directory, then ALL C++ files in the common
> directory are included. Not the intended result.
> There should be a simple "Add File to Project" (where that file is not in
> the project directory)
> Can anyone help?
> Thanks.

try in the Explorer view:
right-click on project -> import -> File System -> Next -> (make your
election)

Hope could help you.

Greetings,

Pablo
Re: Adding a file to a project [message #177841 is a reply to message #177835] Fri, 09 January 2004 14:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: erik.rogind.com

Thanks Pabo,
Your idea works. However, this copies the file into the project from the
common directory, creating multiple copies of a single class file, one for
each project that uses it. This is NOT the intended effect. I would simply
like to include the source file from the common directory path where it
lives.... leave it there. (A link would be acceptable). Such that there
exists only a single copy of this class file.
Any other ideas?
Thanks.

"Pablo Escobar" <pablo@intiwawa.net> wrote in message
news:pan.2004.01.09.19.43.52.764231@intiwawa.net...
> Hello,
>
> > I must be missing something.
> > I would simply like to add a C++ file from a "common" directory into a
C++
> > project, and not force the inclusion of all C++ files from that "common"
> > directory to be included in my project.
> > How do I do this? If I click Project Properties | Compiler | Extra
Source
> > Paths, and add the "common" directory, then ALL C++ files in the common
> > directory are included. Not the intended result.
> > There should be a simple "Add File to Project" (where that file is not
in
> > the project directory)
> > Can anyone help?
> > Thanks.
>
> try in the Explorer view:
> right-click on project -> import -> File System -> Next -> (make your
> election)
>
> Hope could help you.
>
> Greetings,
>
> Pablo
>
>
Re: Adding a file to a project [message #177848 is a reply to message #177841] Fri, 09 January 2004 15:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pablo.intiwawa.net

Yes,

> Thanks Pabo,
> Your idea works. However, this copies the file into the project from the
> common directory, creating multiple copies of a single class file, one for
> each project that uses it. This is NOT the intended effect. I would simply
> like to include the source file from the common directory path where it
> lives.... leave it there. (A link would be acceptable). Such that there
> exists only a single copy of this class file.
> Any other ideas?
> Thanks.
>

try this:
in the navigator view, at the place you want your link, right-click -> new
-> file -> advanced -> choose link your file ... and so on.

>>
>> Hope could help you.
>>
>> Greetings,
>>
>> Pablo
>>
>>
Re: Adding a file to a project [message #177862 is a reply to message #177848] Fri, 09 January 2004 15:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: erik.rogind.com

Thanks again, Pablo.
I have no such "advanced | link" option under new | file. Perhaps I have an
older version of eclipse? I am using QNX Momentics version 2.0, which seems
to be built ontop of Eclipse 2.0.2.
Any other ideas? I notice that "Software Upgrades" links to
www/qnx.com/updates, which hangs.
How painful will a Eclipse/Momentics update be... If it is possible?


"Pablo Escobar" <pablo@intiwawa.net> wrote in message
news:pan.2004.01.09.20.00.19.676946@intiwawa.net...
> Yes,
>
> > Thanks Pabo,
> > Your idea works. However, this copies the file into the project from the
> > common directory, creating multiple copies of a single class file, one
for
> > each project that uses it. This is NOT the intended effect. I would
simply
> > like to include the source file from the common directory path where it
> > lives.... leave it there. (A link would be acceptable). Such that there
> > exists only a single copy of this class file.
> > Any other ideas?
> > Thanks.
> >
>
> try this:
> in the navigator view, at the place you want your link, right-click -> new
> -> file -> advanced -> choose link your file ... and so on.
>
> >>
> >> Hope could help you.
> >>
> >> Greetings,
> >>
> >> Pablo
> >>
> >>
>
Re: Adding a file to a project [message #178000 is a reply to message #177862] Sat, 10 January 2004 08:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pablo.intiwawa.net

Hello,

> Thanks again, Pablo.
> I have no such "advanced | link" option under new | file. Perhaps I have an
> older version of eclipse? I am using QNX Momentics version 2.0, which seems
> to be built ontop of Eclipse 2.0.2.

That could be possible.

> Any other ideas? I notice that "Software Upgrades" links to
> www/qnx.com/updates, which hangs.

It does not works on my system either.

> How painful will a Eclipse/Momentics update be... If it is possible?
>

I do not know. I do updates regularly and it is not very hard. Usualy you
have a folder and there should be everything. I just backup this one in
case of a problem and then extract the eclipse download into the old
folder.
There are some little changes in the folder structure of the plugins (i
think in jface?) that have to be updated in the project and that should be
all.
I suggest: backup everything and try it out.

Greetings,

Pablo
Re: Adding a file to a project [message #178685 is a reply to message #177862] Mon, 12 January 2004 13:09 Go to previous message
Eclipse UserFriend
Originally posted by: Michael_Valenta.oti.com

Erik,

Linked resources were introduced in Eclipse 2.1 so you would need to get
an updated software product from QNX to use links. It would be best to
contact QNX (or ask on one of their mailing lists/newsgroups if they
have them) to see how to go about this.

However, resources can only be linked as direct childen of the project
so this would only help you out if you wanted the file to be a direct
child of your project. You could still link a parent directory of the
file but all children would be included. I believe the intention is that
tools in Eclipse would provide their own mechanism for excluding files.
Java provides such a mechanism but I don't know if CDT does. You could
post a questions on the CDT newsgroup to find out.

Michael

Erik Rogind wrote:

> Thanks again, Pablo.
> I have no such "advanced | link" option under new | file. Perhaps I have an
> older version of eclipse? I am using QNX Momentics version 2.0, which seems
> to be built ontop of Eclipse 2.0.2.
> Any other ideas? I notice that "Software Upgrades" links to
> www/qnx.com/updates, which hangs.
> How painful will a Eclipse/Momentics update be... If it is possible?
>
>
> "Pablo Escobar" <pablo@intiwawa.net> wrote in message
> news:pan.2004.01.09.20.00.19.676946@intiwawa.net...
>
>>Yes,
>>
>>
>>>Thanks Pabo,
>>>Your idea works. However, this copies the file into the project from the
>>>common directory, creating multiple copies of a single class file, one
>>>
> for
>
>>>each project that uses it. This is NOT the intended effect. I would
>>>
> simply
>
>>>like to include the source file from the common directory path where it
>>>lives.... leave it there. (A link would be acceptable). Such that there
>>>exists only a single copy of this class file.
>>>Any other ideas?
>>>Thanks.
>>>
>>>
>>try this:
>>in the navigator view, at the place you want your link, right-click -> new
>>-> file -> advanced -> choose link your file ... and so on.
>>
>>
>>>>Hope could help you.
>>>>
>>>>Greetings,
>>>>
>>>>Pablo
>>>>
>>>>
>>>>
>
>
Previous Topic:output informatin to the console view of ec;ipse
Next Topic:CVS:broken pipe msg when commit to sourcegorge.net repository
Goto Forum:
  


Current Time: Thu May 01 08:01:51 EDT 2025

Powered by FUDForum. Page generated in 0.06719 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top