Undoing the Refactor functions (see the Refactoring Code (Managed web hosting)

Undoing the Refactor functions (see the Refactoring Code section) is a special case. The normal Undo function can only revert these functions in several steps and then only partially. To undo a Refactor function, it is better to use the special Undo (Ctrl+Shift+Z) and Redo (Ctrl+Shift+Y) functions in the Refactor submenu. Local History The Local History function group belongs to Eclipse s most powerful functionality for maintaining source code. For each compilation unit, Eclipse stores a configurable number of older versions that are updated with each Save operation. You can set the number of stored versions in Preferences > Workbench > Local History. The default value is 50 versions, with a maximum age of seven days and a maximum file size of 1 Mb. If you use the Save key (Ctrl+S) as frequently as I do, it would be better to increase the maximum number of versions a bit. The Local History functions work for any type of resource, not just for Java source code. Comparing Resources The context function Compare > Local History allows you to compare the current version of a compilation unit with previous versions. First, you get a selection list with the previous versions nicely grouped by days. Clicking one of these versions will compare the selected version with the current version. You can invoke this function from the Package Explorer or from the Resource Navigator. It can also be called from the editor, where it is applied to the selected element only for example, a method. In Figure 2.8 I have deleted and modified some comments and extracted the println() statement as a separate method. The comparison shows the deleted lines on the right and the inserted lines on the lefthand side on a gray background. The right vertical ruler shows all modifications to the file: the selected modification has a black border, and all other modifications have a gray border. The window at the topright corner (Java Structure Compare) allows the comparison of single methods. Replacing with an Older Version The function Replace > Local History works very similarly to Compare > Local History. The window is additionally equipped with a Replace button with which you can replace the current version with the version in the right window. In contrast, this function does not have a Java Structure Compare window. Restore Deleted Resource Mistakenly deleting a resource is not a tragedy either. The function Restore from Local History provides a selection list for previously deleted resources that can be restored by simply marking their check boxes. 43 Effective Programming with Eclipse
File Transfer Protocol comes together with anonymous ftp access with every FTP Web Hosting account we offer today. Enjoy burs table ftp transfers together with fast FTP connection.

Leave a Reply