diff options
author | Robin Stocker | 2012-08-26 19:39:39 +0000 |
---|---|---|
committer | Matthias Sohn | 2012-08-26 19:39:39 +0000 |
commit | e65101e7eeb28cd9cdb4bc1c7702fe91a59c534f (patch) | |
tree | 859311dce82dd60d81d10243411e557778316b4f /org.eclipse.egit.ui/plugin.xml | |
parent | 62bd9d2a1e538c798f51c89f97659ce00304ec48 (diff) | |
download | egit-e65101e7eeb28cd9cdb4bc1c7702fe91a59c534f.tar.gz egit-e65101e7eeb28cd9cdb4bc1c7702fe91a59c534f.tar.xz egit-e65101e7eeb28cd9cdb4bc1c7702fe91a59c534f.zip |
[repoView] Add Delete command for files and folders
Works on workspace and non-workspace resources.
For sharing the code with the Staging View, extracted the UI logic into
a new DeletePathsOperationUI class. This dispatches either to the
standard action from org.eclipse.ui or to DeletePathsOperation.
DeleteResourcesOperation was renamed to DeletePathsOperation to make it
clear that it operates on paths, not on potentially non-existing
resources.
Undo is also supported if all selected elements are resources.
Bug: 385001
Change-Id: I0d113cfa0fdc2c58ec33fa1c7ffd34b74e6c11a9
Signed-off-by: Robin Stocker <robin@nibor.org>
Also-by: Stefan Lay <stefan.lay@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui/plugin.xml')
-rw-r--r-- | org.eclipse.egit.ui/plugin.xml | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/plugin.xml b/org.eclipse.egit.ui/plugin.xml index ef5e8ac246..60cc4884a6 100644 --- a/org.eclipse.egit.ui/plugin.xml +++ b/org.eclipse.egit.ui/plugin.xml @@ -1175,6 +1175,31 @@ <handler commandId="org.eclipse.ui.edit.delete"> <class + class="org.eclipse.egit.ui.internal.repository.tree.command.DeleteFileCommand"> + </class> + <activeWhen> + <and> + <count + value="+"> + </count> + <iterate + ifEmpty="false" + operator="and"> + <or> + <instanceof + value="org.eclipse.egit.ui.internal.repository.tree.FileNode"> + </instanceof> + <instanceof + value="org.eclipse.egit.ui.internal.repository.tree.FolderNode"> + </instanceof> + </or> + </iterate> + </and> + </activeWhen> + </handler> + <handler + commandId="org.eclipse.ui.edit.delete"> + <class class="org.eclipse.egit.ui.internal.repository.tree.command.DeleteCommand"> </class> <activeWhen> @@ -1852,6 +1877,14 @@ viewerId="org.eclipse.egit.ui.RepositoriesView" class="org.eclipse.egit.ui.internal.repository.RepositoryDragAssistant"> </dragAssistant> + <viewerActionBinding + viewerId="org.eclipse.egit.ui.RepositoriesView"> + <includes> + <actionExtension + pattern="org.eclipse.ui.navigator.resources.UndoRedoActionProvider"> + </actionExtension> + </includes> + </viewerActionBinding> </extension> <extension point="org.eclipse.ui.menus"> @@ -3012,6 +3045,31 @@ </and> </visibleWhen> </command> + <command + commandId="org.eclipse.ui.edit.delete" + label="%RepoViewDeleteFile.label" + style="push"> + <visibleWhen + checkEnabled="false"> + <and> + <count + value="+"> + </count> + <iterate + ifEmpty="false" + operator="and"> + <or> + <instanceof + value="org.eclipse.egit.ui.internal.repository.tree.FileNode"> + </instanceof> + <instanceof + value="org.eclipse.egit.ui.internal.repository.tree.FolderNode"> + </instanceof> + </or> + </iterate> + </and> + </visibleWhen> + </command> <menu id="org.eclipse.egit.ui.RepositoriesViewShowIn" label="%ShowIn" |