Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.framework.ui.skynet')
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassXViewerFactory.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/BranchTransactionPage.java20
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/BranchTransactionXViewerFactory.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportTable.java31
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/HtmlExportTable.java1
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchXViewer.java10
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchXViewerFactory.java7
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/PolicyTableXViewerFactory.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java19
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryXViewer.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryXViewerFactory.java11
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xchange/ChangeXViewerFactory.java6
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXViewer.java11
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXViewerFactory.java7
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java21
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/IOseeTreeReportProvider.java21
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/OseeXViewerTreeReport.java25
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/OseeTreeReportAdapter.java36
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetXViewerFactory.java12
20 files changed, 207 insertions, 45 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF
index 89060f2e641..f5986809ab2 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF
@@ -263,6 +263,7 @@ Export-Package: org.eclipse.osee.framework.ui.skynet,
org.eclipse.osee.framework.ui.skynet.widgets.xchange,
org.eclipse.osee.framework.ui.skynet.widgets.xmerge,
org.eclipse.osee.framework.ui.skynet.widgets.xnavigate,
+ org.eclipse.osee.framework.ui.skynet.widgets.xviewer,
org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet,
org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.column
Require-Bundle: org.eclipse.ui.workbench
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassXViewerFactory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassXViewerFactory.java
index 01d53eafa1d..3ab01e19625 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassXViewerFactory.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassXViewerFactory.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.artifact.massEditor;
import java.util.Collection;
import org.eclipse.nebula.widgets.xviewer.core.model.CustomizeData;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.OseeTreeReportAdapter;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.SkynetXViewerFactory;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.column.ArtifactNameColumn;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.column.ArtifactTokenColumn;
@@ -34,7 +35,7 @@ public class MassXViewerFactory extends SkynetXViewerFactory {
private static ArtifactNameColumn nameCol = new ArtifactNameColumn(true, true);
public MassXViewerFactory(Collection<? extends Artifact> artifacts) {
- super(NAMESPACE);
+ super(NAMESPACE, new OseeTreeReportAdapter("Table Report - Mass Editor"));
registerColumns(nameCol);
registerColumns(ArtifactTypeColumn.getInstance());
registerColumns(new GuidColumn(true));
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/BranchTransactionPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/BranchTransactionPage.java
index b4c978641b6..3408b9e65a7 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/BranchTransactionPage.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/BranchTransactionPage.java
@@ -51,6 +51,7 @@ import org.eclipse.osee.framework.ui.skynet.util.DbConnectionExceptionComposite;
import org.eclipse.osee.framework.ui.skynet.widgets.xBranch.XBranchContentProvider;
import org.eclipse.osee.framework.ui.skynet.widgets.xBranch.XBranchWidget;
import org.eclipse.osee.framework.ui.skynet.widgets.xBranch.XBranchWidget.IBranchWidgetMenuListener;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.IOseeTreeReportProvider;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.Widgets;
import org.eclipse.swt.layout.GridData;
@@ -66,7 +67,7 @@ import org.eclipse.ui.progress.UIJob;
/**
* @author Donald G. Dunne
*/
-public class BranchTransactionPage extends FormPage implements IBranchWidgetMenuListener, ITransactionEventListener, ITransactionRecordSelectionProvider {
+public class BranchTransactionPage extends FormPage implements IBranchWidgetMenuListener, ITransactionEventListener, ITransactionRecordSelectionProvider, IOseeTreeReportProvider {
private XBranchWidget xBranchWidget;
private final BranchId branch;
@@ -106,7 +107,7 @@ public class BranchTransactionPage extends FormPage implements IBranchWidgetMenu
if (DbConnectionExceptionComposite.dbConnectionIsOk(parent)) {
- xBranchWidget = new XBranchWidget(new BranchTransactionXViewerFactory(), this);
+ xBranchWidget = new XBranchWidget(new BranchTransactionXViewerFactory(this), this);
xBranchWidget.setDisplayLabel(false);
xBranchWidget.createWidgets(parent, 1);
xBranchWidget.adaptControls(toolkit);
@@ -270,4 +271,19 @@ public class BranchTransactionPage extends FormPage implements IBranchWidgetMenu
getSite().setSelectionProvider(xBranchWidget.getXViewer());
}
+ @Override
+ public String getEditorTitle() {
+ try {
+ return String.format("Branch Transactions - %s", branch);
+ } catch (Exception ex) {
+ // do nothing
+ }
+ return "Table Report - Branch Transactions";
+ }
+
+ @Override
+ public String getReportTitle() {
+ return getEditorTitle();
+ }
+
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/BranchTransactionXViewerFactory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/BranchTransactionXViewerFactory.java
index d908cef6ce7..726d10f79c9 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/BranchTransactionXViewerFactory.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/BranchTransactionXViewerFactory.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.change.view;
import org.eclipse.nebula.widgets.xviewer.core.model.CustomizeData;
import org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn;
import org.eclipse.osee.framework.ui.skynet.widgets.xBranch.BranchXViewerFactory;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.IOseeTreeReportProvider;
/**
* @author Donald G. Dunne
@@ -21,7 +22,8 @@ public class BranchTransactionXViewerFactory extends BranchXViewerFactory {
public final static String NAMESPACE = "osee.skynet.gui.BranchTransactionXViewer";
- public BranchTransactionXViewerFactory() {
+ public BranchTransactionXViewerFactory(IOseeTreeReportProvider reportProvider) {
+ super(reportProvider);
setNamespace(NAMESPACE);
this.clearColumnRegistration();
registerColumns(transaction, timeStamp, author, comment);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportTable.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportTable.java
index ee5dc09d74e..09a0c983842 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportTable.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportTable.java
@@ -15,7 +15,10 @@ import java.util.Arrays;
import java.util.Collection;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.ui.skynet.change.ChangeUiData;
import org.eclipse.osee.framework.ui.skynet.util.DbConnectionExceptionComposite;
import org.eclipse.osee.framework.ui.skynet.util.SkynetDragAndDrop;
@@ -23,6 +26,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.xchange.ChangeXViewer;
import org.eclipse.osee.framework.ui.skynet.widgets.xchange.ChangeXViewerFactory;
import org.eclipse.osee.framework.ui.skynet.widgets.xchange.XChangeContentProvider;
import org.eclipse.osee.framework.ui.skynet.widgets.xchange.XChangeLabelProvider;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.IOseeTreeReportProvider;
import org.eclipse.osee.framework.ui.swt.ALayout;
import org.eclipse.osee.framework.ui.swt.Widgets;
import org.eclipse.swt.SWT;
@@ -37,7 +41,7 @@ import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
-public class ChangeReportTable implements EditorSection.IWidget {
+public class ChangeReportTable implements EditorSection.IWidget, IOseeTreeReportProvider {
private ChangeXViewer xChangeViewer;
private final ChangeUiData changeData;
@@ -73,7 +77,7 @@ public class ChangeReportTable implements EditorSection.IWidget {
toolkit.paintBordersFor(composite);
int viewerStyle = SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION;
- xChangeViewer = new ChangeXViewer(composite, viewerStyle, new ChangeXViewerFactory());
+ xChangeViewer = new ChangeXViewer(composite, viewerStyle, new ChangeXViewerFactory(this));
xChangeViewer.setContentProvider(new XChangeContentProvider());
xChangeViewer.setLabelProvider(new XChangeLabelProvider(xChangeViewer));
@@ -152,4 +156,27 @@ public class ChangeReportTable implements EditorSection.IWidget {
}
}
+ @Override
+ public String getEditorTitle() {
+ try {
+ if (changeData.getAssociatedArtifact() != null) {
+ return String.format("Table Report - Change Report - %s", changeData.getAssociatedArtifact());
+ } else if (!changeData.getChanges().isEmpty()) {
+ BranchId branchId = changeData.getChanges().iterator().next().getBranch();
+ if (branchId != null) {
+ Branch branch = BranchManager.getBranch(branchId);
+ return String.format("Table Report - Change Report - %s", branch.getName());
+ }
+ }
+ } catch (Exception ex) {
+ // do nothing
+ }
+ return "Table Report - Change Report";
+ }
+
+ @Override
+ public String getReportTitle() {
+ return getEditorTitle();
+ }
+
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/HtmlExportTable.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/HtmlExportTable.java
index 690edd64904..ee693de4041 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/HtmlExportTable.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/HtmlExportTable.java
@@ -181,6 +181,7 @@ public class HtmlExportTable {
if (writer == null) {
writer = new ExcelXmlWriter(file);
writer.startSheet(title, cells.size());
+ writer.writeRow(title);
}
for (String cell : cells) {
writer.writeCell(cell);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchXViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchXViewer.java
index 3d78012dab1..741c2c7ec77 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchXViewer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchXViewer.java
@@ -45,10 +45,6 @@ public class BranchXViewer extends XViewer {
this.xBranchViewer = xBranchViewer;
}
- public BranchXViewer(Composite parent, int style, XBranchWidget xBranchViewer, boolean filterRealTime, boolean searchRealTime) {
- this(parent, style, new BranchXViewerFactory(), xBranchViewer, filterRealTime, searchRealTime);
- }
-
@Override
public void handleDoubleClick() {
ArrayList<IOseeBranch> branches = xBranchViewer.getSelectedBranches();
@@ -103,9 +99,6 @@ public class BranchXViewer extends XViewer {
}
}
- /**
- * Release resources
- */
@Override
public void dispose() {
if (getLabelProvider() != null) {
@@ -113,9 +106,6 @@ public class BranchXViewer extends XViewer {
}
}
- /**
- * @return the xHistoryViewer
- */
public XBranchWidget getXBranchViewer() {
return xBranchViewer;
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchXViewerFactory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchXViewerFactory.java
index cd707c082a4..638e147611f 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchXViewerFactory.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchXViewerFactory.java
@@ -12,9 +12,10 @@ package org.eclipse.osee.framework.ui.skynet.widgets.xBranch;
import org.eclipse.nebula.widgets.xviewer.XViewer;
import org.eclipse.nebula.widgets.xviewer.XViewerSorter;
-import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
import org.eclipse.nebula.widgets.xviewer.core.model.SortDataType;
+import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
import org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.IOseeTreeReportProvider;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.SkynetXViewerFactory;
/**
@@ -49,8 +50,8 @@ public class BranchXViewerFactory extends SkynetXViewerFactory {
public final static String NAMESPACE = "osee.skynet.gui.BranchXViewer";
- public BranchXViewerFactory() {
- super(NAMESPACE);
+ public BranchXViewerFactory(IOseeTreeReportProvider reportProvider) {
+ super(NAMESPACE, reportProvider);
registerColumns(branchName, branchType, branchState, timeStamp, author, comment, associatedArtifact, parentBranch,
branchUuid, branchUuid, archivedState, inheritAccessControl);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/PolicyTableXViewerFactory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/PolicyTableXViewerFactory.java
index 2021754e988..e5556dba8d5 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/PolicyTableXViewerFactory.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/PolicyTableXViewerFactory.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.ui.skynet.widgets.xBranch;
import org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn;
import org.eclipse.osee.framework.ui.skynet.access.PolicyTableColumns;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.OseeTreeReportAdapter;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.SkynetXViewerFactory;
/**
@@ -21,7 +22,7 @@ public class PolicyTableXViewerFactory extends SkynetXViewerFactory {
public static final String namespace = "osee.skynet.gui.branchAccessViewer";
public PolicyTableXViewerFactory() {
- super(namespace);
+ super(namespace, new OseeTreeReportAdapter("Table Report - Policy View"));
PolicyTableColumns[] columns = PolicyTableColumns.values();
XViewerColumn[] xColumns = new XViewerColumn[columns.length];
for (int i = 0; i < columns.length; i++) {
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java
index 431da23b21a..b35e200dc04 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java
@@ -37,6 +37,7 @@ import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
import org.eclipse.osee.framework.ui.skynet.change.BranchTransactionUiData;
import org.eclipse.osee.framework.ui.skynet.internal.Activator;
import org.eclipse.osee.framework.ui.skynet.widgets.GenericXWidget;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.IOseeTreeReportProvider;
import org.eclipse.osee.framework.ui.swt.ALayout;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.FontManager;
@@ -58,7 +59,7 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
* @author Karol M. Wilk
* @author Jeff C. Phillips
*/
-public class XBranchWidget extends GenericXWidget {
+public class XBranchWidget extends GenericXWidget implements IOseeTreeReportProvider {
private BranchXViewer branchXViewer;
public final static String normalColor = "#EEEEEE";
private static final String LOADING = "Loading ...";
@@ -86,7 +87,7 @@ public class XBranchWidget extends GenericXWidget {
this.selectedBranch = selectedBranch;
this.menuListener = menuListener;
branchSelectedListeners = new CopyOnWriteArrayList<>();
- branchXViewerFactory = new BranchXViewerFactory();
+ branchXViewerFactory = new BranchXViewerFactory(this);
}
public XBranchWidget(BranchXViewerFactory branchXViewerFactory, IBranchWidgetMenuListener menuListener) {
@@ -364,4 +365,18 @@ public class XBranchWidget extends GenericXWidget {
}
+ @Override
+ public String getEditorTitle() {
+ if (selectedBranch != null) {
+ Branch branch = BranchManager.getBranch(selectedBranch);
+ return String.format("Table Report - Branch View %s", branch.getName());
+ }
+ return "Table Report - Branch View";
+ }
+
+ @Override
+ public String getReportTitle() {
+ return getEditorTitle();
+ }
+
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryXViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryXViewer.java
index bb6a72c1393..0e814924e92 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryXViewer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryXViewer.java
@@ -21,6 +21,7 @@ import org.eclipse.nebula.widgets.xviewer.core.model.CustomizeData;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.ui.skynet.render.PresentationType;
import org.eclipse.osee.framework.ui.skynet.render.RendererManager;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.OseeTreeReportAdapter;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.TreeItem;
@@ -31,7 +32,7 @@ public class HistoryXViewer extends XViewer {
private final XHistoryWidget xHistoryViewer;
public HistoryXViewer(Composite parent, int style, XHistoryWidget xRoleViewer) {
- super(parent, style, new HistoryXViewerFactory());
+ super(parent, style, new HistoryXViewerFactory(new OseeTreeReportAdapter("Table Report - History View")));
this.xHistoryViewer = xRoleViewer;
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryXViewerFactory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryXViewerFactory.java
index 941076f4af0..cd9b2e898d7 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryXViewerFactory.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryXViewerFactory.java
@@ -12,10 +12,11 @@ package org.eclipse.osee.framework.ui.skynet.widgets.xHistory;
import org.eclipse.nebula.widgets.xviewer.XViewer;
import org.eclipse.nebula.widgets.xviewer.XViewerSorter;
-import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
import org.eclipse.nebula.widgets.xviewer.core.model.CustomizeData;
import org.eclipse.nebula.widgets.xviewer.core.model.SortDataType;
+import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
import org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.IOseeTreeReportProvider;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.SkynetXViewerFactory;
/**
@@ -24,8 +25,8 @@ import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.SkynetXViewer
public class HistoryXViewerFactory extends SkynetXViewerFactory {
public final static XViewerColumn transaction = new XViewerColumn("framework.history.transaction", "Transaction", 90,
XViewerAlign.Left, true, SortDataType.Integer, false, null);
- public final static XViewerColumn gamma = new XViewerColumn("framework.history.gamma", "Gamma", 60, XViewerAlign.Left,
- false, SortDataType.Integer, false, null);
+ public final static XViewerColumn gamma = new XViewerColumn("framework.history.gamma", "Gamma", 60,
+ XViewerAlign.Left, false, SortDataType.Integer, false, null);
public final static XViewerColumn itemType = new XViewerColumn("framework.history.itemType", "Item Type", 150,
XViewerAlign.Left, true, SortDataType.String, false, null);
public final static XViewerColumn itemChange = new XViewerColumn("framework.history.itemChange", "Item Kind", 100,
@@ -47,8 +48,8 @@ public class HistoryXViewerFactory extends SkynetXViewerFactory {
public final static String NAMESPACE = "osee.skynet.gui.HisotryXViewer";
- public HistoryXViewerFactory() {
- super(NAMESPACE);
+ public HistoryXViewerFactory(IOseeTreeReportProvider reportProvider) {
+ super(NAMESPACE, reportProvider);
registerColumns(transaction, gamma, itemType, itemChange, modType, itemId, was, is, timeStamp, author, comment);
registerAllAttributeColumns();
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xchange/ChangeXViewerFactory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xchange/ChangeXViewerFactory.java
index 296615a0adc..98f98af14cc 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xchange/ChangeXViewerFactory.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xchange/ChangeXViewerFactory.java
@@ -16,6 +16,7 @@ import org.eclipse.nebula.widgets.xviewer.core.model.SortDataType;
import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
import org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.IOseeTreeReportProvider;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.SkynetXViewerFactory;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.column.ArtifactTypeColumn;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.column.GuidColumn;
@@ -49,8 +50,8 @@ public class ChangeXViewerFactory extends SkynetXViewerFactory {
public final static String NAMESPACE = "osee.skynet.gui.ChangeXViewer";
- public ChangeXViewerFactory() {
- super(NAMESPACE);
+ public ChangeXViewerFactory(IOseeTreeReportProvider reportProvider) {
+ super(NAMESPACE, reportProvider);
registerColumns(Name, Item_Type, Item_Kind, Change_Type, Is_Value, Was_Value, paraNumber);
registerColumns(HierarchyIndexColumn.getInstance());
registerColumns(new GuidColumn(false));
@@ -67,5 +68,4 @@ public class ChangeXViewerFactory extends SkynetXViewerFactory {
public XViewerSorter createNewXSorter(XViewer xViewer) {
return new XViewerSorter(xViewer);
}
-
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXViewer.java
index 5ad10043838..77f8d85f2a6 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXViewer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXViewer.java
@@ -35,6 +35,7 @@ import org.eclipse.osee.framework.ui.skynet.compare.CompareHandler;
import org.eclipse.osee.framework.ui.skynet.internal.Activator;
import org.eclipse.osee.framework.ui.skynet.mergeWizard.ConflictResolutionWizard;
import org.eclipse.osee.framework.ui.skynet.render.RendererManager;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.IOseeTreeReportProvider;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.Widgets;
import org.eclipse.swt.graphics.Image;
@@ -55,8 +56,8 @@ public class MergeXViewer extends XViewer {
private ConflictResolutionWizard conWizard;
private XMergeLabelProvider labelProvider;
- public MergeXViewer(Composite parent, int style, MergeXWidget xMergeViewer) {
- super(parent, style, new MergeXViewerFactory());
+ public MergeXViewer(Composite parent, int style, MergeXWidget xMergeViewer, IOseeTreeReportProvider reportProvider) {
+ super(parent, style, new MergeXViewerFactory(reportProvider));
this.mergeXWidget = xMergeViewer;
}
@@ -108,9 +109,9 @@ public class MergeXViewer extends XViewer {
private boolean hasInteractiveIcon(TreeColumn treeColumn) {
return isXViewerColumn(treeColumn, MergeXViewerFactory.Source) //
- || isXViewerColumn(treeColumn, MergeXViewerFactory.Destination) //
- || isXViewerColumn(treeColumn, MergeXViewerFactory.Conflict_Resolved) //
- || isXViewerColumn(treeColumn, MergeXViewerFactory.Merged);
+ || isXViewerColumn(treeColumn, MergeXViewerFactory.Destination) //
+ || isXViewerColumn(treeColumn, MergeXViewerFactory.Conflict_Resolved) //
+ || isXViewerColumn(treeColumn, MergeXViewerFactory.Merged);
}
private boolean isXViewerColumn(TreeColumn treeColumn, XViewerColumn expected) {
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXViewerFactory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXViewerFactory.java
index 5dbc806e70d..474566fe1d9 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXViewerFactory.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXViewerFactory.java
@@ -10,10 +10,11 @@
*******************************************************************************/
package org.eclipse.osee.framework.ui.skynet.widgets.xmerge;
-import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
import org.eclipse.nebula.widgets.xviewer.core.model.SortDataType;
+import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
import org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn;
import org.eclipse.nebula.widgets.xviewer.customize.XViewerCustomMenu;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.IOseeTreeReportProvider;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.SkynetXViewerFactory;
/**
@@ -38,8 +39,8 @@ public class MergeXViewerFactory extends SkynetXViewerFactory {
public final static XViewerColumn Art_Id = new XViewerColumn("framework.merge.artId", "Artifact Id", 75,
XViewerAlign.Left, true, SortDataType.String, false, null);
- public MergeXViewerFactory() {
- super("osee.skynet.gui.MergeXViewer");
+ public MergeXViewerFactory(IOseeTreeReportProvider reportProvider) {
+ super("osee.skynet.gui.MergeXViewer", reportProvider);
registerColumns(Conflict_Resolved, Artifact_Name, Type, Change_Item, Source, Destination, Merged, Art_Id);
registerAllAttributeColumns();
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java
index e62ca1c562f..59b12a56c27 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java
@@ -61,6 +61,7 @@ import org.eclipse.osee.framework.ui.skynet.render.PresentationType;
import org.eclipse.osee.framework.ui.skynet.render.RendererManager;
import org.eclipse.osee.framework.ui.skynet.widgets.GenericXWidget;
import org.eclipse.osee.framework.ui.skynet.widgets.dialog.CheckBoxDialog;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.IOseeTreeReportProvider;
import org.eclipse.osee.framework.ui.swt.ALayout;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.IDirtiableEditor;
@@ -79,7 +80,7 @@ import org.eclipse.ui.PlatformUI;
* @author Donald G. Dunne
* @author Theron Virgin
*/
-public class MergeXWidget extends GenericXWidget {
+public class MergeXWidget extends GenericXWidget implements IOseeTreeReportProvider {
private static final String COMPLETE_COMMIT_ACTION_ID = "complete.commit.action.id";
private static final String REFRESH_ACTION_ID = "refresh.action.id";
private MergeXViewer mergeXViewer;
@@ -112,7 +113,7 @@ public class MergeXWidget extends GenericXWidget {
taskComp.setLayout(ALayout.getZeroMarginLayout());
createTextWidgets(parent);
createMainComposite(mainComp);
- mergeXViewer = new MergeXViewer(mainComp, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION, this);
+ mergeXViewer = new MergeXViewer(mainComp, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION, this, this);
createMergeXViewer();
createTaskActionBar(taskComp);
if (toolkit != null) {
@@ -722,4 +723,20 @@ public class MergeXWidget extends GenericXWidget {
}
}
}
+
+ @Override
+ public String getEditorTitle() {
+ try {
+ return String.format("Table Report - Merge View [%s]", getEditorTitle());
+ } catch (Exception ex) {
+ // do nothing
+ }
+ return "Table Report - Merge View";
+ }
+
+ @Override
+ public String getReportTitle() {
+ return getEditorTitle();
+ }
+
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/IOseeTreeReportProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/IOseeTreeReportProvider.java
new file mode 100644
index 00000000000..af5012f029e
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/IOseeTreeReportProvider.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.ui.skynet.widgets.xviewer;
+
+/**
+ * @author Donald G. Dunne
+ */
+public interface IOseeTreeReportProvider {
+
+ public String getEditorTitle();
+
+ public String getReportTitle();
+}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/OseeXViewerTreeReport.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/OseeXViewerTreeReport.java
index cf165c3ca81..510cd306ca8 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/OseeXViewerTreeReport.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/OseeXViewerTreeReport.java
@@ -14,6 +14,7 @@ package org.eclipse.osee.framework.ui.skynet.widgets.xviewer;
import org.eclipse.nebula.widgets.xviewer.XViewer;
import org.eclipse.nebula.widgets.xviewer.XViewerTreeReport;
import org.eclipse.osee.framework.core.util.XResultData;
+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.ui.skynet.internal.Activator;
@@ -23,24 +24,44 @@ import org.eclipse.swt.widgets.TreeItem;
public class OseeXViewerTreeReport extends XViewerTreeReport {
+ private IOseeTreeReportProvider provider;
+
public OseeXViewerTreeReport(String title, XViewer treeViewer) {
super(title, treeViewer);
}
- public OseeXViewerTreeReport(XViewer xViewer) {
+ public OseeXViewerTreeReport(XViewer xViewer, IOseeTreeReportProvider provider) {
super("Table View Report", xViewer);
+ this.provider = provider;
+ }
+
+ public OseeXViewerTreeReport(XViewer xViewer) {
+ this(xViewer, null);
}
@Override
public void open(TreeItem items[], String defaultString) {
try {
String html = getHtml(items);
+ if (provider != null && Strings.isValid(provider.getReportTitle())) {
+ html = html.replaceFirst("<body>", "<body><b>" + provider.getReportTitle() + "</b></br>");
+ }
XResultData xResultData = new XResultData();
xResultData.addRaw(html);
- XResultDataUI.report(xResultData, title, Manipulations.RAW_HTML);
+ String useTitle = getUseTitle();
+ XResultDataUI.report(xResultData, useTitle, Manipulations.RAW_HTML);
} catch (Exception ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
}
}
+ private String getUseTitle() {
+ if (Strings.isValid(provider.getEditorTitle())) {
+ return provider.getEditorTitle();
+ } else if (Strings.isValid(title)) {
+ return title;
+ }
+ return "Table Report";
+ }
+
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/OseeTreeReportAdapter.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/OseeTreeReportAdapter.java
new file mode 100644
index 00000000000..c66b63784ac
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/OseeTreeReportAdapter.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet;
+
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.IOseeTreeReportProvider;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OseeTreeReportAdapter implements IOseeTreeReportProvider {
+
+ private final String title;
+
+ public OseeTreeReportAdapter(String title) {
+ this.title = title;
+ }
+
+ @Override
+ public String getEditorTitle() {
+ return title;
+ }
+
+ @Override
+ public String getReportTitle() {
+ return title;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetXViewerFactory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetXViewerFactory.java
index 9dbd2f9c5b5..b95c6f5e8bd 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetXViewerFactory.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetXViewerFactory.java
@@ -32,6 +32,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.attribute.AttributeTypeManager;
import org.eclipse.osee.framework.ui.skynet.internal.Activator;
import org.eclipse.osee.framework.ui.skynet.util.DbConnectionUtility;
+import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.IOseeTreeReportProvider;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.OseeXViewerTreeReport;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.column.ArtifactNameColumn;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.column.AttributeColumn;
@@ -41,8 +42,11 @@ import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.column.Attrib
*/
public class SkynetXViewerFactory extends XViewerFactory {
- public SkynetXViewerFactory(String namespace) {
+ private IOseeTreeReportProvider reportProvider;
+
+ public SkynetXViewerFactory(String namespace, IOseeTreeReportProvider reportProvider) {
super(namespace);
+ this.reportProvider = reportProvider;
}
private IXViewerCustomizations xViewerCustomizations;
@@ -148,7 +152,11 @@ public class SkynetXViewerFactory extends XViewerFactory {
@Override
public XViewerTreeReport getXViewerTreeReport(XViewer viewer) {
- return new OseeXViewerTreeReport(viewer);
+ return new OseeXViewerTreeReport(viewer, reportProvider);
+ }
+
+ public void setReportProvider(IOseeTreeReportProvider reportProvider) {
+ this.reportProvider = reportProvider;
}
}

Back to the top