Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjphillips2011-01-26 21:35:58 +0000
committerRyan D. Brooks2011-01-26 21:35:58 +0000
commitf7e6f9d0bdcac3abf991aa8b92ac30a803eb19a3 (patch)
tree455fc2235f8d76b3f2a2bde855701d1d8dd11683
parent91ff65db38edfca3f047d01f9c91822e3b8d6e7b (diff)
downloadorg.eclipse.osee-f7e6f9d0bdcac3abf991aa8b92ac30a803eb19a3.tar.gz
org.eclipse.osee-f7e6f9d0bdcac3abf991aa8b92ac30a803eb19a3.tar.xz
org.eclipse.osee-f7e6f9d0bdcac3abf991aa8b92ac30a803eb19a3.zip
bug: Fix selection of IElementExtractor in UpdateArtifactOperation for edit on merge branch
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java6
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordTemplateRenderer.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/ThreeWayWordMergeOperation.java3
3 files changed, 7 insertions, 4 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java
index d9ef374d56d..46aa663d55c 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java
@@ -60,19 +60,21 @@ public class UpdateArtifactOperation extends AbstractOperation {
private final File workingFile;
private final List<Artifact> artifacts;
private final Branch branch;
+ private final boolean threeWayMerge;
- public UpdateArtifactOperation(File workingFile, List<Artifact> artifacts, Branch branch) {
+ public UpdateArtifactOperation(File workingFile, List<Artifact> artifacts, Branch branch, boolean threeWayMerge) {
super("Update Artifact", SkynetGuiPlugin.PLUGIN_ID);
this.workingFile = workingFile;
this.artifacts = artifacts;
this.branch = branch;
+ this.threeWayMerge = threeWayMerge;
}
@Override
protected void doWork(IProgressMonitor monitor) throws Exception {
IElementExtractor elementExtractor;
Document document = extractJaxpDocument();
- if (branch.getBranchType().isMergeBranch()) {
+ if (threeWayMerge) {
elementExtractor = new MergeEditArtifactElementExtractor(document);
} else {
elementExtractor = new WordImageArtifactElementExtractor(document);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordTemplateRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordTemplateRenderer.java
index 9ea00fa29af..5a57557172a 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordTemplateRenderer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordTemplateRenderer.java
@@ -238,6 +238,6 @@ public class WordTemplateRenderer extends WordRenderer implements ITemplateRende
@Override
protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, Branch branch, PresentationType presentationType) throws OseeCoreException {
- return new UpdateArtifactOperation(file, artifacts, branch);
+ return new UpdateArtifactOperation(file, artifacts, branch, false);
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/ThreeWayWordMergeOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/ThreeWayWordMergeOperation.java
index 112ca50731c..b36f3e8896e 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/ThreeWayWordMergeOperation.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/ThreeWayWordMergeOperation.java
@@ -90,7 +90,8 @@ public class ThreeWayWordMergeOperation extends AbstractOperation {
attributeConflict.markStatusToReflectEdit();
IOperation op =
- new UpdateArtifactOperation(mergedFile, Collections.singletonList(mergeArtifact), mergeArtifact.getBranch());
+ new UpdateArtifactOperation(mergedFile, Collections.singletonList(mergeArtifact), mergeArtifact.getBranch(),
+ true);
Operations.executeWork(op, monitor);
monitor.done();

Back to the top