views:

27

answers:

3

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.

A: 

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.

Thorbjørn Ravn Andersen
These seem like a lot more work than just deleting the packages it imports =\
Falmarri
A: 

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".

Stephen C
+1  A: 

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.

sample

Carlos Heuberger