Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2018-09-18 03:49:03 -0400
committerThomas Wolf2018-09-18 03:49:03 -0400
commit3ffbeb69a533de015e5423b22e9430853c7cbea9 (patch)
tree4c72542be0a6646ceaad4d677ae1a86970e80295
parent32bbd140373f306bcb3c659f34f407ef9f437ce4 (diff)
downloadegit-3ffbeb69a533de015e5423b22e9430853c7cbea9.tar.gz
egit-3ffbeb69a533de015e5423b22e9430853c7cbea9.tar.xz
egit-3ffbeb69a533de015e5423b22e9430853c7cbea9.zip
Use a separate job family for FileDiffContentProvider
Using the HISTORY_DIFF family was wrong; it's reserved for generating the unified diff. That family is canceled in GitHistoryPage when new diff are to be generated, which may inadvertently also cancel the file diff generation. Give the job in the asynchronous FileDiffContentProvider its own job family. It needs a family so that UI tests can join on it. Bug: 539099 Change-Id: I6f168cbd2544d2e08617536271a71ed6ebd027fb Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java6
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/JobFamilies.java5
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/FileDiffContentProvider.java2
3 files changed, 9 insertions, 4 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 314f6c311..5a4c294cc 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
@@ -267,12 +267,12 @@ public class HistoryViewTest extends LocalRepositoryTestCase {
}
private SWTBotTable getFileDiffTable() throws Exception {
- Job.getJobManager().join(JobFamilies.HISTORY_DIFF, null);
+ Job.getJobManager().join(JobFamilies.HISTORY_FILE_DIFF, null);
// Wait a little bit to give the UiJob triggered a chance to run
Thread.sleep(100);
- // Then join the UI update
PlatformUI.getWorkbench().getDisplay().syncExec(() -> {
- /* empty */ });
+ // Join the UI update
+ });
return getHistoryViewBot().table(1);
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/JobFamilies.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/JobFamilies.java
index 5359e5591..2fe4a283a 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/JobFamilies.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/JobFamilies.java
@@ -58,6 +58,11 @@ public class JobFamilies {
public final static Object HISTORY_DIFF = new JobFamily();
/**
+ * History file diff generation jobs
+ */
+ public final static Object HISTORY_FILE_DIFF = new JobFamily();
+
+ /**
* Commit job
*/
public final static Object COMMIT = new JobFamily(UIIcons.COMMIT);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/FileDiffContentProvider.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/FileDiffContentProvider.java
index e00c7554b..c05df4fdd 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/FileDiffContentProvider.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/FileDiffContentProvider.java
@@ -174,7 +174,7 @@ public class FileDiffContentProvider implements IStructuredContentProvider {
@Override
public boolean belongsTo(Object family) {
- return family == JobFamilies.HISTORY_DIFF
+ return family == JobFamilies.HISTORY_FILE_DIFF
|| super.belongsTo(family);
}
}

Back to the top