Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2010-09-23 18:05:08 -0400
committerRyan D. Brooks2010-09-23 18:05:08 -0400
commitee6c0a4558fb1ffda2b5e95348fff7038d4803ac (patch)
tree9c322aea5e0217abe8741a89fbe271b3bdf34a08 /plugins
parentcdb5fcd21d9ffda425f91e3928e57aca9be3ebfc (diff)
downloadorg.eclipse.osee-ee6c0a4558fb1ffda2b5e95348fff7038d4803ac.tar.gz
org.eclipse.osee-ee6c0a4558fb1ffda2b5e95348fff7038d4803ac.tar.xz
org.eclipse.osee-ee6c0a4558fb1ffda2b5e95348fff7038d4803ac.zip
feature[ats_UYPM6]: Add coverage work product actions and update events
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageItemPersistTest.java21
-rw-r--r--plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageUnitPersistTest.java8
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/action/OpenWorkProductTaskAction.java96
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/action/RemoveWorkProductTaskAction.java97
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditor.java6
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorCoverageTab.java18
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageLabelProvider.java7
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewer.java12
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageChange.java4
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageEventManager.java106
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageItem.java29
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackage.java10
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackageBase.java9
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageUnit.java2
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoveragePackageStore.java15
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoverageUnitStore.java47
16 files changed, 427 insertions, 60 deletions
diff --git a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageItemPersistTest.java b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageItemPersistTest.java
index a957af6730..8e0ef28ecb 100644
--- a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageItemPersistTest.java
+++ b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageItemPersistTest.java
@@ -97,18 +97,20 @@ public class CoverageItemPersistTest {
Artifact artifact = new OseeCoverageUnitStore(parentCu, BranchManager.getCommonBranch()).getArtifact(true);
Assert.assertNotNull(artifact);
SkynetTransaction transaction = new SkynetTransaction(BranchManager.getCommonBranch(), "Save CoverageItem");
+ String coverageGuid = GUID.create();
+ String coverageName = "Test CP";
CoveragePackageEvent coverageEvent =
- new CoveragePackageEvent("Test CP", GUID.create(), CoverageEventType.Modified, GUID.create());
+ new CoveragePackageEvent(coverageName, coverageGuid, CoverageEventType.Modified, GUID.create());
new OseeCoverageUnitStore(parentCu, BranchManager.getCommonBranch()).save(transaction, coverageEvent);
transaction.execute();
// Not name/guid cause not attached to coverage package
- Assert.assertNull(coverageEvent.getPackage().getGuid());
- Assert.assertNull(coverageEvent.getPackage().getName());
- Assert.assertNull(coverageEvent.getPackage().getEventType().equals(CoverageEventType.Modified));
- Assert.assertEquals(10, coverageEvent.getCoverages().size());
- Assert.assertEquals(CoverageEventType.Added,
- coverageEvent.getCoverages().iterator().next().getEventType());
+ Assert.assertEquals(coverageGuid, coverageEvent.getPackage().getGuid());
+ Assert.assertEquals(coverageName, coverageEvent.getPackage().getName());
+ Assert.assertEquals(CoverageEventType.Modified, coverageEvent.getPackage().getEventType());
+ // 10 coverage items added and one coverage unit == 11
+ Assert.assertEquals(11, coverageEvent.getCoverages().size());
+ Assert.assertEquals(CoverageEventType.Added, coverageEvent.getCoverages().iterator().next().getEventType());
Assert.assertEquals(10, ci.getTestUnits().size());
}
@@ -147,9 +149,8 @@ public class CoverageItemPersistTest {
artifact = new OseeCoverageUnitStore(parentCu, BranchManager.getCommonBranch()).getArtifact(false);
Assert.assertNull(artifact);
Assert.assertEquals(0, CoverageTestUtil.getAllCoverageArtifacts().size());
- Assert.assertEquals(10, coverageEvent.getCoverages().size());
- Assert.assertEquals(CoverageEventType.Deleted,
- coverageEvent.getCoverages().iterator().next().getEventType());
+ Assert.assertEquals(11, coverageEvent.getCoverages().size());
+ Assert.assertEquals(CoverageEventType.Deleted, coverageEvent.getCoverages().iterator().next().getEventType());
}
}
diff --git a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageUnitPersistTest.java b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageUnitPersistTest.java
index ed0907114e..b6e54467f7 100644
--- a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageUnitPersistTest.java
+++ b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageUnitPersistTest.java
@@ -15,6 +15,8 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
+import org.eclipse.osee.coverage.event.CoverageEventType;
+import org.eclipse.osee.coverage.event.CoveragePackageEvent;
import org.eclipse.osee.coverage.internal.Activator;
import org.eclipse.osee.coverage.merge.IMergeItem;
import org.eclipse.osee.coverage.merge.MergeImportManager;
@@ -202,7 +204,11 @@ public class CoverageUnitPersistTest {
}
Assert.assertEquals(10, item.getTestUnits().size());
OseeCoverageUnitStore store = new OseeCoverageUnitStore(unit, BranchManager.getCommonBranch());
- Result result = store.save();
+ CoveragePackageEvent coverageEvent =
+ new CoveragePackageEvent("Test CP", GUID.create(), CoverageEventType.Deleted, GUID.create());
+ SkynetTransaction transaction = new SkynetTransaction(BranchManager.getCommonBranch(), "Coverage Unit Commit");
+ Result result = store.save(transaction, coverageEvent);
+ transaction.execute();
Assert.assertTrue(result.isTrue());
Artifact artifact =
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/action/OpenWorkProductTaskAction.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/action/OpenWorkProductTaskAction.java
new file mode 100644
index 0000000000..97318bf897
--- /dev/null
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/action/OpenWorkProductTaskAction.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.coverage.action;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.osee.coverage.internal.Activator;
+import org.eclipse.osee.coverage.model.ICoverage;
+import org.eclipse.osee.coverage.model.IWorkProductRelatable;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+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.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
+import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
+import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
+import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
+import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
+import org.eclipse.osee.framework.ui.skynet.cm.IOseeCmService;
+import org.eclipse.osee.framework.ui.skynet.cm.OseeCmEditor;
+import org.eclipse.osee.framework.ui.swt.ImageManager;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class OpenWorkProductTaskAction extends Action {
+
+ private final ISelectedCoverageEditorItem selectedCoverageEditorItem;
+
+ public OpenWorkProductTaskAction(ISelectedCoverageEditorItem selectedCoverageEditorItem) {
+ super("Open Work Product Task");
+ this.selectedCoverageEditorItem = selectedCoverageEditorItem;
+ }
+
+ @Override
+ public ImageDescriptor getImageDescriptor() {
+ return ImageManager.getImageDescriptor(FrameworkImage.OPEN);
+ }
+
+ @Override
+ public void run() {
+
+ if (selectedCoverageEditorItem.getSelectedCoverageEditorItems().isEmpty()) {
+ AWorkbench.popup("Select Coverage Item(s) or Coverage Units(s)");
+ return;
+ }
+
+ final IOseeCmService cm = SkynetGuiPlugin.getInstance().getOseeCmService();
+ if (cm == null) {
+ AWorkbench.popup("Unable to connect to CM service.");
+ return;
+ }
+
+ final List<String> workProductGuids = new ArrayList<String>();
+ for (ICoverage coverage : selectedCoverageEditorItem.getSelectedCoverageEditorItems()) {
+ if (coverage instanceof IWorkProductRelatable && Strings.isValid(((IWorkProductRelatable) coverage).getWorkProductGuid())) {
+ workProductGuids.add(((IWorkProductRelatable) coverage).getWorkProductGuid());
+ }
+ }
+ if (workProductGuids.isEmpty()) {
+ AWorkbench.popup("No Coverage Item(s) and Coverage Units(s) related.");
+ return;
+ }
+
+ Job job = new Job("Open " + getText()) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ List<Artifact> artifacts =
+ ArtifactQuery.getArtifactListFromIds(workProductGuids, BranchManager.getCommonBranch());
+ cm.openArtifacts("Related Work Products", artifacts, OseeCmEditor.CmMultiPcrEditor);
+ } catch (OseeCoreException ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.schedule();
+
+ }
+}
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/action/RemoveWorkProductTaskAction.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/action/RemoveWorkProductTaskAction.java
new file mode 100644
index 0000000000..c8fb82a9b0
--- /dev/null
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/action/RemoveWorkProductTaskAction.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.coverage.action;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.osee.coverage.editor.xcover.CoverageXViewer;
+import org.eclipse.osee.coverage.internal.Activator;
+import org.eclipse.osee.coverage.model.ICoverage;
+import org.eclipse.osee.coverage.model.IWorkProductRelatable;
+import org.eclipse.osee.coverage.util.ISaveable;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+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.plugin.util.AWorkbench;
+import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
+import org.eclipse.osee.framework.ui.swt.ImageManager;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class RemoveWorkProductTaskAction extends Action {
+
+ private final ISelectedCoverageEditorItem selectedCoverageEditorItem;
+ private final ISaveable saveable;
+ private final CoverageXViewer coverageXViewer;
+
+ public RemoveWorkProductTaskAction(CoverageXViewer coverageXViewer, ISelectedCoverageEditorItem selectedCoverageEditorItem, ISaveable saveable) {
+ super("Remove Work Product Task");
+ this.coverageXViewer = coverageXViewer;
+ this.selectedCoverageEditorItem = selectedCoverageEditorItem;
+ this.saveable = saveable;
+ }
+
+ @Override
+ public ImageDescriptor getImageDescriptor() {
+ return ImageManager.getImageDescriptor(FrameworkImage.DELETE);
+ }
+
+ @Override
+ public void run() {
+ if (coverageXViewer.getWorkProductTaskProvider().getWorkProductRelatedActions().isEmpty()) {
+ AWorkbench.popup("No Work Product related Actions.\n\nMust related Work Product Actions first.");
+ return;
+ }
+
+ if (selectedCoverageEditorItem.getSelectedCoverageEditorItems().isEmpty()) {
+ AWorkbench.popup("Select Coverage Item(s) or Coverage Units(s)");
+ return;
+ }
+
+ List<ICoverage> relatedCoverageItems = new ArrayList<ICoverage>();
+ for (ICoverage coverage : selectedCoverageEditorItem.getSelectedCoverageEditorItems()) {
+ if (coverage instanceof IWorkProductRelatable && Strings.isValid(((IWorkProductRelatable) coverage).getWorkProductGuid())) {
+ relatedCoverageItems.add(coverage);
+ }
+ }
+ if (relatedCoverageItems.isEmpty()) {
+ AWorkbench.popup("No Coverage Item(s) and Coverage Units(s) related.");
+ return;
+ }
+
+ if (MessageDialog.openConfirm(Display.getCurrent().getActiveShell(), getText(),
+ "Remove related Work Product Tasks?")) {
+ try {
+ for (ICoverage coverage : relatedCoverageItems) {
+ if (coverage instanceof IWorkProductRelatable) {
+ ((IWorkProductRelatable) coverage).setWorkProductGuid("");
+ }
+ }
+ saveable.save(relatedCoverageItems);
+ coverageXViewer.getWorkProductTaskProvider().reload();
+ for (ICoverage coverage : relatedCoverageItems) {
+ if (coverage instanceof IWorkProductRelatable) {
+ ((IWorkProductRelatable) coverage).setWorkProductTask(null);
+ coverageXViewer.update(coverage);
+ }
+ }
+ } catch (OseeCoreException ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
+ }
+ }
+ }
+}
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditor.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditor.java
index 908ddf0a48..a45137dbf2 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditor.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditor.java
@@ -21,6 +21,7 @@ import org.eclipse.osee.coverage.event.CoverageEventManager;
import org.eclipse.osee.coverage.internal.Activator;
import org.eclipse.osee.coverage.model.CoveragePackage;
import org.eclipse.osee.coverage.model.CoveragePackageBase;
+import org.eclipse.osee.coverage.model.ICoverage;
import org.eclipse.osee.coverage.store.OseeCoveragePackageStore;
import org.eclipse.osee.coverage.util.CoverageImage;
import org.eclipse.osee.coverage.util.CoverageUtil;
@@ -274,6 +275,11 @@ public class CoverageEditor extends FormEditor implements IActionable {
return editors;
}
+ public void refresh(ICoverage coverage) {
+ coverageEditorCoverageTab.refresh(coverage);
+ coverageEditorOverviewTab.refreshActionHandler();
+ }
+
public static void closeAll() {
Displays.ensureInDisplayThread(new Runnable() {
@Override
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 b9fb68a22f..3e19019aff 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
@@ -13,6 +13,7 @@ import java.util.Collection;
import java.util.Set;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.osee.coverage.action.IRefreshable;
import org.eclipse.osee.coverage.editor.params.CoverageParameters;
import org.eclipse.osee.coverage.editor.params.CoverageParametersComposite;
import org.eclipse.osee.coverage.editor.params.CoverageParametersTextFilter;
@@ -54,7 +55,7 @@ import org.eclipse.ui.forms.widgets.ScrolledForm;
/**
* @author Donald G. Dunne
*/
-public class CoverageEditorCoverageTab extends FormPage implements ISaveable {
+public class CoverageEditorCoverageTab extends FormPage implements ISaveable, IRefreshable {
private XCoverageViewer xCoverageViewer;
private ScrolledForm scrolledForm;
@@ -196,4 +197,19 @@ public class CoverageEditorCoverageTab extends FormPage implements ISaveable {
return PAGE_ID;
}
+ @Override
+ public void refresh(Object element) {
+ xCoverageViewer.getXViewer().refresh(element);
+ }
+
+ @Override
+ public void update(Object element) {
+ xCoverageViewer.getXViewer().update(element);
+ }
+
+ @Override
+ public void remove(Object element) {
+ // do nothing
+ }
+
}
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageLabelProvider.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageLabelProvider.java
index 4f2332e116..c8d1c90c2d 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageLabelProvider.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageLabelProvider.java
@@ -31,6 +31,8 @@ import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
import org.eclipse.osee.framework.skynet.core.utility.UsersByIds;
import org.eclipse.osee.framework.ui.skynet.FrameworkArtifactImageProvider;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
+import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
+import org.eclipse.osee.framework.ui.skynet.cm.IOseeCmService.ImageType;
import org.eclipse.osee.framework.ui.swt.ImageManager;
import org.eclipse.swt.graphics.Image;
@@ -69,6 +71,11 @@ public class CoverageLabelProvider extends XViewerLabelProvider {
if (xCol.equals(CoverageXViewerFactory.Name)) {
return ImageManager.getImage(coverageItem.getOseeImage());
}
+ if (xCol.equals(CoverageXViewerFactory.Work_Product_Task)) {
+ if (Strings.isValid(coverageItem.getWorkProductTaskStr())) {
+ return ImageManager.getImage(SkynetGuiPlugin.getInstance().getOseeCmService().getImage(ImageType.Task));
+ }
+ }
return null;
}
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewer.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewer.java
index 2ad22df058..003796034b 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewer.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewer.java
@@ -28,6 +28,8 @@ import org.eclipse.osee.coverage.action.EditCoverageNotesAction;
import org.eclipse.osee.coverage.action.EditRationaleAction;
import org.eclipse.osee.coverage.action.IRefreshable;
import org.eclipse.osee.coverage.action.ISelectedCoverageEditorItem;
+import org.eclipse.osee.coverage.action.OpenWorkProductTaskAction;
+import org.eclipse.osee.coverage.action.RemoveWorkProductTaskAction;
import org.eclipse.osee.coverage.action.ViewSourceAction;
import org.eclipse.osee.coverage.editor.xcover.XCoverageViewer.TableType;
import org.eclipse.osee.coverage.internal.Activator;
@@ -57,7 +59,7 @@ public class CoverageXViewer extends XViewer implements ISelectedCoverageEditorI
protected final XCoverageViewer xCoverageViewer;
Action editRationaleAction, editMethodAction, viewSourceAction, editAssigneesAction, editCoverageStatusAction,
- deleteCoverUnitAction, createWorkProductTaskAction;
+ deleteCoverUnitAction, createWorkProductTaskAction, removeWorkProductTaskAction, openWorkProductTaskAction;
public CoverageXViewer(Composite parent, int style, XCoverageViewer xCoverageViewer) {
this(parent, style, new CoverageXViewerFactory(), xCoverageViewer);
@@ -83,6 +85,8 @@ public class CoverageXViewer extends XViewer implements ISelectedCoverageEditorI
editRationaleAction = new EditRationaleAction(this, this, this);
deleteCoverUnitAction = new DeleteCoverUnitAction(this, this, this);
createWorkProductTaskAction = new CreateWorkProductTaskAction(this, this, this);
+ removeWorkProductTaskAction = new RemoveWorkProductTaskAction(this, this, this);
+ openWorkProductTaskAction = new OpenWorkProductTaskAction(this);
}
}
@@ -173,6 +177,12 @@ public class CoverageXViewer extends XViewer implements ISelectedCoverageEditorI
if (xCoverageViewer.getWorkProductTaskProvider() != null) {
mm.insertBefore(MENU_GROUP_PRE, createWorkProductTaskAction);
createWorkProductTaskAction.setEnabled(isCreateWorkProductTaskActionEnabled());
+
+ mm.insertBefore(MENU_GROUP_PRE, removeWorkProductTaskAction);
+ removeWorkProductTaskAction.setEnabled(isCreateWorkProductTaskActionEnabled());
+
+ mm.insertBefore(MENU_GROUP_PRE, openWorkProductTaskAction);
+ openWorkProductTaskAction.setEnabled(isCreateWorkProductTaskActionEnabled());
}
mm.insertBefore(MENU_GROUP_PRE, new Separator());
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageChange.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageChange.java
index 424f073a4d..63e79e5c2f 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageChange.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageChange.java
@@ -50,4 +50,8 @@ public class CoverageChange {
this.coverageEventType = coverageEventType;
}
+ @Override
+ public String toString() {
+ return String.format("[%s - %s - %s]", this.coverageEventType, this.guid, this.name);
+ }
}
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageEventManager.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageEventManager.java
index ebde093cff..da50687070 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageEventManager.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/event/CoverageEventManager.java
@@ -16,13 +16,21 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.logging.Level;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.osee.coverage.editor.CoverageEditor;
import org.eclipse.osee.coverage.internal.Activator;
+import org.eclipse.osee.coverage.model.CoverageItem;
import org.eclipse.osee.coverage.model.CoveragePackage;
+import org.eclipse.osee.coverage.model.CoverageUnit;
+import org.eclipse.osee.coverage.model.ICoverage;
import org.eclipse.osee.coverage.msgs.CoverageChange1;
import org.eclipse.osee.coverage.msgs.CoveragePackageEvent1;
import org.eclipse.osee.coverage.store.CoverageArtifactTypes;
-import org.eclipse.osee.framework.core.client.ClientSessionManager;
+import org.eclipse.osee.coverage.store.OseeCoveragePackageStore;
+import org.eclipse.osee.coverage.store.OseeCoverageUnitStore;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.messaging.ConnectionNode;
@@ -103,16 +111,30 @@ public class CoverageEventManager implements IArtifactEventListener, OseeMessagi
connectionNode.subscribe(CoverageMessages.CoveragePackageEvent1, new CoverageMessageListener(), instance);
}
- public void sendRemoteEvent(CoveragePackageEvent coverageEvent) {
- System.out.println(String.format("Sending CoveragePackageEvent [%s]", coverageEvent.getPackage().getName()));
- if (connectionNode != null) {
- try {
- CoveragePackageEvent1 event1 = getCoveragePackageEvent(coverageEvent);
- connectionNode.send(CoverageMessages.CoveragePackageEvent1, event1, instance);
- } catch (OseeCoreException ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
+ public void sendRemoteEvent(final CoveragePackageEvent coverageEvent) {
+ Job job = new Job("Sending Coverage Event") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException ex1) {
+ // do nothing
+ }
+ System.out.println(String.format("Sending CoveragePackageEvent %d items [%s]",
+ coverageEvent.getCoverages().size(), coverageEvent.getPackage().getName()));
+ if (connectionNode != null) {
+ try {
+ CoveragePackageEvent1 event1 = getCoveragePackageEvent(coverageEvent);
+ connectionNode.send(CoverageMessages.CoveragePackageEvent1, event1, instance);
+ } catch (OseeCoreException ex) {
+ OseeLog.log(Activator.class, Level.SEVERE, ex);
+ }
+ }
+ return Status.OK_STATUS;
}
- }
+ };
+ job.schedule();
}
public void register(CoverageEditor coverageEditor) {
@@ -176,14 +198,6 @@ public class CoverageEventManager implements IArtifactEventListener, OseeMessagi
@Override
public void run() {
CoveragePackageEvent1 coverageEvent1 = (CoveragePackageEvent1) message;
- try {
- // Don't process this event if sent from this session
- if (coverageEvent1.getSessionId().equals(ClientSessionManager.getSessionId())) {
- return;
- }
- } catch (Exception ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- }
CoveragePackageEvent coverageEvent = getCoveragePackageEvent(coverageEvent1);
if (coverageEvent != null) {
processCoveragePackageEvent(coverageEvent);
@@ -200,12 +214,14 @@ public class CoverageEventManager implements IArtifactEventListener, OseeMessagi
CoverageEventType packageModType = packageCoverage.getEventType();
for (CoverageEditor editor : new CopyOnWriteArrayList<CoverageEditor>(editors)) {
try {
- if (packageModType == CoverageEventType.Deleted) {
- unregister(editor);
- editor.closeEditor();
- } else if (packageModType == CoverageEventType.Modified) {
- CoveragePackage coveragePackage = (CoveragePackage) editor.getCoveragePackageBase();
- handleCoverageEditorSaveEvent(editor, coveragePackage, coverageEvent);
+ if (coverageEvent.getPackage().getGuid().equals(editor.getCoveragePackageBase().getGuid())) {
+ if (packageModType == CoverageEventType.Deleted) {
+ unregister(editor);
+ editor.closeEditor();
+ } else if (packageModType == CoverageEventType.Modified) {
+ CoveragePackage coveragePackage = (CoveragePackage) editor.getCoveragePackageBase();
+ handleCoverageEditorSaveEvent(editor, coveragePackage, coverageEvent);
+ }
}
} catch (Exception ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex);
@@ -215,8 +231,43 @@ public class CoverageEventManager implements IArtifactEventListener, OseeMessagi
}
- private void handleCoverageEditorSaveEvent(CoverageEditor editor, CoveragePackage coveragePackage, CoveragePackageEvent coverageEvent) {
- System.out.println("handle coverage save event => " + coverageEvent);
+ private void handleCoverageEditorSaveEvent(CoverageEditor editor, CoveragePackage coveragePackage, CoveragePackageEvent coverageEvent) throws OseeCoreException {
+ System.out.println("handle coverage save event => " + coverageEvent.getCoverages().size() + " items");
+ for (CoverageChange change : coverageEvent.getCoverages()) {
+ if (change.getEventType() == CoverageEventType.Modified) {
+ reloadCoverage(editor, coveragePackage, change);
+ }
+ }
+ }
+
+ private void reloadCoverage(CoverageEditor editor, CoveragePackage coveragePackage, CoverageChange change) {
+ System.out.println("handle reloadCoverage coverage => " + change);
+ ICoverage coverage = coveragePackage.getCoverage(change.getGuid());
+ if (coverage != null) {
+ if (coverage instanceof CoverageItem) {
+ try {
+ CoverageUnit parent = (CoverageUnit) ((CoverageItem) coverage).getParent();
+ OseeCoverageUnitStore store = new OseeCoverageUnitStore(parent, editor.getBranch());
+ store.reloadItem(change.getEventType(), (CoverageItem) coverage, change,
+ coveragePackage.getCoverageOptionManager());
+ OseeCoveragePackageStore cpStore = new OseeCoveragePackageStore(coveragePackage, editor.getBranch());
+ cpStore.loadWorkProductTaskNames(Arrays.asList(coverage));
+ editor.refresh(coverage);
+ } catch (OseeCoreException ex) {
+ OseeLog.log(Activator.class, Level.SEVERE, ex);
+ }
+ } else if (coverage instanceof CoverageUnit) {
+ try {
+ OseeCoverageUnitStore store = new OseeCoverageUnitStore((CoverageUnit) coverage, editor.getBranch());
+ store.load(coveragePackage.getCoverageOptionManager());
+ OseeCoveragePackageStore cpStore = new OseeCoveragePackageStore(coveragePackage, editor.getBranch());
+ cpStore.loadWorkProductTaskNames(Arrays.asList(coverage));
+ editor.refresh(coverage);
+ } catch (OseeCoreException ex) {
+ OseeLog.log(Activator.class, Level.SEVERE, ex);
+ }
+ }
+ }
}
@Override
@@ -237,6 +288,7 @@ public class CoverageEventManager implements IArtifactEventListener, OseeMessagi
childChange1.setGuid(change.getGuid());
childChange1.setName(change.getName());
childChange1.setModTypeGuid(change.getEventType().getGuid());
+ event1.getCoverages().add(childChange1);
}
return event1;
}
@@ -251,7 +303,7 @@ public class CoverageEventManager implements IArtifactEventListener, OseeMessagi
coveragePackageEvent1.getPackage().getGuid(), packageEventType, coveragePackageEvent1.getSessionId());
event.setSessionId(coveragePackageEvent1.getSessionId());
for (CoverageChange1 change : coveragePackageEvent1.getCoverages()) {
- CoverageEventType eventType = CoverageEventType.getType(change.getGuid());
+ CoverageEventType eventType = CoverageEventType.getType(change.getModTypeGuid());
if (eventType != null) {
event.getCoverages().add(new CoverageChange(change.getName(), change.getGuid(), eventType));
} else {
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageItem.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageItem.java
index 66fd6c61fe..6ca1ad389a 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageItem.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageItem.java
@@ -19,6 +19,7 @@ import org.eclipse.osee.framework.core.data.NamedIdentity;
import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeExceptions;
+import org.eclipse.osee.framework.jdk.core.type.Pair;
import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -77,14 +78,18 @@ public class CoverageItem extends NamedIdentity implements ICoverage, IWorkProdu
* Copies the coverage unit. Does not copy test units.
*/
public CoverageItem copy(CoverageUnit parent) throws OseeCoreException {
- CoverageItem coverageitem = new CoverageItem(getGuid(), parent, coverageMethod, orderNumber);
- coverageitem.setName(getName());
- coverageitem.setOrderNumber(orderNumber);
- coverageitem.setRationale(rationale);
- coverageitem.setTestUnitProvider(testUnitProvider);
- coverageitem.setWorkProductGuid(workProductGuid);
- coverageitem.setWorkProductTask(workProductTask);
- return coverageitem;
+ CoverageItem coverageItem = new CoverageItem(getGuid(), parent, coverageMethod, orderNumber);
+ copy(this, coverageItem);
+ return coverageItem;
+ }
+
+ public void copy(CoverageItem fromItem, CoverageItem toItem) throws OseeCoreException {
+ toItem.setName(fromItem.getName());
+ toItem.setOrderNumber(fromItem.getOrderNumber());
+ toItem.setRationale(fromItem.getRationale());
+ toItem.setTestUnitProvider(fromItem.getTestUnitProvider());
+ toItem.setWorkProductGuid(fromItem.getWorkProductGuid());
+ toItem.setWorkProductTask(fromItem.getWorkProductTask());
}
public Collection<String> getTestUnits() throws OseeCoreException {
@@ -243,6 +248,12 @@ public class CoverageItem extends NamedIdentity implements ICoverage, IWorkProdu
this.testUnitProvider = testUnitProvider;
}
+ public static Pair<String, String> getNameGuidFromStore(String string) throws Exception {
+ PropertyStore store = new PropertyStore();
+ store.load(string);
+ return new Pair<String, String>(store.get("name"), store.get("guid"));
+ }
+
private void setFromPropertyStore(PropertyStore store, CoverageOptionManager coverageOptionManager) throws OseeCoreException {
setCoverageMethod(coverageOptionManager.get(store.get("methodType")));
if (Strings.isValid(store.get("order"))) {
@@ -310,7 +321,7 @@ public class CoverageItem extends NamedIdentity implements ICoverage, IWorkProdu
return getWorkProductTask().toString();
}
if (Strings.isValid(workProductGuid)) {
- return workProductGuid;
+ return "Task Not Found: " + workProductGuid;
}
return "";
}
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackage.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackage.java
index d7d9f4f913..ed6a87cda4 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackage.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackage.java
@@ -55,6 +55,16 @@ public class CoveragePackage extends CoveragePackageBase {
}
@Override
+ public ICoverage getCoverage(String guid) {
+ for (ICoverage coverage : getChildren(true)) {
+ if (coverage.getGuid().equals(guid)) {
+ return coverage;
+ }
+ }
+ return null;
+ }
+
+ @Override
public void saveKeyValues(KeyValueArtifact keyValueArtifact) {
keyValueArtifact.setValue("date", String.valueOf(creationDate.getTime()));
}
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackageBase.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackageBase.java
index 3db1932821..9a9034cf8a 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackageBase.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackageBase.java
@@ -65,6 +65,15 @@ public abstract class CoveragePackageBase extends NamedIdentity implements ICove
return items;
}
+ public ICoverage getCoverage(String guid) {
+ for (ICoverage coverage : getChildren(true)) {
+ if (coverage.getGuid().equals(guid)) {
+ return coverage;
+ }
+ }
+ return null;
+ }
+
@Override
public String getCoveragePercentStr() {
return CoverageUtil.getPercent(getCoverageItemsCovered().size(), getCoverageItems().size(), true).getSecond();
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageUnit.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageUnit.java
index 9a0bf07e4e..4fecfbadce 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageUnit.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageUnit.java
@@ -363,7 +363,7 @@ public class CoverageUnit extends NamedIdentity implements IWorkProductRelatable
return getWorkProductTask().toString();
}
if (Strings.isValid(workProductGuid)) {
- return workProductGuid;
+ return "Task Not Found: " + workProductGuid;
}
return "";
}
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoveragePackageStore.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoveragePackageStore.java
index a57309e9f3..48b44cfeb2 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoveragePackageStore.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoveragePackageStore.java
@@ -26,6 +26,8 @@ import org.eclipse.osee.coverage.model.CoverageOptionManagerDefault;
import org.eclipse.osee.coverage.model.CoveragePackage;
import org.eclipse.osee.coverage.model.CoverageUnit;
import org.eclipse.osee.coverage.model.ICoverage;
+import org.eclipse.osee.coverage.model.ICoverageItemProvider;
+import org.eclipse.osee.coverage.model.ICoverageUnitProvider;
import org.eclipse.osee.coverage.model.IWorkProductRelatable;
import org.eclipse.osee.coverage.util.ISaveable;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
@@ -91,17 +93,24 @@ public class OseeCoveragePackageStore extends OseeCoverageStore implements ISave
}
}
}
- loadWorkProductTaskNames();
+ loadWorkProductTaskNames(coveragePackage.getCoverageUnits());
}
- private void loadWorkProductTaskNames() {
- for (ICoverage coverage : coveragePackage.getCoverageItems()) {
+ public void loadWorkProductTaskNames(Collection<? extends ICoverage> coverages) {
+ this.coveragePackage.getWorkProductTaskProvider().reload();
+ for (ICoverage coverage : coverages) {
if (coverage instanceof IWorkProductRelatable) {
if (Strings.isValid(((IWorkProductRelatable) coverage).getWorkProductGuid())) {
((IWorkProductRelatable) coverage).setWorkProductTask(this.coveragePackage.getWorkProductTaskProvider().getWorkProductTask(
((IWorkProductRelatable) coverage).getWorkProductGuid()));
}
}
+ if (coverage instanceof ICoverageUnitProvider) {
+ loadWorkProductTaskNames(((ICoverageUnitProvider) coverage).getCoverageUnits());
+ }
+ if (coverage instanceof ICoverageItemProvider) {
+ loadWorkProductTaskNames(((ICoverageItemProvider) coverage).getCoverageItems());
+ }
}
}
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoverageUnitStore.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoverageUnitStore.java
index 3bf4c541c1..c1da9445fc 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoverageUnitStore.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoverageUnitStore.java
@@ -14,9 +14,11 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import java.util.logging.Level;
import org.eclipse.osee.coverage.event.CoverageChange;
import org.eclipse.osee.coverage.event.CoverageEventType;
import org.eclipse.osee.coverage.event.CoveragePackageEvent;
+import org.eclipse.osee.coverage.internal.Activator;
import org.eclipse.osee.coverage.model.CoverageItem;
import org.eclipse.osee.coverage.model.CoverageOptionManager;
import org.eclipse.osee.coverage.model.CoverageOptionManagerDefault;
@@ -25,7 +27,9 @@ import org.eclipse.osee.coverage.model.ICoverage;
import org.eclipse.osee.framework.core.enums.ModificationType;
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.Strings;
+import org.eclipse.osee.framework.logging.OseeLog;
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.Attribute;
@@ -109,6 +113,28 @@ public class OseeCoverageUnitStore extends OseeCoverageStore {
}
}
+ public void reloadItem(CoverageEventType eventType, CoverageItem currentCoverageItem, CoverageChange change, CoverageOptionManager coverageOptionManager) throws OseeCoreException {
+ Artifact artifact = getArtifact(false);
+
+ if (artifact == null) {
+ return;
+ }
+ if (eventType == CoverageEventType.Modified) {
+ for (String value : artifact.getAttributesToStringList(CoverageAttributeTypes.Item)) {
+ CoverageItem dbChangedItem =
+ CoverageItem.createCoverageItem(coverageUnit, value, coverageOptionManager,
+ DbTestUnitProvider.instance());
+ if (currentCoverageItem.getGuid().equals(dbChangedItem.getGuid())) {
+ currentCoverageItem.copy(currentCoverageItem, dbChangedItem);
+ }
+ }
+ } else if (eventType == CoverageEventType.Deleted) {
+ coverageUnit.removeCoverageItem(currentCoverageItem);
+ } else if (eventType == CoverageEventType.Added) {
+ // do nothing; full coverage unit needs reload
+ }
+ }
+
@Override
public Result save(SkynetTransaction transaction, CoveragePackageEvent coverageEvent) throws OseeCoreException {
Artifact artifact = getArtifact(true);
@@ -127,15 +153,22 @@ public class OseeCoverageUnitStore extends OseeCoverageStore {
items.add(coverageItem.toXml());
}
artifact.setAttributeValues(CoverageAttributeTypes.Item, items);
+ // Determine which items have changed and log for event
for (Attribute<Object> attr : artifact.getAttributes(CoverageAttributeTypes.Item)) {
if (attr.isDirty()) {
- CoverageChange change = new CoverageChange(coverageUnit, CoverageEventType.Modified);
- if (attr.getModificationType() == ModificationType.NEW || attr.getModificationType() == ModificationType.UNDELETED || attr.getModificationType() == ModificationType.INTRODUCED) {
- change.setEventType(CoverageEventType.Added);
- } else if (attr.getModificationType() == ModificationType.DELETED) {
- change.setEventType(CoverageEventType.Deleted);
+ try {
+ Pair<String, String> nameGuid = CoverageItem.getNameGuidFromStore((String) attr.getValue());
+ CoverageChange change =
+ new CoverageChange(nameGuid.getFirst(), nameGuid.getSecond(), CoverageEventType.Modified);
+ if (attr.getModificationType() == ModificationType.NEW || attr.getModificationType() == ModificationType.UNDELETED || attr.getModificationType() == ModificationType.INTRODUCED) {
+ change.setEventType(CoverageEventType.Added);
+ } else if (attr.getModificationType() == ModificationType.DELETED) {
+ change.setEventType(CoverageEventType.Deleted);
+ }
+ coverageEvent.getCoverages().add(change);
+ } catch (Exception ex) {
+ OseeLog.log(Activator.class, Level.SEVERE, ex);
}
- coverageEvent.getCoverages().add(change);
}
}
if (Strings.isValid(coverageUnit.getNotes())) {
@@ -194,7 +227,7 @@ public class OseeCoverageUnitStore extends OseeCoverageStore {
if (artifact.isDirty()) {
CoverageChange change = new CoverageChange(coverageUnit, CoverageEventType.Modified);
if (artifact.getModType() == ModificationType.NEW) {
- change.setEventType(CoverageEventType.Added);
+ change.setEventType(CoverageEventType.Modified);
}
coverageEvent.getCoverages().add(change);
}

Back to the top