Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-10-14 07:53:21 +0000
committerEike Stepper2012-10-14 07:53:21 +0000
commit36955e0c72a1fc70a6dad030ce1be225e6cd951a (patch)
treeacc1c28750619d656f277d140f7a98ccefe4df6c /plugins/org.eclipse.emf.cdo.common
parent05f2223c654036170948d73431ebfcd9ea84854b (diff)
downloadcdo-36955e0c72a1fc70a6dad030ce1be225e6cd951a.tar.gz
cdo-36955e0c72a1fc70a6dad030ce1be225e6cd951a.tar.xz
cdo-36955e0c72a1fc70a6dad030ce1be225e6cd951a.zip
[391503] [UI] Render a CDOCommitInfo graph into the history page
https://bugs.eclipse.org/bugs/show_bug.cgi?id=391503
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.common')
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitHistoryImpl.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoImpl.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/DelegatingCommitInfo.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/FailureCommitInfo.java5
5 files changed, 35 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java
index fdf8603d92..ccc3846cac 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java
@@ -42,4 +42,9 @@ public interface CDOCommitInfo extends CDOBranchPoint, CDOCommitData
* @since 4.2
*/
public boolean isInitialCommit();
+
+ /**
+ * @since 4.2
+ */
+ public boolean isCommitDataLoaded();
}
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitHistoryImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitHistoryImpl.java
index b66abbfd4d..61ac8297b2 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitHistoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitHistoryImpl.java
@@ -275,6 +275,11 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo> implements CD
public void handleCommitInfo(CDOCommitInfo commitInfo)
{
+ if (filter(commitInfo))
+ {
+ return;
+ }
+
long timeStamp = commitInfo.getTimeStamp();
synchronized (commitInfos)
{
@@ -315,6 +320,11 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo> implements CD
fireElementAddedEvent(commitInfo);
}
+ protected boolean filter(CDOCommitInfo commitInfo)
+ {
+ return branch != null && branch != commitInfo.getBranch();
+ }
+
protected void setFull()
{
full = true;
@@ -444,6 +454,11 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo> implements CD
return false;
}
+ public boolean isCommitDataLoaded()
+ {
+ return true;
+ }
+
public List<CDOPackageUnit> getNewPackageUnits()
{
return null;
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoImpl.java
index 7cd2979ebe..4c46a0be21 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoImpl.java
@@ -210,6 +210,11 @@ public class CDOCommitInfoImpl extends CDOBranchPointImpl implements CDOCommitIn
"CommitInfo[{0}, {1}, {2}, {3}, {4}, {5}]", getPreviousTimeStamp(), getBranch(), timeStamp, getUserID(), getComment(), data); //$NON-NLS-1$
}
+ public synchronized boolean isCommitDataLoaded()
+ {
+ return commitData != null;
+ }
+
private synchronized void loadCommitDataIfNeeded()
{
if (commitData == null)
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/DelegatingCommitInfo.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/DelegatingCommitInfo.java
index 1f79eaa574..922cc7c5d9 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/DelegatingCommitInfo.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/DelegatingCommitInfo.java
@@ -74,6 +74,11 @@ public abstract class DelegatingCommitInfo implements CDOCommitInfo
return getDelegate().isInitialCommit();
}
+ public boolean isCommitDataLoaded()
+ {
+ return getDelegate().isCommitDataLoaded();
+ }
+
public List<CDOPackageUnit> getNewPackageUnits()
{
return getDelegate().getNewPackageUnits();
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/FailureCommitInfo.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/FailureCommitInfo.java
index b387a5520b..14db5461fb 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/FailureCommitInfo.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/FailureCommitInfo.java
@@ -79,6 +79,11 @@ public class FailureCommitInfo implements CDOCommitInfo
return false;
}
+ public boolean isCommitDataLoaded()
+ {
+ return true;
+ }
+
public List<CDOPackageUnit> getNewPackageUnits()
{
return Collections.emptyList();

Back to the top