summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwilk2011-01-19 14:06:56 (EST)
committer Ryan D. Brooks2011-01-19 14:06:56 (EST)
commit2aeb90c168d14bef8af0a1c1a25797375cbba19f (patch)
treed125607b221918e98a01417e8dec074d30622fb2
parent2e8baee6dbfaf7b5065cd5f4e6f3bcdcd00e5ffa (diff)
downloadorg.eclipse.osee-2aeb90c168d14bef8af0a1c1a25797375cbba19f.zip
org.eclipse.osee-2aeb90c168d14bef8af0a1c1a25797375cbba19f.tar.gz
org.eclipse.osee-2aeb90c168d14bef8af0a1c1a25797375cbba19f.tar.bz2
feature[bgz_334939]: Enable XComboWidget to accept SWT style flags
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/VersionArtifact.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateCombo.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XTeamDefinitionCombo.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TaskOptionStatusDialog.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamVersionListDialog.java4
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorImportTab.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/sections/BlamInputSection.java6
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XArtifactTypeComboViewer.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XAttributeTypeComboViewer.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XComboViewer.java21
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidget.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/FrameworkXWidgetProvider.java3
13 files changed, 39 insertions, 27 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/VersionArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/VersionArtifact.java
index af941fc..6983454 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/VersionArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/VersionArtifact.java
@@ -167,6 +167,15 @@ public class VersionArtifact extends Artifact implements ICommitConfigArtifact {
}
}
+ public Branch getBaselineBranch() throws OseeCoreException {
+ String branchGuid = getSoleAttributeValue(AtsAttributeTypes.BaselineBranchGuid, "");
+ if (Strings.isValid(branchGuid)) {
+ return BranchManager.getBranchByGuid(branchGuid);
+ } else {
+ return getTeamDefinitionArtifact().getTeamBranch();
+ }
+ }
+
public Date getEstimatedReleaseDate() throws OseeCoreException {
return getSoleAttributeValue(AtsAttributeTypes.EstimatedReleaseDate, null);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java
index 5f4d8db..cd0f6f8 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java
@@ -516,7 +516,7 @@ public class SMAWorkFlowSection extends SectionPart {
Label label = toolkit.createLabel(comp, "to");
label.setBackground(AtsUtil.ACTIVE_COLOR);
- transitionToStateCombo = new XComboViewer("Transition To State Combo");
+ transitionToStateCombo = new XComboViewer("Transition To State Combo", SWT.NONE);
transitionToStateCombo.setDisplayLabel(false);
List<Object> allPages = new ArrayList<Object>();
for (StateDefinition nextState : sma.getToStates()) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateCombo.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateCombo.java
index 0fb3d5f..0bb909a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateCombo.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateCombo.java
@@ -21,6 +21,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.XWidget;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinitionFactory;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
public class XStateCombo extends XComboViewer {
@@ -29,7 +30,7 @@ public class XStateCombo extends XComboViewer {
private String selectedState = null;
public XStateCombo() {
- super("State");
+ super("State", SWT.NONE);
ensurePopulated();
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XTeamDefinitionCombo.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XTeamDefinitionCombo.java
index 4783a96..b2d680c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XTeamDefinitionCombo.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XTeamDefinitionCombo.java
@@ -19,6 +19,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.ui.skynet.widgets.XComboViewer;
import org.eclipse.osee.framework.ui.skynet.widgets.XModifiedListener;
import org.eclipse.osee.framework.ui.skynet.widgets.XWidget;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
public class XTeamDefinitionCombo extends XComboViewer {
@@ -26,7 +27,7 @@ public class XTeamDefinitionCombo extends XComboViewer {
private Artifact selectedTeamDef = null;
public XTeamDefinitionCombo() {
- super("Team Definition");
+ super("Team Definition", SWT.READ_ONLY);
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TaskOptionStatusDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TaskOptionStatusDialog.java
index 8883e5f..d58c78e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TaskOptionStatusDialog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TaskOptionStatusDialog.java
@@ -27,6 +27,7 @@ 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.widgets.XComboViewer;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
@@ -38,7 +39,7 @@ import org.eclipse.swt.widgets.Shell;
*/
public class TaskOptionStatusDialog extends SMAStatusDialog {
- XComboViewer resolutionCombo = new XComboViewer("Resolution");
+ XComboViewer resolutionCombo = new XComboViewer("Resolution", SWT.NONE);
private final List<TaskResOptionDefinition> options;
private final Map<String, TaskResOptionDefinition> nameToResDef = new HashMap<String, TaskResOptionDefinition>();
private TaskResOptionDefinition selectedOption;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamVersionListDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamVersionListDialog.java
index 2776786..8f29045 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamVersionListDialog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamVersionListDialog.java
@@ -39,8 +39,8 @@ import org.eclipse.ui.dialogs.SelectionDialog;
*/
public class TeamVersionListDialog extends SelectionDialog {
- XComboViewer teamCombo = new XComboViewer("Team");
- XComboViewer versionCombo = new XComboViewer("Version");
+ XComboViewer teamCombo = new XComboViewer("Team", SWT.READ_ONLY);
+ XComboViewer versionCombo = new XComboViewer("Version", SWT.READ_ONLY);
VersionArtifact selectedVersion = null;
TeamDefinitionArtifact selectedTeamDef = null;
private final Active active;
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorImportTab.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorImportTab.java
index a86a17a..9cd71a5 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorImportTab.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorImportTab.java
@@ -103,7 +103,7 @@ public class CoverageEditorImportTab extends FormPage {
managedForm.getMessageManager().setAutoUpdate(false);
- combo = new XComboViewer("Select Import Blam");
+ combo = new XComboViewer("Select Import Blam", SWT.READ_ONLY);
combo.setLabelProvider(labelProvider);
combo.setContentProvider(new ArrayTreeContentProvider());
combo.createWidgets(managedForm, scrolledForm.getBody(), 1);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/sections/BlamInputSection.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/sections/BlamInputSection.java
index 5009b7a..ad43fd0 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/sections/BlamInputSection.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/sections/BlamInputSection.java
@@ -56,7 +56,6 @@ public class BlamInputSection extends BaseBlamSection {
section.setText("Parameters");
section.setLayout(new GridLayout());
section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- updateDataPart();
}
public VariableMap getData() throws OseeArgumentException {
@@ -116,11 +115,6 @@ public class BlamInputSection extends BaseBlamSection {
}
@Override
- public void dispose() {
- super.dispose();
- }
-
- @Override
public void refresh() {
super.refresh();
updateDataPart();
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XArtifactTypeComboViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XArtifactTypeComboViewer.java
index 3611316..be457c5 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XArtifactTypeComboViewer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XArtifactTypeComboViewer.java
@@ -16,6 +16,7 @@ import org.eclipse.osee.framework.core.model.type.ArtifactType;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
/**
@@ -28,7 +29,7 @@ public class XArtifactTypeComboViewer extends XComboViewer {
private ArtifactType selectedArtifactType = null;
public XArtifactTypeComboViewer() {
- super("Artifact Type");
+ super("Artifact Type", SWT.READ_ONLY);
}
@Override
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XAttributeTypeComboViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XAttributeTypeComboViewer.java
index 27be8e2..ae3b5c5 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XAttributeTypeComboViewer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XAttributeTypeComboViewer.java
@@ -16,6 +16,7 @@ import org.eclipse.osee.framework.core.model.type.AttributeType;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.attribute.AttributeTypeManager;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
/**
@@ -28,7 +29,7 @@ public class XAttributeTypeComboViewer extends XComboViewer {
private AttributeType selectedAttributeType = null;
public XAttributeTypeComboViewer() {
- super("AttributeType Type");
+ super("AttributeType Type", SWT.READ_ONLY);
}
@Override
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XComboViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XComboViewer.java
index b3b4fbc..ecd2ba4 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XComboViewer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XComboViewer.java
@@ -41,7 +41,7 @@ import org.eclipse.swt.widgets.Label;
* @author Donald G. Dunne
*/
public class XComboViewer extends GenericXWidget {
-
+ private final int comboWidgetSWTStyle;
private ComboViewer comboViewer;
private Composite parent;
private Composite composite;
@@ -66,10 +66,11 @@ public class XComboViewer extends GenericXWidget {
private int widthHint;
private int heightHint;
- public XComboViewer(String displayLabel) {
+ public XComboViewer(String displayLabel, int comboWidgetSWTStyle) {
super(displayLabel);
contentProvider = new ArrayContentProvider();
labelProvider = new ArtifactLabelProvider();
+ this.comboWidgetSWTStyle = comboWidgetSWTStyle;
}
@Override
@@ -106,11 +107,16 @@ public class XComboViewer extends GenericXWidget {
}
/**
- * Create List Widgets. Widgets Created: List: horizonatalSpan takes up 2 columns; horizontalSpan must be >=2
+ * Create List Widgets. <br>
+ * <br>
+ * Widgets Created: <li>List: horizonatalSpan takes up 2 columns; <br>
+ *
+ * @param horizontalSpan horizontalSpan must be >=2
+ * @param comboWidgetSWTStyle style of the widget providing the combo, usually {@code SWT.READ_ONLY} or
+ * {@code SWT.NONE}
*/
@Override
protected void createControls(Composite parent, int horizontalSpan) {
-
this.parent = parent;
composite = null;
@@ -122,9 +128,8 @@ public class XComboViewer extends GenericXWidget {
if (isDisplayLabel() && verticalLabel) {
composite = new Composite(parent, SWT.NONE);
- int numColumns = 1;
GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = numColumns;
+ gridLayout.numColumns = 1;
composite.setLayout(gridLayout);
GridData gd = new GridData(GridData.FILL_BOTH);
gd.horizontalSpan = horizontalSpan;
@@ -142,7 +147,7 @@ public class XComboViewer extends GenericXWidget {
}
}
- comboViewer = new ComboViewer(composite, SWT.NONE);
+ comboViewer = new ComboViewer(composite, comboWidgetSWTStyle);
comboViewer.setContentProvider(contentProvider);
comboViewer.setLabelProvider(labelProvider);
if (sorter != null) {
@@ -275,4 +280,4 @@ public class XComboViewer extends GenericXWidget {
return getSelected();
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidget.java
index 80e37d5..0c15ba0 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidget.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidget.java
@@ -204,9 +204,7 @@ public abstract class XWidget {
isNotificationAllowed.setValue(areAllowed);
}
- protected void createControls(Composite parent, int horizontalSpan) {
- // provided for subclass implementation
- }
+ protected abstract void createControls(Composite parent, int horizontalSpan);
public final void createWidgets(Composite parent, int horizontalSpan) {
setNotificationsAllowed(false);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/FrameworkXWidgetProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/FrameworkXWidgetProvider.java
index 19d702b..726639d 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/FrameworkXWidgetProvider.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/FrameworkXWidgetProvider.java
@@ -72,6 +72,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.XTextDam;
import org.eclipse.osee.framework.ui.skynet.widgets.XTextFlatDam;
import org.eclipse.osee.framework.ui.skynet.widgets.XTextResourceDropDam;
import org.eclipse.osee.framework.ui.skynet.widgets.XWidget;
+import org.eclipse.swt.SWT;
/**
* @author Jeff C. Phillips
@@ -247,7 +248,7 @@ public final class FrameworkXWidgetProvider {
combo.setDefaultSelectionAllowed(true);
}
} else if (xWidgetName.startsWith("XComboViewer")) {
- xWidget = new XComboViewer(name);
+ xWidget = new XComboViewer(name, SWT.NONE);
} else if (xWidgetName.startsWith("XCombo")) {
String values[] =
xWidgetLayoutData.getDynamicXWidgetLayout().getOptionResolver().getWidgetOptions(xWidgetLayoutData);