Java Reference
In-Depth Information
disk. The ideal number depends on many factors, such as the size of your source
tree and the number of changes you make. Keep in mind that changes made in the
distant past won't be that helpful, so a small number generally works best here.
8.3.2
How IDEA tracks your changes
Change-tracking in the local history is event based rather than character based.
It doesn't store every keystroke like an undo facility—instead, it creates labels to
identify sets of changes to the tree. When you roll back changes or view differ-
ences, they will be between two different labels. Labels in local history are analo-
gous to individual versions in a normal version control system or tags in CVS . For
example, in CVS , you may see version 1.3 and 1.4 of a file, whereas in the local
history you may have the labels before name change refactoring and after name
change refactoring .
Automatically labeling the source tree
Certain events, such as saving a file, building your project, and refactoring, auto-
matically create Local History version labels. You can control IDEA 's automatic
labeling behavior via the Local History control panel. All of this happens auto-
matically, with no special actions required on your behalf. The auto label scheme
is designed to provide a series of fallback steps along logical milestones you're
likely to encounter while coding. You're basically putting a stake in the ground so
that if something bad happens, you know you can get back to a working point.
IDEA also creates a version history each time the file is saved, including when you
deactivate the window, if you've enabled that option.
Creating your own labels
Although IDEA 's automatic labeling generally creates an appropriate version for
rollbacks, we like to create our own version labels before attempting something
risky. This allows us to create a more descriptive label, ensuring that we can quickly
find our way back to a working version. To add your own label, select Add Label
from the Tools | Local History submenu (also available from the context menu),
and specify a meaningful description like just before attempting that pooling strategy .
Tracking external changes
If you add, remove, or modify files outside of IDEA , it has no way to track the
change you made to them. It will, however, add a new version label as soon as it
recognizes that file has changed. The new version of the file is labeled Added exter-
nally or something to that effect. You're able to see the before and after versions of
this change.
 
 
 
 
 
 
 
Search WWH ::




Custom Search