Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBranden Phillips2021-01-07 23:05:46 +0000
committerBranden Phillips2021-01-13 16:18:08 +0000
commit8323a542a024e99370427bed0b9bc7cb29e1cd4c (patch)
tree5b4f76a38f7e7bad6cfb0b058240fc3005100b01
parent42a52f8843dc5ed00fd71e3c77af0f6d74ccd92f (diff)
downloadorg.eclipse.osee-8323a542a024e99370427bed0b9bc7cb29e1cd4c.tar.gz
org.eclipse.osee-8323a542a024e99370427bed0b9bc7cb29e1cd4c.tar.xz
org.eclipse.osee-8323a542a024e99370427bed0b9bc7cb29e1cd4c.zip
bug[TW18239]: Allow empty values in alt-left click editing for NumberFormat attributes
Change-Id: Ic7ae48a366ca34e508cc36f09d5028398427ecce Signed-off-by: Branden Phillips <branden.w.phillips@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/prompt/StringHandlePromptChange.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialog.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/prompt/StringHandlePromptChange.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/prompt/StringHandlePromptChange.java
index b590fc619ca..c1fbfe4a8bb 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/prompt/StringHandlePromptChange.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/prompt/StringHandlePromptChange.java
@@ -86,7 +86,7 @@ public class StringHandlePromptChange implements IHandlePromptChange {
private static String getSafeValue(String value, NumberFormat format, AttributeTypeToken attributeType) {
String toReturn = value;
- if (format != null) {
+ if (format != null && !toReturn.isEmpty()) {
try {
if (attributeType.isInteger()) {
toReturn = String.valueOf(format.parse(value).intValue());
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialog.java
index ba1ff84eea6..33fa1e952f0 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialog.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialog.java
@@ -272,7 +272,7 @@ public class EntryDialog extends MessageDialog {
* @return true if entry is valid
*/
public boolean isEntryValid() {
- if (numberFormat == null) {
+ if (numberFormat == null || text.isEmpty()) {
return true;
}

Back to the top