I am forced to use Eclipse in a new project, but my heart still longs for IntelliJ which I have been using exclusively since before Eclipse was born.
I am getting used to it, but one feature I really miss is "compare to clipboard".
For example, if you see two similar methods in a class, you can copy one to the clipboard, then compare to the other, and it makes it easy to refactor.
Is there any Eclipse plugin for "Compare to Clipboard"?
Standard Eclipse does not have a Compare to Clipboard
option, but there is an Eclipse plugin which allows you to do that: AnyEdit tools.
I just tried it and it seems to be what you are looking for: it adds the option Compare to Clipboard
to the popup menu of the editor and the file explorer views. Comparison is done either on the selected text or the whole file.
Might not be what you expect to achieve through the compare to clipboard command (I do not know my way around IntelliJ), but you can compare two methods together through the outline view too :
This will open a comparison dialog displaying the differences between your two methods. This dialog does not allow inline editing, but it is a great way to spot differences between two similar methods.
Note that you can do the same through the package explorer, thus allowing comparison between methods (or inner classes) of distinct java files. For this, you need to make sure that the Package Explorer does not filter the Java Members though. Since I don't really know how to explain that bit other than with images, use the filters view menu (through the downward facing arrow at the top right of the package explorer view) :
and in the dialog that opens, make sure that Java Member is unticked. Then you can simply expand a java class to see its members in the package explorer, and compare them together :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With