Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/actions/PostBranchCheckoutUiTask.java')
-rw-r--r--org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/actions/PostBranchCheckoutUiTask.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/actions/PostBranchCheckoutUiTask.java b/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/actions/PostBranchCheckoutUiTask.java
new file mode 100644
index 0000000000..1c0b12faca
--- /dev/null
+++ b/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/actions/PostBranchCheckoutUiTask.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (C) 2019, Max Hohenegger <eclipse@hohenegger.eu>
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.egit.gitflow.ui.internal.actions;
+
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+import org.eclipse.egit.gitflow.GitFlowRepository;
+import org.eclipse.egit.gitflow.op.GitFlowOperation;
+import org.eclipse.egit.ui.internal.branch.BranchOperationUI;
+
+class PostBranchCheckoutUiTask extends JobChangeAdapter {
+
+ private final GitFlowRepository gfRepo;
+ private final String fullBranchName;
+ private final GitFlowOperation operation;
+
+ PostBranchCheckoutUiTask(GitFlowRepository gfRepo,
+ String fullBranchName, GitFlowOperation operation) {
+ this.gfRepo = gfRepo;
+ this.fullBranchName = fullBranchName;
+ this.operation = operation;
+ }
+
+ @Override
+ public void done(IJobChangeEvent jobChangeEvent) {
+ BranchOperationUI.handleSingleRepositoryCheckoutOperationResult(
+ gfRepo.getRepository(),
+ operation.getCheckoutResult(),
+ fullBranchName);
+ }
+}

Back to the top