Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2015-12-01 21:14:58 +0000
committerAngel Avila2015-12-01 21:14:58 +0000
commit8f0ac84399d93cf72200ce2a385b16c491023ab9 (patch)
treeaf4b7595098cfdc8f5482a108fe46b4697e8e9bf /plugins/org.eclipse.osee.framework.ui.branch.graph
parent8f751897631cabd6a015edc9c5bf728dd7983aea (diff)
downloadorg.eclipse.osee-8f0ac84399d93cf72200ce2a385b16c491023ab9.tar.gz
org.eclipse.osee-8f0ac84399d93cf72200ce2a385b16c491023ab9.tar.xz
org.eclipse.osee-8f0ac84399d93cf72200ce2a385b16c491023ab9.zip
refactor: Remove unnecessary usage of BranchManager.getBranch
Diffstat (limited to 'plugins/org.eclipse.osee.framework.ui.branch.graph')
-rw-r--r--plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/figure/FigureFactory.java9
-rw-r--r--plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/parts/GraphEditPart.java4
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());
}

Back to the top