Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid W. Miller2016-01-20 14:39:29 +0000
committerDavid Miller2016-01-21 16:01:20 +0000
commit08566a74201ff7be10b26bd69442446bb1c86043 (patch)
tree8b7cb404542b08b17c0200ee2a001c0ac8569de1 /plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java
parent1b857215763906febddc8bb0975e27f99fb2a5d7 (diff)
downloadorg.eclipse.osee-08566a74201ff7be10b26bd69442446bb1c86043.tar.gz
org.eclipse.osee-08566a74201ff7be10b26bd69442446bb1c86043.tar.xz
org.eclipse.osee-08566a74201ff7be10b26bd69442446bb1c86043.zip
bug[ats_ATS249282]: Fix subsystem for trace tools
Diffstat (limited to 'plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java')
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java33
1 files changed, 30 insertions, 3 deletions
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 b30fbd39164..b1bb3883a3d 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
@@ -48,10 +48,12 @@ public class ImportTraceabilityPage extends WizardDataTransferPage {
public static final String PAGE_NAME = "org.eclipse.osee.define.wizardPage.importTraceabilityPage";
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 DirectoryOrFileSelector directoryFileSelector;
private BranchSelectComposite branchSelectComposite;
private final Map<Button, Boolean> traceUnitHandlers;
+ private boolean isGitCodeStructure = false;
private IResource currentResourceSelection;
@@ -65,7 +67,7 @@ public class ImportTraceabilityPage extends WizardDataTransferPage {
if (selection != null && selection.size() == 1) {
Object firstElement = selection.getFirstElement();
if (firstElement instanceof IAdaptable) {
- currentResourceSelection = (IResource) ((IAdaptable) firstElement).getAdapter(IResource.class);
+ currentResourceSelection = ((IAdaptable) firstElement).getAdapter(IResource.class);
}
}
}
@@ -82,7 +84,7 @@ public class ImportTraceabilityPage extends WizardDataTransferPage {
createSourceGroup(composite);
createParserSelectArea(composite);
-
+ createGitStructureCheckbox(composite);
restoreWidgetValues();
updateWidgetEnablements();
setPageComplete(determinePageCompletion());
@@ -93,7 +95,7 @@ public class ImportTraceabilityPage extends WizardDataTransferPage {
/**
* The <code>WizardResourceImportPage</code> implementation of this <code>Listener</code> method handles all events
* and enablements for controls on this page. Subclasses may extend.
- *
+ *
* @param event Event
*/
@Override
@@ -143,6 +145,27 @@ public class ImportTraceabilityPage extends WizardDataTransferPage {
}
}
+ private void createGitStructureCheckbox(Composite parent) {
+ Group composite = new Group(parent, SWT.NONE);
+ composite.setText(GIT_CODE_STRUCTURE_GROUP);
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Button handlerButton = new Button(composite, SWT.CHECK);
+ handlerButton.setText("Use Git Code Structure");
+ handlerButton.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Object source = e.getSource();
+ if (source instanceof Button) {
+ Button button = (Button) source;
+ isGitCodeStructure = button.getSelection();
+ }
+ }
+ });
+ }
+
private void createTraceHandler(Composite parent, String text, String handlerId) {
Button handlerButton = new Button(parent, SWT.CHECK);
handlerButton.setText(text);
@@ -198,6 +221,10 @@ public class ImportTraceabilityPage extends WizardDataTransferPage {
return branchSelectComposite.getSelectedBranch();
}
+ public boolean isGitBased() {
+ return isGitCodeStructure;
+ }
+
@Override
protected boolean allowNewContainerName() {
return false;

Back to the top