Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2017-11-23 19:58:40 -0500
committerMatthias Sohn2017-11-23 19:58:40 -0500
commitae2f1ca386404ce7e21dd41d4c35da476efdcf11 (patch)
treea3467af1145cfad15bb9765c587739da3736622a /org.eclipse.egit.ui.test/src/org
parenteea360f47ead2420782abcc2739d500607455fde (diff)
parent655e3db2849133b1f57e3cada3aff003726737c3 (diff)
downloadegit-ae2f1ca386404ce7e21dd41d4c35da476efdcf11.tar.gz
egit-ae2f1ca386404ce7e21dd41d4c35da476efdcf11.tar.xz
egit-ae2f1ca386404ce7e21dd41d4c35da476efdcf11.zip
Merge branch 'stable-4.9'
* stable-4.9: Make commit viewer diff list scrollable Prevent NPEs on bare repositories [test stability] CompareActionsTest assumes resource model Prepare 4.9.1-SNAPSHOT builds EGit v4.9.0.201710071750-r Change-Id: Id8c75458d5edf1d5b5582e9d12481f948f9c080b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui.test/src/org')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java
index f863e9b2f..df76d02b5 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java
@@ -24,6 +24,7 @@ import java.io.File;
import java.util.concurrent.TimeUnit;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.mapping.ModelProvider;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.egit.core.op.ResetOperation;
import org.eclipse.egit.core.op.TagOperation;
@@ -55,6 +56,9 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.eclipse.team.internal.ui.TeamUIPlugin;
+import org.eclipse.team.ui.TeamUI;
+import org.eclipse.team.ui.mapping.ITeamContentProviderDescriptor;
+import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
import org.eclipse.team.ui.synchronize.ISynchronizeManager;
import org.eclipse.team.ui.synchronize.ISynchronizeView;
import org.junit.Before;
@@ -77,6 +81,7 @@ public class CompareActionsTest extends LocalRepositoryTestCase {
Repository repo = lookupRepository(repositoryFile);
disablePerspectiveSwitchPrompt();
+ setEnabledModelProvider(ModelProvider.RESOURCE_MODEL_PROVIDER_ID);
TagBuilder tag = new TagBuilder();
tag.setTag("SomeTag");
@@ -97,6 +102,15 @@ public class CompareActionsTest extends LocalRepositoryTestCase {
repo));
}
+ private static void setEnabledModelProvider(String modelProviderId) {
+ ITeamContentProviderManager contentProviderManager = TeamUI
+ .getTeamContentProviderManager();
+ ITeamContentProviderDescriptor descriptor = contentProviderManager
+ .getDescriptor(modelProviderId);
+ contentProviderManager.setEnabledDescriptors(
+ new ITeamContentProviderDescriptor[] { descriptor });
+ }
+
@SuppressWarnings("restriction")
private static void disablePerspectiveSwitchPrompt() {
// disable perspective synchronize selection

Back to the top