Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmisinco2014-01-10 20:28:58 +0000
committerRoberto E. Escobar2014-01-13 18:51:42 +0000
commit3c82fe963f22246bf32eb341c71ebff41aebfe92 (patch)
tree8ddeb2bfc3c830b80d36a65002d68dac47764e8f /plugins
parentaebc40830fde4ba135b00945fb01a38c34dcf994 (diff)
downloadorg.eclipse.osee-3c82fe963f22246bf32eb341c71ebff41aebfe92.tar.gz
org.eclipse.osee-3c82fe963f22246bf32eb341c71ebff41aebfe92.tar.xz
org.eclipse.osee-3c82fe963f22246bf32eb341c71ebff41aebfe92.zip
bug[ats_ATS4606]: Branch name truncated too short in change report
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/BaseToHeadHandler.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstOtherHandler.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstParentHandler.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/SpecificTxsHandler.java4
5 files changed, 16 insertions, 4 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java
index 710256fe4d..98e0d2c0fb 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java
@@ -88,6 +88,10 @@ public class Branch extends AbstractOseeType<String> implements WriteableBranch,
return getShortName(this);
}
+ public String getShortName(int length) {
+ return Strings.truncate(getName(), length);
+ }
+
public static String getShortName(IOseeBranch branch) {
return Strings.truncate(branch.getName(), SHORT_NAME_LIMIT);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/BaseToHeadHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/BaseToHeadHandler.java
index afe6ee9099..c1a1b9a63b 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/BaseToHeadHandler.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/BaseToHeadHandler.java
@@ -23,6 +23,8 @@ import org.eclipse.osee.framework.ui.swt.KeyedImage;
public final class BaseToHeadHandler implements IChangeReportUiHandler {
+ private static final int BRANCH_NAME_LEN = 60;
+
@Override
public String getActionName() {
return "Open report showing all changes made the branch";
@@ -37,7 +39,7 @@ public final class BaseToHeadHandler implements IChangeReportUiHandler {
public String getName(TransactionDelta txDelta) {
String branchName;
try {
- branchName = txDelta.getEndTx().getBranch().getShortName();
+ branchName = txDelta.getEndTx().getBranch().getShortName(BRANCH_NAME_LEN);
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex.toString(), ex);
branchName = "Unknown";
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstOtherHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstOtherHandler.java
index fd2a3a286a..88274426d0 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstOtherHandler.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstOtherHandler.java
@@ -22,6 +22,8 @@ import org.eclipse.osee.framework.ui.swt.KeyedImage;
public final class CurrentsAgainstOtherHandler implements IChangeReportUiHandler {
+ private static final int BRANCH_NAME_LEN = 60;
+
@Override
public String getActionName() {
return "Open changes between the branch and the lastest changes from another branch";
@@ -36,7 +38,7 @@ public final class CurrentsAgainstOtherHandler implements IChangeReportUiHandler
public String getName(TransactionDelta txDelta) {
String branchName;
try {
- branchName = txDelta.getStartTx().getBranch().getShortName();
+ branchName = txDelta.getStartTx().getBranch().getShortName(BRANCH_NAME_LEN);
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex.toString(), ex);
branchName = "Unknown";
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstParentHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstParentHandler.java
index 573a3d1b95..a909bf74c6 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstParentHandler.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstParentHandler.java
@@ -22,6 +22,8 @@ import org.eclipse.osee.framework.ui.swt.KeyedImage;
public final class CurrentsAgainstParentHandler implements IChangeReportUiHandler {
+ private static final int BRANCH_NAME_LEN = 60;
+
@Override
public String getActionName() {
return "Open changes between the branch and the lastest changes from its parent branch";
@@ -36,7 +38,7 @@ public final class CurrentsAgainstParentHandler implements IChangeReportUiHandle
public String getName(TransactionDelta txDelta) {
String branchName;
try {
- branchName = txDelta.getStartTx().getBranch().getShortName();
+ branchName = txDelta.getStartTx().getBranch().getShortName(BRANCH_NAME_LEN);
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex.toString(), ex);
branchName = "Unknown";
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/SpecificTxsHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/SpecificTxsHandler.java
index 0a865e5565..b7a4f42d70 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/SpecificTxsHandler.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/SpecificTxsHandler.java
@@ -23,6 +23,8 @@ import org.eclipse.osee.framework.ui.swt.KeyedImage;
public final class SpecificTxsHandler implements IChangeReportUiHandler {
+ private static final int BRANCH_NAME_LEN = 60;
+
@Override
public String getActionName() {
return "Compare two transactions on a branch";
@@ -37,7 +39,7 @@ public final class SpecificTxsHandler implements IChangeReportUiHandler {
public String getName(TransactionDelta txDelta) {
String branchName;
try {
- branchName = txDelta.getEndTx().getBranch().getShortName();
+ branchName = txDelta.getEndTx().getBranch().getShortName(BRANCH_NAME_LEN);
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex.toString(), ex);
branchName = "Unknown";

Back to the top