Integrated Commands

The following AccuRev commands are integrated into the main context menu in Eclipse’s Navigator view when you install AccuRev Plug-In for Eclipse: Refactor, Compare With, Replace With

To display the context menu, right-click a file or directory in the Navigator view.

Refactor

Eclipse supports two types of refactoring operations:

  • Moving an object to a different directory.
  • Renaming an object.

When you complete either of these operations, the Rename command is invoked to record the change of pathname in the repository. The results are displayed in the AccuRev Console View.

Note:  

  • The Eclipse Delete command removes an object from local disk storage, but does not perform any AccuRev command. (In particular, it does not perform a Defunct command). If you Delete a version-controlled element, its status becomes (missing).
  • Do not use the Move or Rename commands when you are not logged in to an AccuRev Server. Doing so causes changes to the Eclipse workspace but not to the AccuRev workspace. Visual cues indicate that you are not logged in to the AccuRev Server, including a greyed-out repository decoration on the root of the Package Explorer tree and missing decorations on files and directories. See Setting Label Decorations for more information.

Move. Eclipse supports moving an object to a different directory, using either of these methods:

  • Right-click the object and select Refactor > Move from the context menu.
  • Drag-and-drop the object from one directory to another.

Note: Do not use the Move command to move an object from one Eclipse project to a project that is part of a different AccuRev workspace. The object will be moved, but the AccuRev Rename command will not be invoked. The object will have (missing) status in the source location and (external) status in the destination location.

Compare With

Eclipse supports commands to compare your version of a file with prior local history versions of that file. AccuRev Plug-In for Eclipse adds the following commands which perform comparisons with versions that were created with Keep and stored in the AccuRev repository.

The following commands act the same as in the Team > Diff Against menu: Most Recent Version, Backed Version, File On Disk, Basis Version.

AccuRev Revision

Compares the file in the AccuRev workspace with the version created by a particular AccuRev transaction. A File History tab appears, containing a table of transactions involving the file. (This is the same as the upper table in the AccuRev History display. See History View.)

Double-click a transaction to choose it for the comparison. This launches Eclipse’s Compare Editor.

See the Eclipse help system for more information on the Compare Editor, in particular the topics Compare Editor and Understanding the Comparison.

Replace With

Eclipse supports commands to replace your version of a file with a prior local history version. AccuRev Plug-In for Eclipse adds the following commands which replace a file with a version that was created with Keep and stored in the AccuRev repository.

The following commands act the same as in the Team > Revert To menu: Most Recent Version, Backed Version

AccuRev Revision

Replaces the file in the AccuRev workspace with the version created by a particular AccuRev transaction. As with the Compare With > AccuRev Revision command, a File History tab appears containing a list of transactions involving the file.

Double-click a transaction to choose it for the comparison. This launches Eclipse’s Compare Editor.

To proceed with the replacement operation, click the Replace button below the Compare Editor. To cancel the operation, close the File History tab.