diff options
author | Ryan D. Brooks | 2015-12-01 21:14:58 +0000 |
---|---|---|
committer | Angel Avila | 2015-12-01 21:14:58 +0000 |
commit | 8f0ac84399d93cf72200ce2a385b16c491023ab9 (patch) | |
tree | af4b7595098cfdc8f5482a108fe46b4697e8e9bf /plugins/org.eclipse.osee.framework.ui.branch.graph | |
parent | 8f751897631cabd6a015edc9c5bf728dd7983aea (diff) | |
download | org.eclipse.osee-8f0ac84399d93cf72200ce2a385b16c491023ab9.tar.gz org.eclipse.osee-8f0ac84399d93cf72200ce2a385b16c491023ab9.tar.xz org.eclipse.osee-8f0ac84399d93cf72200ce2a385b16c491023ab9.zip |
refactor: Remove unnecessary usage of BranchManager.getBranch
Change-Id: Iaea3ed5fb285c932b5ee53fb62793ef4116ecf93
Diffstat (limited to 'plugins/org.eclipse.osee.framework.ui.branch.graph')
2 files changed, 7 insertions, 6 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/figure/FigureFactory.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/figure/FigureFactory.java index 8b606bf98e2..57dfa55c168 100644 --- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/figure/FigureFactory.java +++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/figure/FigureFactory.java @@ -20,6 +20,7 @@ import org.eclipse.draw2d.PolygonDecoration; import org.eclipse.draw2d.PolylineConnection; import org.eclipse.draw2d.PositionConstants; import org.eclipse.jface.resource.JFaceResources; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; import org.eclipse.osee.framework.ui.branch.graph.model.BranchModel; @@ -62,8 +63,8 @@ public class FigureFactory { Color bgcolor = GraphColorConstants.getBranchColor(branchModel); Color fgcolor = GraphColorConstants.FONT_COLOR; - IOseeBranch branch = BranchManager.getBranch(branchModel.getBranch()); - String branchName = branch.getName(); + BranchId branch = branchModel.getBranch(); + String branchName = BranchManager.getBranchName(branch); Image image = GraphImageConstants.getImage(branch); return new BranchFigure(branchName, image, createBranchNoteFigure(branchModel), bgcolor, fgcolor); @@ -77,13 +78,13 @@ public class FigureFactory { public static IFigure createTxNoteFigure(TxModel txModel) { TxData txData = txModel.getTxData(); - IOseeBranch branch = BranchManager.getBranch(txData.getBranch()); + IOseeBranch branch = BranchManager.getBranchToken(txData.getBranch()); String title = String.format("Tx: %s Name: %s", txData.getTxId(), branch.getShortName()); return createNoteFigure(title, branch.getName(), txData.getAuthor(), txData.getTimeStamp(), txData.getComment()); } public static IFigure createBranchNoteFigure(BranchModel branchModel) { - IOseeBranch branch = BranchManager.getBranch(branchModel.getBranch()); + IOseeBranch branch = BranchManager.getBranchToken(branchModel.getBranch()); String title = String.format("Tx: %s Name: %s", branchModel.getFirstTx().getRevision(), branch.getShortName()); TxData txData = branchModel.getFirstTx().getTxData(); return createNoteFigure(title, branch.getName(), txData.getAuthor(), txData.getTimeStamp(), txData.getComment()); diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/parts/GraphEditPart.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/parts/GraphEditPart.java index e49f5ee41eb..206744fec3a 100644 --- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/parts/GraphEditPart.java +++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/parts/GraphEditPart.java @@ -242,8 +242,8 @@ public class GraphEditPart extends AbstractGraphicalEditPart { } private String getConnectionLabel(TxModel source, TxModel target) { - String sourceName = BranchManager.getBranch(source.getParentBranchModel().getBranch()).getShortName(); - String targetName = BranchManager.getBranch(target.getParentBranchModel().getBranch()).getShortName(); + String sourceName = BranchManager.getBranchShortName(source.getParentBranchModel().getBranch()); + String targetName = BranchManager.getBranchShortName(target.getParentBranchModel().getBranch()); return String.format("%s:%s - %s:%s", sourceName, source.getRevision(), targetName, target.getRevision()); } |