< Day Day Up > |
Recipe 4.5 Comparing Files4.5.1 ProblemYou need to see the differences between two files displayed graphically. 4.5.2 SolutionSelect the files in a view and then select Compare With Each Other in the view's context menu. 4.5.3 DiscussionOne of the most common things professional developers need to do is to compare the contents of two files to see the changes made to each; the support in most operating systems for such operations is minimal. To compare two files, highlight them in a view such as the Package Explorer and select Compare With Each Other in the view's context menu. Eclipse will perform the comparison in an intelligent manner and display the results in a Compare Editor, as shown in Figure 4-10. Figure 4-10. Comparing two filesYou even can edit the files, copying changes from one file to the other using the buttons in the Java Source Compare pane.
4.5.4 See AlsoRecipe 4.6 on comparing files against local history; Recipe 4.7 on restoring elements and files from local history. |
< Day Day Up > |