From 48bbbd3e6b222fc3719d6e23abea1adaf4a9f724 Mon Sep 17 00:00:00 2001 From: jmisinco Date: Thu, 17 Nov 2011 15:08:49 -0700 Subject: refactor: Replace occurances of Branch with IOseeBranch --- .../eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java | 12 ++++++------ .../osee/ote/ui/define/viewers/XViewerDataManager.java | 8 ++++---- .../eclipse/osee/ote/ui/define/viewers/data/BranchItem.java | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse') diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java index 2239ccde48f..78191f95a0c 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java @@ -19,8 +19,8 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.exception.OseeArgumentException; -import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.logging.OseeLog; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.ote.define.artifacts.TestRunOperator; @@ -80,8 +80,8 @@ public class CommitTestRunJob extends Job { } private void commitSelectedArtifacts(IProgressMonitor monitor, String comment, Object[] items) throws Exception { - Map> commitMap = getArtifactsByBranch(items); - for (Branch branch : commitMap.keySet()) { + Map> commitMap = getArtifactsByBranch(items); + for (IOseeBranch branch : commitMap.keySet()) { monitor.setTaskName(String.format("Committing Artifacts into Branch: [%s]", branch.getName())); List artList = commitMap.get(branch); ImportOutfileOperation.commitTestRunTx(monitor, comment, branch, artList.toArray(new Artifact[artList.size()])); @@ -101,11 +101,11 @@ public class CommitTestRunJob extends Job { return committedList.toArray(new Artifact[committedList.size()]); } - private Map> getArtifactsByBranch(Object[] items) { - Map> branchMap = new HashMap>(); + private Map> getArtifactsByBranch(Object[] items) { + Map> branchMap = new HashMap>(); for (Object object : items) { Artifact testRun = (Artifact) object; - Branch branch = testRun.getBranch(); + IOseeBranch branch = testRun.getBranch(); List artList = branchMap.get(branch); if (artList == null) { artList = new ArrayList(); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java index bfef27a3d2d..313062c9d20 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java @@ -19,9 +19,9 @@ import java.util.List; import java.util.Map; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.nebula.widgets.xviewer.XViewer; +import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.exception.AttributeDoesNotExist; import org.eclipse.osee.framework.core.exception.OseeCoreException; -import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.ui.skynet.artifact.massEditor.MassXViewerFactory; import org.eclipse.osee.framework.ui.swt.Displays; @@ -41,7 +41,7 @@ public class XViewerDataManager { private final XViewer xViewer; private final List commitableItems; private final List uncommitableItems; - private final Map branchMap; + private final Map branchMap; private final List backingData; private final Collection listeners; private boolean isInitialized; @@ -51,7 +51,7 @@ public class XViewerDataManager { this.backingData = new ArrayList(); this.isInitialized = false; this.xViewer = xViewer; - this.branchMap = new HashMap(); + this.branchMap = new HashMap(); this.commitableItems = new ArrayList(); this.uncommitableItems = new ArrayList(); this.listeners = Collections.synchronizedSet(new HashSet()); @@ -129,7 +129,7 @@ public class XViewerDataManager { } private DataItem getBranchItem(Artifact artifact) { - Branch branch = artifact.getBranch(); + IOseeBranch branch = artifact.getBranch(); DataItem toReturn = branchMap.get(branch); if (toReturn == null) { toReturn = new BranchItem(branch, null); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java index 162635fde72..02cf9845b00 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java @@ -12,7 +12,7 @@ package org.eclipse.osee.ote.ui.define.viewers.data; import java.util.ArrayList; import java.util.List; -import org.eclipse.osee.framework.core.model.Branch; +import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.ui.swt.ImageManager; import org.eclipse.osee.ote.ui.define.OteDefineImage; import org.eclipse.swt.graphics.Image; @@ -22,10 +22,10 @@ import org.eclipse.swt.graphics.Image; */ public class BranchItem extends DataItem implements IXViewerItem { - private final Branch branch; + private final IOseeBranch branch; private static boolean isScriptItemGrouped = true; - public BranchItem(Branch branch, DataItem parentItem) { + public BranchItem(IOseeBranch branch, DataItem parentItem) { super(parentItem); this.branch = branch; } -- cgit v1.2.3