diff options
author | ddunne | 2012-10-11 17:08:19 +0000 |
---|---|---|
committer | Roberto E. Escobar | 2012-10-11 17:08:19 +0000 |
commit | e1c960d213c28387e4a7f57e122240cb8b4331f5 (patch) | |
tree | a3f2a27de43dbddf3a88a168e9566722291d3e37 /plugins | |
parent | 8f55b58997f8c602f3fe6adb121cc3ce8ae39fc3 (diff) | |
download | org.eclipse.osee-e1c960d213c28387e4a7f57e122240cb8b4331f5.tar.gz org.eclipse.osee-e1c960d213c28387e4a7f57e122240cb8b4331f5.tar.xz org.eclipse.osee-e1c960d213c28387e4a7f57e122240cb8b4331f5.zip |
refinement: Handle exception with result message in ConvertAtsDslToWorkDefinition
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/convert/ConvertAtsDslToWorkDefinition.java | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/convert/ConvertAtsDslToWorkDefinition.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/convert/ConvertAtsDslToWorkDefinition.java index 712079d3174..c23b2d8960d 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/convert/ConvertAtsDslToWorkDefinition.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/convert/ConvertAtsDslToWorkDefinition.java @@ -363,14 +363,19 @@ public class ConvertAtsDslToWorkDefinition { private IAtsWidgetDefinition convertDslWidgetDef(WidgetDef dslWidgetDef, String SHEET_NAME) { WidgetDefinition widgetDef = new WidgetDefinition(Strings.unquote(dslWidgetDef.getName())); widgetDef.setAttributeName(dslWidgetDef.getAttributeName()); - // Set description if model defines it - if (Strings.isValid(dslWidgetDef.getDescription())) { - widgetDef.setDescription(dslWidgetDef.getDescription()); - } - // Else, set if AtsAttributeTypes defines it - else if (Strings.isValid(dslWidgetDef.getAttributeName()) && attrResolver.isAttributeNamed(dslWidgetDef.getAttributeName()) && Strings.isValid(attrResolver.getDescription(dslWidgetDef.getAttributeName()))) { - widgetDef.setDescription(attrResolver.getDescription(dslWidgetDef.getAttributeName())); + try { + // Set description if model defines it + if (Strings.isValid(dslWidgetDef.getDescription())) { + widgetDef.setDescription(dslWidgetDef.getDescription()); + } + // Else, set if AtsAttributeTypes defines it + else if (Strings.isValid(dslWidgetDef.getAttributeName()) && attrResolver.isAttributeNamed(dslWidgetDef.getAttributeName()) && Strings.isValid(attrResolver.getDescription(dslWidgetDef.getAttributeName()))) { + widgetDef.setDescription(attrResolver.getDescription(dslWidgetDef.getAttributeName())); + } + } catch (Exception ex) { + resultData.logErrorWithFormat("Exception [%s] in WorkDefinition [%s]", ex.getLocalizedMessage(), SHEET_NAME); } + if (Strings.isValid(dslWidgetDef.getXWidgetName())) { widgetDef.setXWidgetName(dslWidgetDef.getXWidgetName()); } else { |