Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2020-06-30 05:30:39 +0000
committerEike Stepper2020-06-30 05:30:39 +0000
commit8de74d540f8a3857a52ab131fb98f4d98beebbc3 (patch)
tree8fec0b1980e67129ae3aa0bc2fd17ac67396bdbe
parent2a16327761126ebb9c8000299059410b144cea1e (diff)
downloadcdo-8de74d540f8a3857a52ab131fb98f4d98beebbc3.tar.gz
cdo-8de74d540f8a3857a52ab131fb98f4d98beebbc3.tar.xz
cdo-8de74d540f8a3857a52ab131fb98f4d98beebbc3.zip
[Releng] Factor TransactionalBackgroundAction.configureTransaction()
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/TransactionalBackgroundAction.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/TransactionalBackgroundAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/TransactionalBackgroundAction.java
index 8fff6903c1..83ffc673f7 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/TransactionalBackgroundAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/TransactionalBackgroundAction.java
@@ -11,8 +11,10 @@
package org.eclipse.emf.cdo.internal.ui.actions;
import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
import org.eclipse.emf.cdo.internal.ui.messages.Messages;
+import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.view.CDOView;
@@ -45,11 +47,19 @@ public abstract class TransactionalBackgroundAction extends LongRunningAction
protected CDOTransaction openTransaction(CDOObject object)
{
CDOView view = object.cdoView();
- CDOTransaction transaction = view.getSession().openTransaction(view.getBranch());
- CDOUtil.configureView(transaction);
+ CDOSession session = view.getSession();
+ CDOBranch branch = view.getBranch();
+
+ CDOTransaction transaction = session.openTransaction(branch);
+ configureTransaction(transaction);
return transaction;
}
+ protected void configureTransaction(CDOTransaction transaction)
+ {
+ CDOUtil.configureView(transaction);
+ }
+
@Override
protected final void doRun(IProgressMonitor progressMonitor) throws Exception
{

Back to the top