diff options
author | Thomas Wolf | 2019-11-04 08:27:42 +0000 |
---|---|---|
committer | Thomas Wolf | 2019-11-16 11:48:18 +0000 |
commit | 0cff7b2540d68ee4d1d54a423993177e5c3e27a4 (patch) | |
tree | 2275340313fe14456785beac68837ac9fe022d9c | |
parent | 9b45a0189ebb550324176ab68edd2131790d2aa9 (diff) | |
download | egit-0cff7b2540d68ee4d1d54a423993177e5c3e27a4.tar.gz egit-0cff7b2540d68ee4d1d54a423993177e5c3e27a4.tar.xz egit-0cff7b2540d68ee4d1d54a423993177e5c3e27a4.zip |
[repo view] Eliminate default handler for paste command
Remove the special paste command with its default handler; create a
dedicated handler and bind it to the standard paste command instead.
Remove the now superfluous key binding.
Bug: 495064
Change-Id: Ibcacd226b37bf05f1e46126e277a0f5ef6aab6a1
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
3 files changed, 18 insertions, 16 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewRepoHandlingTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewRepoHandlingTest.java index d424c0365f..067d85fe11 100644 --- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewRepoHandlingTest.java +++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewRepoHandlingTest.java @@ -1,5 +1,6 @@ /******************************************************************************* - * Copyright (c) 2010, 2013 SAP AG and others. + * Copyright (c) 2010, 2019 SAP AG and others. + * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -59,6 +60,8 @@ public class GitRepositoriesViewRepoHandlingTest extends private static final String REMOVE_REPOSITORY_CONTEXT_MENU_LABEL = "RepoViewRemove.label"; + private static final String PASTE_PATH_CONTEXT_MENU_LABEL = "RepoViewPastePath.label"; + private File repositoryFile; @Before @@ -123,7 +126,8 @@ public class GitRepositoriesViewRepoHandlingTest extends new Transfer[] { TextTransfer.getInstance() }); ContextMenuHelper.clickContextMenuSync(label, - myUtil.getPluginLocalizedValue("PastePathCommand")); + myUtil.getPluginLocalizedValue( + PASTE_PATH_CONTEXT_MENU_LABEL)); } catch (Exception e) { exceptions[0] = e; } finally { diff --git a/org.eclipse.egit.ui/plugin.properties b/org.eclipse.egit.ui/plugin.properties index a341477a9e..52d3b1ffa2 100644 --- a/org.eclipse.egit.ui/plugin.properties +++ b/org.eclipse.egit.ui/plugin.properties @@ -166,7 +166,6 @@ DeleteBranchCommand = Delete Branch... RenameBranchCommand = Rename Branch... FetchCommand = Fetch... CommitCommand = Commit -PastePathCommand = Paste Repository Path or URI PushCommand = Push... RemoveRepositoryCommand = Remove Repository ImportProjectsCommand = Import Projects... diff --git a/org.eclipse.egit.ui/plugin.xml b/org.eclipse.egit.ui/plugin.xml index 4de2676861..c20f7c7335 100644 --- a/org.eclipse.egit.ui/plugin.xml +++ b/org.eclipse.egit.ui/plugin.xml @@ -1947,6 +1947,17 @@ </activeWhen> </handler> <handler + commandId="org.eclipse.ui.edit.paste"> + <class + class="org.eclipse.egit.ui.internal.repository.tree.command.PasteCommand"> + </class> + <activeWhen> + <with variable="activePart"> + <instanceof value="org.eclipse.egit.ui.internal.repository.RepositoriesView" /> + </with> + </activeWhen> + </handler> + <handler commandId="org.eclipse.ui.edit.rename"> <class class="org.eclipse.egit.ui.internal.repository.tree.command.RenameBranchCommand"> @@ -4942,7 +4953,7 @@ </visibleWhen> </command> <command - commandId="org.eclipse.egit.ui.RepositoriesViewPaste" + commandId="org.eclipse.ui.edit.paste" label="%RepoViewPastePath.label" style="push"> </command> @@ -5933,12 +5944,6 @@ </command> <command categoryId="org.eclipse.egit.ui.commandCategory" - defaultHandler="org.eclipse.egit.ui.internal.repository.tree.command.PasteCommand" - id="org.eclipse.egit.ui.RepositoriesViewPaste" - name="%PastePathCommand"> - </command> - <command - categoryId="org.eclipse.egit.ui.commandCategory" id="org.eclipse.egit.ui.RepositoriesViewRemove" name="%RemoveRepositoryCommand"> </command> @@ -6773,12 +6778,6 @@ sequence="COMMAND+ALT+3"> </key> <key - commandId="org.eclipse.egit.ui.RepositoriesViewPaste" - contextId="org.eclipse.egit.ui.RepositoriesView" - schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" - sequence="M1+V"> - </key> - <key commandId="org.eclipse.egit.ui.RepositoriesViewCopyPath" contextId="org.eclipse.egit.ui.RepositoriesView" schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" |