Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Kinzler2010-08-18 15:48:11 +0000
committerMathias Kinzler2010-08-18 15:48:11 +0000
commit44dfabcd07402170fe72242354cc40da71e557f4 (patch)
treea216f2adedd6d01c898c3e82ffb5bed07e8d6844 /org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history
parent633df748b847637b40e482deba03d32b4062a108 (diff)
downloadegit-44dfabcd07402170fe72242354cc40da71e557f4.tar.gz
egit-44dfabcd07402170fe72242354cc40da71e557f4.tar.xz
egit-44dfabcd07402170fe72242354cc40da71e557f4.zip
History View: build menu programmatically
It turned out that using the "global" (workbench) selection for building the context menu in the history view is not feasible, as the GenericHistoryView does not handle registration of the selection providers properly (see bug 322751). Thus we build the context menu programmatically again (using commands instead of actions) and remove the menu contributions from the plugin.xml. The changes in the test coding were needed to fix issues with failing tests (some of them, but not all being related to the changes in this commit). Some UI tests are still failing due to bug 322868. Bug: 321516 Bug: 322751 Change-Id: I1375afc763f15b0e5a1b932bbb1ae24694ea6428 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java
index ef526cce6..f9ce7a5d2 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java
@@ -36,6 +36,7 @@ import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarToggleButton;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
@@ -259,9 +260,10 @@ public class HistoryViewTest extends LocalRepositoryTestCase {
Repository repo = lookupRepository(repoFile);
assertNull(repo.resolve(Constants.R_HEADS + "NewBranch"));
SWTBotTable table = getHistoryViewTable(PROJ1);
- table.getTableItem(0).select();
- ContextMenuHelper.clickContextMenu(table, util
- .getPluginLocalizedValue("CreateBranch.label"));
+ SWTBotTableItem item = table.getTableItem(0);
+ item.select();
+ ContextMenuHelper.clickContextMenu(table,
+ UIText.GitHistoryPage_CreateBranchMenuLabel);
SWTBotShell dialog = bot
.shell(UIText.CreateBranchWizard_NewBranchTitle);
dialog.bot().textWithId("BranchName").setText("NewBranch");
@@ -288,8 +290,8 @@ public class HistoryViewTest extends LocalRepositoryTestCase {
}
});
- ContextMenuHelper.clickContextMenu(table, util
- .getPluginLocalizedValue("CreateTag.label"));
+ ContextMenuHelper.clickContextMenu(table,
+ UIText.GitHistoryPage_CreateTagMenuLabel);
SWTBotShell dialog = bot.shell(NLS.bind(
UIText.CreateTagDialog_CreateTagOnCommitTitle, commit[0]
.getId().name()));
@@ -320,8 +322,8 @@ public class HistoryViewTest extends LocalRepositoryTestCase {
}
});
- ContextMenuHelper.clickContextMenu(table, util
- .getPluginLocalizedValue("Checkout.label"));
+ ContextMenuHelper.clickContextMenu(table,
+ UIText.GitHistoryPage_CheckoutMenuLabel);
waitInUI();
assertEquals(commit[0].getId().name(), repo.getBranch());

Back to the top