开发者

How do I add a single file back into my Eclipse project?

I have an Eclipse project. It originally had a structure something like this:

MyProj
   src
      myproj
          bar.java
          baz.java
          foo.java
          [etc.]

Earlier, I thought I wouldn't need baz.java anymore, so I deleted it from the project, which also deleted it from disk. Thankfully, subversion remembered the old version, because it turns out I DO need it, so now I've gotten it back into the source directory, but I can't seem to figure out how to add it back into the project.

I tried File -> Import, but that seems to only want to import directories.

I tried File -> New -> Java Class, but that creates a new, empty file.

I suppose I COULD copy my file off elsewhere, File -> New, then copy/paste it in, but I'd love to learn t开发者_JS百科he CORRECT Eclipse way to add an existing file to my project.

Thanks!

[Edit: I'm on a Mac, 10.6.Latest, Eclipse Helois 20100617-1415, though I don't think it matters.]


You should be able to just put them in the correct dir under your project(I think you stated SVN already replaced the file in the proper location), and hit File->refresh in Eclipse.

Edit: that wasn't working for me, I'm on a mac but I assume drag on drop should work platform independent and it was working for me.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜