Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/patch/PatchOperationUI.java')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/patch/PatchOperationUI.java23
1 files changed, 18 insertions, 5 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/patch/PatchOperationUI.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/patch/PatchOperationUI.java
index cda897b713..8f9c999984 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/patch/PatchOperationUI.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/patch/PatchOperationUI.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (C) 2011, Tomasz Zarna <Tomasz.Zarna@pl.ibm.com>
+ * Copyright (C) 2011-2012, Tomasz Zarna <Tomasz.Zarna@pl.ibm.com>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,9 @@
*******************************************************************************/
package org.eclipse.egit.ui.internal.patch;
+import java.util.Collection;
+
+import org.eclipse.core.resources.IResource;
import org.eclipse.egit.core.op.CreatePatchOperation;
import org.eclipse.egit.ui.UIText;
import org.eclipse.egit.ui.internal.history.GitCreatePatchWizard;
@@ -30,6 +33,8 @@ public class PatchOperationUI {
private RevCommit commit;
+ private Collection<? extends IResource> resources;
+
private PatchOperationUI(IWorkbenchPart part, Repository repo) {
this.part = part;
this.repository = repo;
@@ -41,6 +46,12 @@ public class PatchOperationUI {
this.commit = commit;
}
+ private PatchOperationUI(IWorkbenchPart part, Repository repo,
+ Collection<? extends IResource> resources) {
+ this(part, repo);
+ this.resources = resources;
+ }
+
/**
* Create an operation for creating a patch for a specific commit.
*
@@ -65,11 +76,13 @@ public class PatchOperationUI {
* the part
* @param repo
* the repository
+ * @param resources
+ * collection of {@link IResource}s
* @return the {@link PatchOperationUI}
*/
public static PatchOperationUI createPatch(IWorkbenchPart part,
- Repository repo) {
- return new PatchOperationUI(null, repo);
+ Repository repo, Collection<? extends IResource> resources) {
+ return new PatchOperationUI(null, repo, resources);
}
/**
@@ -77,7 +90,7 @@ public class PatchOperationUI {
*/
public void start() {
if (commit != null) {
- GitCreatePatchWizard.run(getShell(), commit, repository);
+ GitCreatePatchWizard.run(getShell(), commit, repository, null);
return;
} else
@@ -87,7 +100,7 @@ public class PatchOperationUI {
UIText.GitCreatePatchAction_workingTreeClean);
return;
}
- GitCreatePatchWizard.run(getShell(), null, repository);
+ GitCreatePatchWizard.run(getShell(), null, repository, resources);
}
private boolean isWorkingTreeClean() {

Back to the top