Issue572 573 revert add command fixes
Created originally on Bitbucket by colin-hurley (Colin Hurley)
Was already merged in Bitbucket before import, marked as merged by the import user
-
Update the Add and Revert commands to support selection of projects, folders, and multiple files
The Add command is now visible on selection of any files, folders, and/or projects. The command is enabled when any files within the selection are currently untracked and not ignored.
AddHandler has been improved to use the in-memory Mercurial status cache to retrieve file status, rather than using JavaHg to execute a status command. FlagPropertyTester, which handles enablement of the command, implements similar status cache handling.
The Revert command is now visible on selection of any files, folders, and/or projects. The command is enabled when any files within the selection are currently modified or untracked (i.e. dirty working tree).
fixes #572 (closed) #573 (closed), refs #578 (closed)
-
Enable the Add command when there are any untracked files under the selection in Synchronize view
Add a FIXME for misuse of Eclipse team API. However, I believe that a lot of the team synchronize implementation would need to be reworked to address this FIXME.
To normalize the class hierarchy and reuse more code, AddAction now extends AbstractResourceSynchronizeAction just as other synchronize actions do (Commit, Revert, Resolve). This makes it easier to refactor these commands consistently.
AddOperation now handles extraction of file resources from working changesets, instead of AddAction. This improves consistency between AddOperation/AddAction and other synchronize actions and also gives AddOperation more context about the current selection (which is used to force the add dialog to always display when a working changeset is selected).
Several additional methods have been added to AbstractResourceSynchronizeAction and PathAwareAction to provide more selective override control by sub-classes (this is used by AddAction).
AbstractResourceSynchronizeAction provides a built-in alternative mode to enable the command when any selected item supports the command, rather than needing all selected items to support the command (this is also used by AddAction).
The selection normalization login in PathAwareAction has been adjusted to use the PathFromChangeSet,getFiles() method instead of building its own recursive algorithm to walk down the directory tree. This reuses more existing code and also increases code readability and type safety.
Add various comments and javadoc in PathAwareAction and AbstractResourceSynchronizeAction.
fixes #573 (closed), refs #578 (closed)