Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2011-03-09 00:09:08 -0500
committerRyan D. Brooks2011-03-09 00:09:08 -0500
commitcc52318fafb495b9ec01c0a105a371e57e753f59 (patch)
treefd10bc6848e93739d05cf438c03eccffe6bdd59d /plugins
parentdfb43944208e9eba550bd80a89c15b989065ca1c (diff)
downloadorg.eclipse.osee-cc52318fafb495b9ec01c0a105a371e57e753f59.tar.gz
org.eclipse.osee-cc52318fafb495b9ec01c0a105a371e57e753f59.tar.xz
org.eclipse.osee-cc52318fafb495b9ec01c0a105a371e57e753f59.zip
feature: Coverage - Add branch name to coverage items tabs
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorCoverageTab.java27
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorImportTab.java2
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorMergeTab.java2
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorWorkProductTab.java2
4 files changed, 33 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorCoverageTab.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorCoverageTab.java
index 959f95ddfb..29873b56ed 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorCoverageTab.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorCoverageTab.java
@@ -11,6 +11,7 @@ package org.eclipse.osee.coverage.editor;
import java.util.Collection;
import java.util.Set;
+import java.util.logging.Level;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.osee.coverage.action.IRefreshable;
@@ -20,6 +21,7 @@ import org.eclipse.osee.coverage.editor.params.CoverageParametersTextFilter;
import org.eclipse.osee.coverage.editor.xcover.XCoverageViewer;
import org.eclipse.osee.coverage.editor.xcover.XCoverageViewer.TableType;
import org.eclipse.osee.coverage.help.ui.CoverageHelpContext;
+import org.eclipse.osee.coverage.internal.Activator;
import org.eclipse.osee.coverage.model.CoverageImport;
import org.eclipse.osee.coverage.model.CoveragePackage;
import org.eclipse.osee.coverage.model.CoveragePackageBase;
@@ -33,6 +35,7 @@ import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.Pair;
import org.eclipse.osee.framework.jdk.core.util.DateUtil;
+import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
@@ -42,6 +45,7 @@ import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.action.CollapseAllAction;
import org.eclipse.osee.framework.ui.skynet.action.ExpandAllAction;
import org.eclipse.osee.framework.ui.swt.ALayout;
+import org.eclipse.osee.framework.ui.swt.FontManager;
import org.eclipse.osee.framework.ui.swt.ImageManager;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -49,6 +53,7 @@ import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.FormPage;
@@ -85,6 +90,8 @@ public class CoverageEditorCoverageTab extends FormPage implements ISaveable, IR
coverageEditor.getToolkit().adapt(mainComp);
mainComp.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
+ createBranchLabel(coverageEditor, mainComp);
+
coverageParameters = new CoverageParameters(coveragePackageBase);
new CoverageParametersComposite(mainComp, managedForm, coverageEditor, coverageParameters,
new SelectionAdapter() {
@@ -120,6 +127,26 @@ public class CoverageEditorCoverageTab extends FormPage implements ISaveable, IR
}
+ public static void createBranchLabel(CoverageEditor coverageEditor, Composite mainComp) {
+ Composite branchComp = new Composite(mainComp, SWT.NONE);
+ coverageEditor.getToolkit().adapt(branchComp);
+ GridData gd = new GridData(SWT.NONE, SWT.NONE, false, false);
+ gd.horizontalSpan = 2;
+ branchComp.setLayoutData(gd);
+ branchComp.setLayout(ALayout.getZeroMarginLayout(2, false));
+ Label label = new Label(branchComp, SWT.NONE);
+ label.setText("Branch: ");
+ label.setFont(FontManager.getDefaultLabelFont());
+ coverageEditor.getToolkit().adapt(label, false, false);
+ try {
+ label = new Label(branchComp, SWT.NONE);
+ label.setText(Strings.truncate(coverageEditor.getBranch().getName(), 200, true));
+ coverageEditor.getToolkit().adapt(label, false, false);
+ } catch (OseeCoreException ex) {
+ OseeLog.log(Activator.class, Level.SEVERE, ex);
+ }
+ }
+
private void handleSearchButtonPressed() {
if (parametersFilter == null) {
parametersFilter = new CoverageParametersTextFilter(xCoverageViewer.getXViewer());
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorImportTab.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorImportTab.java
index 3d5a693d12..dae2ae78d8 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorImportTab.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorImportTab.java
@@ -101,6 +101,8 @@ public class CoverageEditorImportTab extends FormPage {
scrolledForm.getBody().setLayout(new GridLayout(1, false));
scrolledForm.getBody().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ CoverageEditorCoverageTab.createBranchLabel(coverageEditor, scrolledForm.getBody());
+
managedForm.getMessageManager().setAutoUpdate(false);
combo = new XComboViewer("Select Import Blam", SWT.READ_ONLY);
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorMergeTab.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorMergeTab.java
index 8b188b1bc7..d2cf43d6b2 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorMergeTab.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorMergeTab.java
@@ -119,6 +119,8 @@ public class CoverageEditorMergeTab extends FormPage implements ISaveable {
coverageEditor.getToolkit().adapt(mainComp);
mainComp.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
+ CoverageEditorCoverageTab.createBranchLabel(coverageEditor, mainComp);
+
coverageParameters = new CoverageParameters(coveragePackage);
coverageParametersComposite =
new CoverageParametersComposite(mainComp, managedForm, coverageEditor, coverageParameters,
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorWorkProductTab.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorWorkProductTab.java
index 43d1d95d23..849118d509 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorWorkProductTab.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorWorkProductTab.java
@@ -84,6 +84,8 @@ public class CoverageEditorWorkProductTab extends FormPage implements ISaveable
coverageEditor.getToolkit().adapt(mainComp);
mainComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ CoverageEditorCoverageTab.createBranchLabel(coverageEditor, mainComp);
+
createActionListViewer(mainComp);
addDoubleClickSupport();
addDropSupportToListViewer();

Back to the top