开发者

Importing list of source files into an Eclipse project

We have a topdirectory containing code for lots of different projects. I would like to create an Eclipse CDT-project that contains only the source needed to work on and compile a specific project. I used SlickEdit before, and there I could just import a list of sources and headers. Is it possible to achieve something similar in开发者_如何学JAVA Eclipse?


In Eclipse, you can selectively import certain directories to be included in the project.

You can create an eclipse project somewhere else in your drive, and then create links only to the folders that you want in your original location (these are called "linked resources" in Eclipse)

You can also use the linked resource strategy for an entire project (I mean an Eclipse project, not your top-level project). For example, if your folder hierarchy is as follows:

/top-level
/top-level/projectA
/top-level/projectA/subProjectA
/top-level/projectB

You can create an eclipse workspace at location /my-workspace, create a project called subProjectA and have it linked to /top-level/projectA/subProjectA. You can do the same for projectB and they will appear in your Eclipse workspace as if they are side-by-side in a flat hierarchy.


In Eclipse Helios (3.6)

In eclipse project, righ-mouse-click "New ..." > "Folder".

A dialog box appears.

Click "Advanced" button...

Click "Link to alternate Location" radio button.

Click "Browse"

Select the folder you want to link to.

For a refinement , see "Help" > "Help Contents" (a new window appears)

"Workbench User Guide" > "What's New"

Search for "Virtual folders"


So far as I know, you can not do that. What you can do is import these source files into another project, which means these file will be copied to that created project.


Traditionally, Eclipse assumes that the .project file is at the top-level directory of your project's sources and all the source code below it is included in the project. However, I think that you should be able to use linked folders so that you have a Eclipse project directory which is basically empty but for a .project file and a linked folder which points to your source tree. I do not think however that you can explicitly list the files to include in the project.

EDIT: if you do find a solution to this, please let me know.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜