Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominic Guss2018-03-08 19:29:11 +0000
committerMegumi Telles2018-04-05 16:57:34 +0000
commit58271d7ba9526577e6c8272cad977019d1be372a (patch)
tree5c4706cfc49d6f4405455235bc419cab415f718d /plugins
parentfe127ee3aa3ef6f2a1c0839018ed40cbc6af5db0 (diff)
downloadorg.eclipse.osee-58271d7ba9526577e6c8272cad977019d1be372a.tar.gz
org.eclipse.osee-58271d7ba9526577e6c8272cad977019d1be372a.tar.xz
org.eclipse.osee-58271d7ba9526577e6c8272cad977019d1be372a.zip
feature[ats_TW7114]: Update STD/STP to differentiate IMPD and SRS0.25.3.v201804051912-REL
Change-Id: I4d1bf4ef61e2e9ef6cf68ee60182c74d2850ad6e Signed-off-by: Dominic Guss <Dominic.Guss@boeing.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/traceability/DemoTraceParser.java1
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java2
-rw-r--r--plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/traceability/DemoTraceParser.java3
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java6
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java2
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ITraceParser.java5
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java28
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java5
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java14
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java12
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitWizard.java3
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java8
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ResourceToTraceUnit.java11
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitFromResourceOperation.java18
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/PublishStdStpTraceability.java8
15 files changed, 95 insertions, 31 deletions
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/traceability/DemoTraceParser.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/traceability/DemoTraceParser.java
index 6e4ca282393..a2f75abef00 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/traceability/DemoTraceParser.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/traceability/DemoTraceParser.java
@@ -48,5 +48,4 @@ public class DemoTraceParser implements ITraceParser {
public boolean addIfEmpty() {
return false;
}
-
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java
index 015934a1d36..8432d2ac628 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java
@@ -256,7 +256,7 @@ public class DetailedTestStatusOld extends AbstractBlam {
// Load Requirements Data
TraceabilityProviderOperation provider =
- new ScriptTraceabilityOperation(scriptDir, requirementsBranch, false, traceHandlers, false, viewId);
+ new ScriptTraceabilityOperation(scriptDir, requirementsBranch, false, traceHandlers, false, viewId, false);
RequirementTraceabilityData traceabilityData = new RequirementTraceabilityData(procedureBranch, provider, viewId);
IStatus status = traceabilityData.initialize(monitor);
diff --git a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/traceability/DemoTraceParser.java b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/traceability/DemoTraceParser.java
index 58ed3412cd5..ddc34d1e4f4 100644
--- a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/traceability/DemoTraceParser.java
+++ b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/traceability/DemoTraceParser.java
@@ -48,5 +48,4 @@ public class DemoTraceParser implements ITraceParser {
public boolean addIfEmpty() {
return false;
}
-
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java
index 54b61173069..b82e8d83d15 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java
@@ -176,9 +176,11 @@ public final class ImportTraceUnitsOperationTest {
boolean isPersistChanges = true;
boolean fileWithMultiPaths = true;
boolean addGuidToSourceFile = false;
+ boolean includeImpd = false;
- IOperation op = new ImportTraceUnitsOperation("Import Trace Units", importToBranch, files, isRecursive,
- isPersistChanges, fileWithMultiPaths, addGuidToSourceFile, DemoTraceability.DEMO_TRACE_UNIT_HANDLER_ID);
+ IOperation op =
+ new ImportTraceUnitsOperation("Import Trace Units", importToBranch, files, isRecursive, isPersistChanges,
+ fileWithMultiPaths, addGuidToSourceFile, includeImpd, DemoTraceability.DEMO_TRACE_UNIT_HANDLER_ID);
Operations.executeWorkAndCheckStatus(op);
}
}
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java
index fdc919c71c8..417fab91b0b 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java
@@ -121,7 +121,7 @@ public class SubsystemFullTraceReport extends AbstractBlam {
File dir = new File(scriptDir);
if (dir.exists()) {
ScriptTraceabilityOperation traceOperation = new ScriptTraceabilityOperation(dir.getParentFile(), branch,
- false, traceHandlers, isGitCodeStructure, viewId);
+ false, traceHandlers, isGitCodeStructure, viewId, false);
Operations.executeWorkAndCheckStatus(traceOperation, monitor);
requirementsToCodeUnits = traceOperation.getRequirementToCodeUnitsMap();
}
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ITraceParser.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ITraceParser.java
index 0d52f0ee157..c93ae81ee90 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ITraceParser.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ITraceParser.java
@@ -27,4 +27,9 @@ public interface ITraceParser {
public boolean isTraceRemovalAllowed();
+ default void setupTraceMatcher(boolean includeImpd) { //
+ }
+
+ default void setupCommentTraceMatcher(boolean inludeImpd) { //
+ }
}
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java
index 1214deb95ab..0f1d17b8c01 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java
@@ -49,11 +49,13 @@ public class ImportTraceabilityPage extends WizardDataTransferPage {
private static final String TRACE_UNIT_HANDLER_GROUP = "Select trace unit parser";
private static final String GIT_CODE_STRUCTURE_GROUP = "Select to use Git codebase";
+ private static final String INCLUDE_IMPD_GROUP = "Include IMPD";
private DirectoryOrFileSelector directoryFileSelector;
private BranchSelectComposite branchSelectComposite;
private final Map<Button, Boolean> traceUnitHandlers;
private boolean isGitCodeStructure = false;
+ private boolean includeImpd = false;
private IResource currentResourceSelection;
@@ -85,6 +87,7 @@ public class ImportTraceabilityPage extends WizardDataTransferPage {
createSourceGroup(composite);
createParserSelectArea(composite);
createGitStructureCheckbox(composite);
+ createIncludeImpdCheckbox(composite);
restoreWidgetValues();
updateWidgetEnablements();
setPageComplete(determinePageCompletion());
@@ -166,6 +169,27 @@ public class ImportTraceabilityPage extends WizardDataTransferPage {
});
}
+ private void createIncludeImpdCheckbox(Composite parent) {
+ Group composite = new Group(parent, SWT.NONE);
+ composite.setText(INCLUDE_IMPD_GROUP);
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Button handlerButton = new Button(composite, SWT.CHECK);
+ handlerButton.setText("Include IMPD");
+ handlerButton.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Object source = e.getSource();
+ if (source instanceof Button) {
+ Button button = (Button) source;
+ includeImpd = button.getSelection();
+ }
+ }
+ });
+ }
+
private void createTraceHandler(Composite parent, String text, String handlerId) {
Button handlerButton = new Button(parent, SWT.CHECK);
handlerButton.setText(text);
@@ -225,6 +249,10 @@ public class ImportTraceabilityPage extends WizardDataTransferPage {
return isGitCodeStructure;
}
+ public boolean includeImpd() {
+ return includeImpd;
+ }
+
@Override
protected boolean allowNewContainerName() {
return false;
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java
index 131b78b647f..6bdaab7e00c 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java
@@ -43,13 +43,14 @@ public class ImportTraceabilityWizard extends Wizard implements IImportWizard {
BranchId branch = mainPage.getSelectedBranch();
File file = mainPage.getImportFile();
boolean isGitBased = mainPage.isGitBased();
+ boolean includeImpd = mainPage.includeImpd();
Collection<TraceHandler> handlers = new LinkedList<>();
for (String handlerId : mainPage.getTraceUnitHandlerIds()) {
handlers.add(TraceUnitExtensionManager.getInstance().getTraceUnitHandlerById(handlerId));
}
- Operations.executeWorkAndCheckStatus(
- new ScriptTraceabilityOperation(file, branch, true, handlers, isGitBased, ArtifactId.SENTINEL));
+ Operations.executeWorkAndCheckStatus(new ScriptTraceabilityOperation(file, branch, true, handlers, isGitBased,
+ ArtifactId.SENTINEL, includeImpd));
} catch (Exception ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, "Traceability Import Error", ex);
}
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java
index 5cefdee6828..3a45f36a2ed 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java
@@ -78,25 +78,27 @@ public class ScriptTraceabilityOperation extends TraceabilityProviderOperation {
private int pathPrefixLength;
private final boolean writeOutResults;
private final boolean isGitBased;
+ private final boolean includeImpd;
- private ScriptTraceabilityOperation(RequirementData requirementData, File file, boolean writeOutResults, Collection<TraceHandler> traceHandlers, boolean isGitBased) throws IOException {
+ private ScriptTraceabilityOperation(RequirementData requirementData, File file, boolean writeOutResults, Collection<TraceHandler> traceHandlers, boolean isGitBased, boolean includeImpd) throws IOException {
super("Importing Traceability", Activator.PLUGIN_ID);
this.file = file;
this.requirementData = requirementData;
this.writeOutResults = writeOutResults;
this.traceHandlers = traceHandlers;
this.isGitBased = isGitBased;
+ this.includeImpd = includeImpd;
charBak = new CharBackedInputStream();
excelWriter = new ExcelXmlWriter(charBak.getWriter());
}
- public ScriptTraceabilityOperation(File file, BranchId branch, boolean writeOutResults, Collection<TraceHandler> traceHandlers, boolean isGitBased, ArtifactId viewId) throws IOException {
- this(new RequirementData(branch, viewId), file, writeOutResults, traceHandlers, isGitBased);
+ public ScriptTraceabilityOperation(File file, BranchId branch, boolean writeOutResults, Collection<TraceHandler> traceHandlers, boolean isGitBased, ArtifactId viewId, boolean includeImpd) throws IOException {
+ this(new RequirementData(branch, viewId), file, writeOutResults, traceHandlers, isGitBased, includeImpd);
}
- public ScriptTraceabilityOperation(File file, BranchId branch, boolean writeOutResults, Collection<? extends IArtifactType> types, boolean withInheritance, Collection<TraceHandler> traceHandlers, boolean isGitBased, ArtifactId viewId) throws IOException {
+ public ScriptTraceabilityOperation(File file, BranchId branch, boolean writeOutResults, Collection<? extends IArtifactType> types, boolean withInheritance, Collection<TraceHandler> traceHandlers, boolean isGitBased, ArtifactId viewId, boolean includeImpd) throws IOException {
this(new RequirementData(branch, types, withInheritance, viewId), file, writeOutResults, traceHandlers,
- isGitBased);
+ isGitBased, includeImpd);
}
@Override
@@ -147,6 +149,8 @@ public class ScriptTraceabilityOperation extends TraceabilityProviderOperation {
CharBuffer buffer = Lib.fileToCharBuffer(sourceFile);
Collection<TraceMark> tracemarks = new LinkedList<>();
for (TraceHandler handler : traceHandlers) {
+ handler.getParser().setupTraceMatcher(includeImpd);
+ handler.getParser().setupCommentTraceMatcher(includeImpd);
Collection<TraceMark> marks = handler.getParser().getTraceMarks(buffer);
tracemarks.addAll(marks);
}
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java
index ec94aa37891..bbdd4741f06 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java
@@ -83,6 +83,9 @@ public class ImportTraceUnitPage extends WizardDataTransferPage {
private static final String ADD_GUID_TO_SOURCE_FILE_TOOLTIP =
"When selected, the GUID will be added to the source file. Note: You will need write access to the files to use this selection.";
+ private static final String INCLUDE_IMPD_BUTTON = "Include IMPD";
+ private static final String INCLUDE_IMPD_TOOLTIP = "Select to include IMPD trace marks.";
+
private static final String SELECTED_TRACE_HANDLERS_KEY = "trace.handlers";
private static final String BRANCH_KEY = "branch.selected";
private static final String SOURCE_URI_KEY = "source.uri";
@@ -91,6 +94,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage {
private static final String IS_FOLDER_RECURSION_KEY = "is.folder.recurse.allowed";
private static final String IS_FILE_WITH_MULTI_PATHS_KEY = "is.file.with.multi.paths";
private static final String IS_ADD_GUID_TO_SOURCE_KEY = "is.add.guid.to.source";
+ private static final String INCLUDE_IMPD_KEY = "is.impd.included";
private DirectoryOrFileSelector directoryFileSelector;
private BranchSelectComposite branchSelectComposite;
@@ -101,6 +105,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage {
private final MutableBoolean isAddGuidToSourceFileAllowed;
private final Map<Button, Boolean> traceUnitHandlers;
private final Map<String, Button> optionButtons;
+ private final MutableBoolean isImpdIncluded;
public ImportTraceUnitPage(IStructuredSelection selection) {
super(PAGE_NAME);
@@ -113,6 +118,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage {
this.isArtifactPersistanceAllowed = new MutableBoolean(false);
this.isFileContainingMultiplePaths = new MutableBoolean(false);
this.isAddGuidToSourceFileAllowed = new MutableBoolean(true);
+ this.isImpdIncluded = new MutableBoolean(false);
if (selection != null && selection.size() >= 1) {
currentResourceSelection = new LinkedList<>();
@@ -277,6 +283,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage {
isFileContainingMultiplePaths);
createOptionButton(composite, IS_ADD_GUID_TO_SOURCE_KEY, ADD_GUID_TO_SOURCE_FILE_BUTTON,
ADD_GUID_TO_SOURCE_FILE_TOOLTIP, isAddGuidToSourceFileAllowed);
+ createOptionButton(composite, INCLUDE_IMPD_KEY, INCLUDE_IMPD_BUTTON, INCLUDE_IMPD_TOOLTIP, isImpdIncluded);
}
private void createOptionButton(Composite parent, String buttonId, String buttonText, String buttonToolTip, final MutableBoolean toModify) {
@@ -370,6 +377,10 @@ public class ImportTraceUnitPage extends WizardDataTransferPage {
return isAddGuidToSourceFileAllowed.getValue();
}
+ public boolean isImpdIncluded() {
+ return isImpdIncluded.getValue();
+ }
+
public String[] getTraceUnitHandlerIds() {
List<String> selectedIds = new ArrayList<>();
for (Button button : traceUnitHandlers.keySet()) {
@@ -458,6 +469,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage {
settings.put(IS_FOLDER_RECURSION_KEY, isFolderRecursionAllowed());
settings.put(IS_FILE_WITH_MULTI_PATHS_KEY, isFileContainingMultiplePaths());
settings.put(IS_ADD_GUID_TO_SOURCE_KEY, isAddGuidToSourceFileAllowed());
+ settings.put(INCLUDE_IMPD_KEY, isImpdIncluded());
}
}
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitWizard.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitWizard.java
index a41e33f52f9..c9ddaf6575c 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitWizard.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitWizard.java
@@ -45,8 +45,9 @@ public class ImportTraceUnitWizard extends Wizard implements IImportWizard {
String[] traceUnitHandlerIds = page.getTraceUnitHandlerIds();
boolean fileWithMultiPaths = page.isFileContainingMultiplePaths();
boolean addGuidToSourceFile = page.isAddGuidToSourceFileAllowed();
+ boolean includeImpd = page.isImpdIncluded();
IOperation op = new ImportTraceUnitsOperation("Import Trace Units", importToBranch, sources, isRecursive,
- isPersistChanges, fileWithMultiPaths, addGuidToSourceFile, traceUnitHandlerIds);
+ isPersistChanges, fileWithMultiPaths, addGuidToSourceFile, includeImpd, traceUnitHandlerIds);
Operations.executeAsJob(op, true);
page.saveWidgetValues();
} catch (Exception ex) {
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java
index 3304fd531bc..9fdcba4440a 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java
@@ -31,8 +31,9 @@ public class ImportTraceUnitsOperation extends AbstractOperation {
private final boolean addGuidToSourceFile;
private final Iterable<URI> sources;
private final String[] traceTypeIds;
+ private final boolean includeImpd;
- public ImportTraceUnitsOperation(String jobName, BranchId importToBranch, Iterable<URI> sources, boolean isRecursive, boolean isPersistChanges, boolean fileWithMultiPaths, boolean addGuidToSourceFile, String... traceHandlerIds) {
+ public ImportTraceUnitsOperation(String jobName, BranchId importToBranch, Iterable<URI> sources, boolean isRecursive, boolean isPersistChanges, boolean fileWithMultiPaths, boolean addGuidToSourceFile, boolean includeImpd, String... traceHandlerIds) {
super("ImportTraceUnitsOperation", Activator.PLUGIN_ID);
this.importToBranch = importToBranch;
this.sources = sources;
@@ -40,6 +41,7 @@ public class ImportTraceUnitsOperation extends AbstractOperation {
this.isPersistChanges = isPersistChanges;
this.fileWithMultiPaths = fileWithMultiPaths;
this.addGuidToSourceFile = addGuidToSourceFile;
+ this.includeImpd = includeImpd;
if (traceHandlerIds == null) {
traceTypeIds = new String[0];
} else {
@@ -52,10 +54,10 @@ public class ImportTraceUnitsOperation extends AbstractOperation {
protected void doWork(IProgressMonitor monitor) throws OseeCoreException {
if (isPersistChanges) {
TraceUnitFromResourceOperation.importTraceFromTestUnits(monitor, sources, isRecursive, fileWithMultiPaths,
- importToBranch, addGuidToSourceFile, traceTypeIds);
+ importToBranch, addGuidToSourceFile, includeImpd, traceTypeIds);
} else {
TraceUnitFromResourceOperation.printTraceFromTestUnits(monitor, sources, isRecursive, fileWithMultiPaths,
- addGuidToSourceFile, traceTypeIds);
+ addGuidToSourceFile, includeImpd, traceTypeIds);
}
}
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ResourceToTraceUnit.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ResourceToTraceUnit.java
index b1fdb2b230e..85097155b78 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ResourceToTraceUnit.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ResourceToTraceUnit.java
@@ -41,12 +41,14 @@ public class ResourceToTraceUnit {
private final UriResourceContentFinder resourceFinder;
private final Set<ITraceUnitProcessor> traceProcessors;
private final HashCollection<ITraceUnitResourceLocator, ITraceParser> traceUnitHandlers;
+ private final boolean includeImpd;
- public ResourceToTraceUnit(final Iterable<URI> sources, final boolean isRecursionAllowed, final boolean isFileWithMultiplePaths) {
+ public ResourceToTraceUnit(final Iterable<URI> sources, final boolean isRecursionAllowed, final boolean isFileWithMultiplePaths, boolean includeImpd) {
super();
this.traceUnitHandlers = new HashCollection<>();
this.traceProcessors = Collections.synchronizedSet(new HashSet<ITraceUnitProcessor>());
this.resourceFinder = new UriResourceContentFinder(sources, isRecursionAllowed, isFileWithMultiplePaths);
+ this.includeImpd = includeImpd;
}
public void addTraceProcessor(ITraceUnitProcessor traceProcessor) {
@@ -85,7 +87,7 @@ public class ResourceToTraceUnit {
for (ITraceUnitResourceLocator locator : traceUnitHandlers.keySet()) {
Collection<ITraceParser> parsers = traceUnitHandlers.getValues(locator);
for (ITraceParser parser : parsers) {
- TraceUnitCollector testUnitCollector = new TraceUnitCollector(locator, parser);
+ TraceUnitCollector testUnitCollector = new TraceUnitCollector(locator, parser, includeImpd);
resourceFinder.addLocator(locator, testUnitCollector);
collectors.add(testUnitCollector);
}
@@ -177,15 +179,18 @@ public class ResourceToTraceUnit {
private final ITraceParser traceParser;
private final ITraceUnitResourceLocator traceUnitLocator;
private final Map<IArtifactType, Map<String, TraceUnit>> traceUnitToTraceMarks;
+ private final boolean includeImpd;
- public TraceUnitCollector(ITraceUnitResourceLocator traceUnitLocator, ITraceParser traceParser) {
+ public TraceUnitCollector(ITraceUnitResourceLocator traceUnitLocator, ITraceParser traceParser, boolean includeImpd) {
this.traceParser = traceParser;
this.traceUnitLocator = traceUnitLocator;
this.traceUnitToTraceMarks = new HashMap<>();
+ this.includeImpd = includeImpd;
}
@Override
public void onResourceFound(URI uriPath, String name, CharBuffer fileBuffer) throws OseeCoreException {
+ traceParser.setupTraceMatcher(includeImpd);
IArtifactType traceUnitType = traceUnitLocator.getTraceUnitType(name, fileBuffer);
if (!traceUnitType.equals(ITraceUnitResourceLocator.UNIT_TYPE_UNKNOWN)) {
Collection<TraceMark> traceMarks = traceParser.getTraceMarks(fileBuffer);
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitFromResourceOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitFromResourceOperation.java
index 24e68a24351..1a3603dd197 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitFromResourceOperation.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitFromResourceOperation.java
@@ -23,7 +23,6 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.osee.define.traceability.TraceUnitExtensionManager;
import org.eclipse.osee.define.traceability.TraceUnitExtensionManager.TraceHandler;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.enums.BranchType;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
@@ -38,11 +37,12 @@ public class TraceUnitFromResourceOperation {
return TraceUnitExtensionManager.getInstance().getTraceUnitHandlerIds();
}
- private static ResourceToTraceUnit getResourceToTestUnit(Iterable<URI> sources, boolean isRecursive, boolean isFileWithMultiplePaths, boolean addGuidToSourceFile, String... testUnitTraceIds) throws OseeCoreException {
+ private static ResourceToTraceUnit getResourceToTestUnit(Iterable<URI> sources, boolean isRecursive, boolean isFileWithMultiplePaths, boolean addGuidToSourceFile, boolean includeImpd, String... testUnitTraceIds) throws OseeCoreException {
checkSourceArgument(sources);
checkTraceUnitHandlerIdsArgument(testUnitTraceIds);
- ResourceToTraceUnit operation = new ResourceToTraceUnit(sources, isRecursive, isFileWithMultiplePaths);
+ ResourceToTraceUnit operation =
+ new ResourceToTraceUnit(sources, isRecursive, isFileWithMultiplePaths, includeImpd);
TraceUnitExtensionManager traceManager = TraceUnitExtensionManager.getInstance();
for (String traceUnitHandlerId : testUnitTraceIds) {
@@ -54,9 +54,9 @@ public class TraceUnitFromResourceOperation {
return operation;
}
- public static void printTraceFromTestUnits(IProgressMonitor monitor, Iterable<URI> sources, boolean isRecursive, boolean isFileWithMultiplePaths, boolean addGuidToSourceFile, String... traceUnitHandlerIds) throws OseeCoreException {
- ResourceToTraceUnit operation =
- getResourceToTestUnit(sources, isRecursive, isFileWithMultiplePaths, addGuidToSourceFile, traceUnitHandlerIds);
+ public static void printTraceFromTestUnits(IProgressMonitor monitor, Iterable<URI> sources, boolean isRecursive, boolean isFileWithMultiplePaths, boolean addGuidToSourceFile, boolean includeImpd, String... traceUnitHandlerIds) throws OseeCoreException {
+ ResourceToTraceUnit operation = getResourceToTestUnit(sources, isRecursive, isFileWithMultiplePaths,
+ addGuidToSourceFile, includeImpd, traceUnitHandlerIds);
if (monitor == null) {
monitor = new NullProgressMonitor();
}
@@ -64,11 +64,11 @@ public class TraceUnitFromResourceOperation {
operation.execute(monitor);
}
- public static void importTraceFromTestUnits(IProgressMonitor monitor, Iterable<URI> sources, boolean isRecursive, boolean isFileWithMultiplePaths, BranchId importToBranch, boolean addGuidToSourceFile, String... traceUnitHandlerIds) throws OseeCoreException {
+ public static void importTraceFromTestUnits(IProgressMonitor monitor, Iterable<URI> sources, boolean isRecursive, boolean isFileWithMultiplePaths, BranchId importToBranch, boolean addGuidToSourceFile, boolean includeImpd, String... traceUnitHandlerIds) throws OseeCoreException {
checkBranchArguments(importToBranch);
- ResourceToTraceUnit operation =
- getResourceToTestUnit(sources, isRecursive, isFileWithMultiplePaths, addGuidToSourceFile, traceUnitHandlerIds);
+ ResourceToTraceUnit operation = getResourceToTestUnit(sources, isRecursive, isFileWithMultiplePaths,
+ addGuidToSourceFile, includeImpd, traceUnitHandlerIds);
if (monitor == null) {
monitor = new NullProgressMonitor();
}
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/PublishStdStpTraceability.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/PublishStdStpTraceability.java
index 2acce6d67a7..adab83257b5 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/PublishStdStpTraceability.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/PublishStdStpTraceability.java
@@ -67,6 +67,8 @@ public class PublishStdStpTraceability extends AbstractBlam {
"<XWidget xwidgetType=\"XCheckBox\" displayName=\"Search Git Code Structure\" labelAfter=\"true\" horizontalLabel=\"true\" defaultValue=\"false\" />";
private static final String TRACE_HANDLER_CHECKBOX =
"<XWidget xwidgetType=\"XCheckBox\" displayName=\"%s\" labelAfter=\"true\" horizontalLabel=\"true\"/>";
+ private static final String includeImpd =
+ "<XWidget xwidgetType=\"XCheckBox\" displayName=\"Include IMPD\" labelAfter=\"true\" horizontalLabel=\"true\" defaultValue=\"false\" />";
private Collection<String> availableTraceHandlers;
private XCombo branchViewWidget;
@@ -106,6 +108,9 @@ public class PublishStdStpTraceability extends AbstractBlam {
builder.append(
"<XWidget xwidgetType=\"XLabel\" displayName=\"=== For traceability stored in test scripts, select the following ===\" />");
builder.append(useGitCodeStructure);
+ builder.append(
+ "<XWidget xwidgetType=\"XLabel\" displayName=\"=== To include IMPD, select the following ===\" />");
+ builder.append(includeImpd);
availableTraceHandlers = new LinkedList<>();
builder.append("<XWidget xwidgetType=\"XLabel\" displayName=\"Select appropriate script parser:\" />");
Collection<String> traceHandlers = TraceUnitExtensionManager.getInstance().getAllTraceHandlerNames();
@@ -160,8 +165,9 @@ public class PublishStdStpTraceability extends AbstractBlam {
provider = new BranchTraceabilityOperation(requirementsBranch, types, searchInherited, viewId);
} else {
boolean isGitBased = variableMap.getBoolean("Search Git Code Structure");
+ boolean includeImpd = variableMap.getBoolean("Include IMPD");
provider = new ScriptTraceabilityOperation(scriptDir, requirementsBranch, false, types, searchInherited,
- traceHandlers, isGitBased, viewId);
+ traceHandlers, isGitBased, viewId, includeImpd);
}
RequirementTraceabilityData traceabilityData =
new RequirementTraceabilityData(requirementsBranch, provider, viewId);

Back to the top