开发者

Prevent eclipse from auto import packages when copying source code between projects

Is it possible to prevent eclipse from automatically improrting any modules when I copy source code from one project to another. I just want to copy the source code and then rename all the specic classes, I don't actually want to use the classes from the other 开发者_运维问答project.


In the preferences window (menu: Windows - Preferences) enter "paste" into the search field (top left).

It should find Java - Editor - Typing

Uncheck the Update imports in the When pasting block.

Prevent eclipse from auto import packages when copying source code between projects


I do not know of any.

You can, however, paste to e.g. an empty Notepad document, and mark all, and then copy the text there too.

This gets rid of the extra information Eclipse has available to itself, and should allow you to do what you want.


One way would be to open the target Java file with the text editor rather than the Java editor. For instance, select a file entry in the Package Explorer (etc) and use the "Open With ..." menu entry in the context menu and choose "Text Editor".

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜