Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2017-05-12 14:41:06 -0400
committerDonald Dunne2017-05-15 13:02:26 -0400
commitbeadbb90c89cf888ca0ee98e0a0c2935028920b2 (patch)
tree7c79cc41ea2f952677c520a9e4bda3cc45f6aed9
parentd228676a63e0bd41af6be545f93694ae8474bda9 (diff)
downloadorg.eclipse.osee-beadbb90c89cf888ca0ee98e0a0c2935028920b2.tar.gz
org.eclipse.osee-beadbb90c89cf888ca0ee98e0a0c2935028920b2.tar.xz
org.eclipse.osee-beadbb90c89cf888ca0ee98e0a0c2935028920b2.zip
feature[ats_ATS377299]: HLR - Add ATS workflow support for tracked operations0.25.0.v201705120113-NR
-rw-r--r--plugins/org.eclipse.osee.framework.access.provider/.project6
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XButton.java6
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XButtonWithLabelDam.java70
3 files changed, 80 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.framework.access.provider/.project b/plugins/org.eclipse.osee.framework.access.provider/.project
index 013f2b81c4..17078c5e8f 100644
--- a/plugins/org.eclipse.osee.framework.access.provider/.project
+++ b/plugins/org.eclipse.osee.framework.access.provider/.project
@@ -6,6 +6,11 @@
</projects>
<buildSpec>
<buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
@@ -29,5 +34,6 @@
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XButton.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XButton.java
index 3290825f33..d1acf79a18 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XButton.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XButton.java
@@ -29,8 +29,9 @@ public class XButton extends XButtonCommon {
protected Label button;
private Composite parent;
- private Composite bComp;
+ protected Composite bComp;
private boolean labelAfter = true;
+ protected int numColumns = 2;
public XButton(String displayLabel) {
super(displayLabel);
@@ -57,7 +58,7 @@ public class XButton extends XButtonCommon {
this.parent = parent;
bComp = new Composite(parent, SWT.NONE);
- bComp.setLayout(ALayout.getZeroMarginLayout(2, false));
+ bComp.setLayout(ALayout.getZeroMarginLayout(numColumns, false));
bComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
if (toolkit != null) {
toolkit.adapt(bComp);
@@ -106,6 +107,7 @@ public class XButton extends XButtonCommon {
labelWidget.setToolTipText(getToolTip());
}
}
+
button.setLayoutData(gd);
validate();
button.setEnabled(isEditable());
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XButtonWithLabelDam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XButtonWithLabelDam.java
new file mode 100644
index 0000000000..df0278819d
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XButtonWithLabelDam.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2017 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.framework.ui.skynet.widgets;
+
+import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+/**
+ * @author Donald G. Dunne
+ */
+public abstract class XButtonWithLabelDam extends XButton implements IArtifactWidget {
+
+ private Artifact artifact;
+ protected Label resultsLabelWidget;
+
+ public XButtonWithLabelDam(String displayLabel, String toolTip, Image image) {
+ super(displayLabel);
+ setImage(image);
+ setToolTip(toolTip);
+ }
+
+ @Override
+ protected void createControls(Composite parent, int horizontalSpan) {
+ numColumns = 3;
+ super.createControls(parent, horizontalSpan);
+ resultsLabelWidget = new Label(bComp, SWT.NONE);
+ resultsLabelWidget.setText(getResultsText());
+ }
+
+ protected abstract String getResultsText();
+
+ @Override
+ public void setArtifact(Artifact artifact) throws OseeCoreException {
+ this.artifact = artifact;
+ }
+
+ @Override
+ public Artifact getArtifact() throws OseeCoreException {
+ return artifact;
+ }
+
+ @Override
+ public Result isDirty() {
+ return Result.FalseResult;
+ }
+
+ @Override
+ public void revert() {
+ // do nothing
+ }
+
+ @Override
+ public void saveToArtifact() {
+ // do nothing
+ }
+
+}

Back to the top