From 767ebeec41dc7c10e91683f3e5e3edc5c5617cae Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 18 Jun 2013 14:35:26 +0000 Subject: [PATCH] --- .../Extension/TransitionExt.cs | 19 +++++++++++-------- PROMS/fmtxml/AppendPlantSpecific.cs | 9 +++++++++ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs index 2e9c8b78..85a18b91 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs @@ -487,6 +487,7 @@ namespace VEPROMS.CSLA.Library tranType = 0; // Replace 3 tokens ", {.}, {.}, {.}" with a single token "{.}" tb._TransFormat = tb._FormatData.TransData.TransTypeList[tranType].TransFormat.Replace(", {.}, {.}, {.}", "{.}"); + if (formatInfo.PlantFormat.FormatData.TransData.UpcaseTranAnd) tb._TransFormat = tb._TransFormat.Replace("and", "AND"); tb._TransUI = (E_TransUI)tb._FormatData.TransData.TransTypeList[tranType].TransUI; tb._FromItem = fromInfo; tb._TranType = tranType; @@ -554,7 +555,6 @@ namespace VEPROMS.CSLA.Library return (tb.ToString()); } - // TODO: TStepNoFlag, i.e. include step number in range items. // TODO: For hlp: LowerCaseTranNumber - lower case substep numbers in transitions private static bool AddTransitionProcNum(TransitionBuilder tb) // Coded for HLP { @@ -618,7 +618,7 @@ namespace VEPROMS.CSLA.Library if (tb._FromItem.MyProcedure.ItemID == tb._ToItem.MyProcedure.ItemID) return false; // tb.TextAdded; return AddTransitionProcTitle(tb); } - private static string Tab(ItemInfo item) + private static string Tab(ItemInfo item, bool doStep) { if (item == null) return ""; string sret = ""; @@ -645,7 +645,6 @@ namespace VEPROMS.CSLA.Library DelimList.Add(delim.Trim()); } } - while (!pitem.IsHigh) { //string thisTab = StepInfo.Get(pitem.ItemID).MyTab.CleanText; @@ -681,8 +680,12 @@ namespace VEPROMS.CSLA.Library pitem = pitem.ActiveParent as ItemInfo; if (pitem == null) break; } - // add hls tab if it's not already in the tab. - if (pitem.IsHigh) + // add hls tab if it's not already in the tab. doStep was added to handle the TStepNo flag + // which is used to define whether the step number is included in the range transition text + // if the 'to' transition is a substep. Note that only skip the following if going to a substep + // thus change 'doStep' to true if the 'to' transition is a hls. + if (!doStep && item.IsHigh) doStep = true; + if (doStep && pitem.IsHigh) { string hlsTab = StepInfo.Get(pitem.ItemID).MyTab.CleanTextNoSymbols; if (!sret.StartsWith(hlsTab.Trim(" ".ToCharArray()))) @@ -726,7 +729,7 @@ namespace VEPROMS.CSLA.Library if (tb._ToItem.PreviousID == null && tb._ToItem.ItemPartCount == 0 && tb._ToItem.ItemDocVersionCount == 0) tb.Append("?"); else - tb.ReplaceToken(Tab(tb._ToItem)); + tb.ReplaceToken(Tab(tb._ToItem, true)); return true; } else if ((tb._ToItem.IsSection || tb._ToItem.IsProcedure) && ((tb._TransUI & E_TransUI.StepAllowNone) == E_TransUI.StepAllowNone)) @@ -747,7 +750,7 @@ namespace VEPROMS.CSLA.Library if (tb._RangeItem.PreviousID == null && tb._RangeItem.ItemPartCount == 0 && tb._RangeItem.ItemDocVersionCount == 0) tb.Append("?"); else - tb.ReplaceToken(Tab(tb._RangeItem)); + tb.ReplaceToken(Tab(tb._RangeItem, tb._RangeItem.ActiveFormat.PlantFormat.FormatData.TransData.TStepNoFlag)); return true; } private static bool AddIncludedStepNumber(TransitionBuilder tb) @@ -758,7 +761,7 @@ namespace VEPROMS.CSLA.Library ItemInfo next = GetNextItem(tb._ToItem, rangeAncestors, ref usedRangeAncestor); while (next.ItemID != tb._RangeItem.ItemID) { - tb.ReplaceToken(", " + Tab(next)); // TODO: Intermediate Range. + tb.ReplaceToken(", " + Tab(next, tb._RangeItem.ActiveFormat.PlantFormat.FormatData.TransData.TStepNoFlag)); next = GetNextItem(next, rangeAncestors, ref usedRangeAncestor); } tb._UsedRangeAncestor = usedRangeAncestor; diff --git a/PROMS/fmtxml/AppendPlantSpecific.cs b/PROMS/fmtxml/AppendPlantSpecific.cs index f9c9439b..79aa0778 100644 --- a/PROMS/fmtxml/AppendPlantSpecific.cs +++ b/PROMS/fmtxml/AppendPlantSpecific.cs @@ -164,11 +164,19 @@ namespace fmtxml fmtdata.StepData[9].TabData.Ident="*{numeric} "; fmtdata.StepData[9].TabData.RNOIdentEdit="* "; fmtdata.StepData[9].TabData.RNOIdent = "* "; + + // the following change was made because the code that supports the TStepNoFlag was not + // written when Ginna was delivered and the difference in the transition text for ranges + // did not match the 16bit but was not caught in compares. As per Paul Linn on 6/18/13 + // keep the transition text the same as for the delivery, which means that TStepNoFlag + // should be = true (the default). + fmtdata.TransData.TStepNoFlag = "True"; } private void AddRGEDEVFmt(ref FormatData fmtdata) { // RGE is now call CEG fmtdata.Name = "CEG Ginna Deviation Format"; + fmtdata.TransData.TStepNoFlag = "True"; // see comment in RgeCommonAdjustments } private void AddRGEBCKFmt(ref FormatData fmtdata) { @@ -179,6 +187,7 @@ namespace fmtxml { // RGE is now call CEG fmtdata.Name = "CEG Ginna Background Subformat"; + fmtdata.TransData.TStepNoFlag = "True"; // see comment in RgeCommonAdjustments } private void AddWCN2Fmt(ref FormatData fmtdata) {