Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2008-01-10 22:12:32 +0000
committerddunne2008-01-10 22:12:32 +0000
commitc47321c70e797d1890464080f8a25ff4640298c3 (patch)
tree9532d42cde3f8c075ee7c02af99bc8882029dcf7
parent77dbe73ebe8bfa3cb8eaad7f713a7579357e3d26 (diff)
downloadorg.eclipse.osee-c47321c70e797d1890464080f8a25ff4640298c3.tar.gz
org.eclipse.osee-c47321c70e797d1890464080f8a25ff4640298c3.tar.xz
org.eclipse.osee-c47321c70e797d1890464080f8a25ff4640298c3.zip
5CQRY - RPCR 9131 change-report sort showing relation-only artifacts that have word changes
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/branch/BranchLabelProvider.java10
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/changeReport/ChangeReportView.java23
2 files changed, 16 insertions, 17 deletions
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/branch/BranchLabelProvider.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/branch/BranchLabelProvider.java
index cbeafeb2fcb..88fead4d6d4 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/branch/BranchLabelProvider.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/branch/BranchLabelProvider.java
@@ -25,7 +25,6 @@ import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.plugin.core.config.ConfigUtil;
import org.eclipse.osee.framework.skynet.core.SkynetAuthentication;
import org.eclipse.osee.framework.skynet.core.User;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.Branch;
import org.eclipse.osee.framework.skynet.core.artifact.BranchPersistenceManager;
import org.eclipse.osee.framework.skynet.core.attribute.ArtifactSubtypeDescriptor;
@@ -68,7 +67,7 @@ public class BranchLabelProvider implements ITableLabelProvider, ITableColorProv
private boolean showChangeType = false;
private final ShowAttributeAction attributeAction;
- private Collection<Artifact> attributeModifiedArtifacts;
+ private Collection<Integer> attributeModifiedArtifactIds;
public BranchLabelProvider() {
this(null);
@@ -275,7 +274,8 @@ public class BranchLabelProvider implements ITableLabelProvider, ITableColorProv
}
private String getChangeType(ArtifactChange artifactChange) throws SQLException {
- if ((artifactChange.getModType() == SkynetDatabase.ModificationType.CHANGE) && attributeModifiedArtifacts != null && !attributeModifiedArtifacts.contains(artifactChange.getArtifact())) return artifactChange.getModType().getDisplayName() + " Relation Only";
+ // Compare using artids cause a historical artifact is NOT equal to a current artifact
+ if ((artifactChange.getModType() == SkynetDatabase.ModificationType.CHANGE) && attributeModifiedArtifactIds != null && !attributeModifiedArtifactIds.contains(artifactChange.getArtifact().getArtId())) return artifactChange.getModType().getDisplayName() + " Relation Only";
return artifactChange.getModType().getDisplayName();
}
@@ -340,8 +340,8 @@ public class BranchLabelProvider implements ITableLabelProvider, ITableColorProv
/**
* @param showChangeType the showChangeType to set
*/
- public void setShowChangeType(boolean showChangeType, Collection<Artifact> attributeModifiedArtifacts) {
+ public void setShowChangeType(boolean showChangeType, Collection<Integer> attributeModifiedArtifactIds) {
this.showChangeType = showChangeType;
- this.attributeModifiedArtifacts = attributeModifiedArtifacts;
+ this.attributeModifiedArtifactIds = attributeModifiedArtifactIds;
}
}
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/changeReport/ChangeReportView.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/changeReport/ChangeReportView.java
index 2fd944233b4..f984b7ed4c8 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/changeReport/ChangeReportView.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/changeReport/ChangeReportView.java
@@ -143,7 +143,7 @@ public class ChangeReportView extends ViewPart implements IActionable, IEventRec
private static final String SHOW_FINAL_VERSION_TXT = "Show Final &Version";
private static final String DIFF_ARTIFACT = "DIFF_ARTIFACT";
private Action sortAction = null;
- private Collection<Artifact> attributeModifiedArtifacts = null;
+ private Collection<Integer> attributeModifiedArtifactIds = null;
private TreeViewer changeTable;
private MenuItem diffMenuItem;
@@ -425,24 +425,24 @@ public class ChangeReportView extends ViewPart implements IActionable, IEventRec
@Override
public void run() {
if (sortAction.isChecked()) {
- if (attributeModifiedArtifacts == null) {
+ if (attributeModifiedArtifactIds == null) {
+ attributeModifiedArtifactIds = new ArrayList<Integer>();
try {
TransactionId baseTransId = ((ChangeReportInput) changeTable.getInput()).getBaseTransaction();
TransactionId toTransId = ((ChangeReportInput) changeTable.getInput()).getToTransaction();
- attributeModifiedArtifacts =
- RevisionManager.getInstance().getNewAndModifiedArtifacts(baseTransId, toTransId, false);
+ for (Artifact artifact : RevisionManager.getInstance().getNewAndModifiedArtifacts(baseTransId,
+ toTransId, false)) {
+ attributeModifiedArtifactIds.add(artifact.getArtId());
+ }
} catch (SQLException ex) {
- // Don't want to repeat the errored search
- attributeModifiedArtifacts = new ArrayList<Artifact>();
OSEELog.logSevere(SkynetGuiPlugin.class, "Error getting modified artifacts", true);
}
}
((BranchLabelProvider) changeTable.getLabelProvider()).setShowChangeType(true,
- attributeModifiedArtifacts);
+ attributeModifiedArtifactIds);
changeTable.setSorter(viewerSorter);
} else {
- ((BranchLabelProvider) changeTable.getLabelProvider()).setShowChangeType(false,
- new ArrayList<Artifact>());
+ ((BranchLabelProvider) changeTable.getLabelProvider()).setShowChangeType(false, new ArrayList<Integer>());
changeTable.setSorter(new LabelSorter());
}
}
@@ -474,7 +474,6 @@ public class ChangeReportView extends ViewPart implements IActionable, IEventRec
toolbarManager.add(sortAction);
OseeAts.addBugToViewToolbar(this, this, SkynetGuiPlugin.getInstance(), VIEW_ID, "Change Report");
}
-
ViewerSorter viewerSorter = new ViewerSorter() {
@SuppressWarnings("unchecked")
@@ -487,8 +486,8 @@ public class ChangeReportView extends ViewPart implements IActionable, IEventRec
boolean art1RelChgOnly = false;
boolean art2RelChgOnly = false;
try {
- art1RelChgOnly = !attributeModifiedArtifacts.contains(artChg1.getArtifact());
- art2RelChgOnly = !attributeModifiedArtifacts.contains(artChg2.getArtifact());
+ art1RelChgOnly = !attributeModifiedArtifactIds.contains(artChg1.getArtifact());
+ art2RelChgOnly = !attributeModifiedArtifactIds.contains(artChg2.getArtifact());
// sort relation change only artifacts last
if ((art1RelChgOnly && art2RelChgOnly) || (!art1RelChgOnly && !art2RelChgOnly))
getComparator().compare(artChg1.getName(), artChg2.getName());

Back to the top