开发者

EGit opening .java files as plain text

So I've finally figured out how to use Git. (thanks to all the users here :)) And so I installed EGit on Eclipse. But now I have yet another problem:

So EGit works awesomely in Eclipse, and I can push/pull/commit/whatever else, but there's an annoyance: The whole reason I used EGit was so that I could edit the Java source code of a repository. But whenever I try to open a .java file from the repo, it just shows it like a text document. I've tried clicking "Java Perspective" but that jus开发者_开发知识库t made the screen larger.

Is there any way to directly edit/save Java source files inside of Eclipse's Java editor if the source files come from EGit?


If you're editing files in Eclipse that are java files but are handled as text files instead this could mean that the project's nature or facet settings are not set to be Java.

To avoid the natures/facets mess in eclipse you can "clone" the repository into eclipse. You do this through the import dialog. Here are some instructions on how:

http://www.vogella.de/articles/EGit/article.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜