Bullet + DXL-Layout

Hello,

Is there a solution of resolving the following issue; which is in the parent requirement the engineer added a extra carriage return within a bullet list and when producing the RTM is the child requirement it display the empty bullet but it not being displayed is the actual parent object text.

e.g.

parent
• I see an extra bullet when there is a carriage return at the end of a bulletlist with a DXL-layout view
{carriage return}

child RTM
• I see an extra bullet when there is a carriage return at the end of a bulletlist with a DXL-layout view
• <- display bullet

Thank you,
Jim
SystemAdmin - Tue Aug 21 10:24:50 EDT 2012

Re: Bullet + DXL-Layout
Mathias Mamsch - Tue Aug 21 10:55:37 EDT 2012

Are you saying that you actually found an example, where displayRichWithOle will display the richText of a DOORS attribute differently, than the DOORS Module Editor?

I mean you could go into the dark land of trying to remove the paragraph break after the bullet list, but it seems to me that this is a kind of "ignore me". Is someone worried about the extra bullet in some document? Maybe you tell them: "get out!" ;-) Seriously if what I hear from your post is true, I see no other way then awkwardly removing the bullet from the RTF which is in my eyes a no-wanna-go-there. I wrote an RTF parser in DXL for a similar purpose and it did not pay off - editing richText programmatically is just no fun. Maybe this helps, although I doubt it. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Bullet + DXL-Layout
SystemAdmin - Tue Aug 21 11:56:36 EDT 2012

Mathias Mamsch - Tue Aug 21 10:55:37 EDT 2012
Are you saying that you actually found an example, where displayRichWithOle will display the richText of a DOORS attribute differently, than the DOORS Module Editor?

I mean you could go into the dark land of trying to remove the paragraph break after the bullet list, but it seems to me that this is a kind of "ignore me". Is someone worried about the extra bullet in some document? Maybe you tell them: "get out!" ;-) Seriously if what I hear from your post is true, I see no other way then awkwardly removing the bullet from the RTF which is in my eyes a no-wanna-go-there. I wrote an RTF parser in DXL for a similar purpose and it did not pay off - editing richText programmatically is just no fun. Maybe this helps, although I doubt it. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

It seems if an engineer first writes the text with the carriage return then makes it a bullet list you get the effect I am seeing. By the way is "displayRichWithOle" a real function I can find any documentation on it if so?

Thank you,
-Jim
Attachments

attachment_14877669_displayRichWithOle.dpa

Re: Bullet + DXL-Layout
llandale - Tue Aug 21 15:23:07 EDT 2012

When I put a bullet followed by EOL in text, this layout displays it correctly (one bullet):
  • displayRich(richText(obj."Object Text"))
Perhaps you should post the relevant code that retrieves and displays the value.

-Louie

Re: Bullet + DXL-Layout
SystemAdmin - Tue Aug 21 15:56:26 EDT 2012

llandale - Tue Aug 21 15:23:07 EDT 2012
When I put a bullet followed by EOL in text, this layout displays it correctly (one bullet):

  • displayRich(richText(obj."Object Text"))
Perhaps you should post the relevant code that retrieves and displays the value.

-Louie

just using the Analysis Wizard within DOORS.

Re: Bullet + DXL-Layout
Mathias Mamsch - Tue Aug 21 17:14:24 EDT 2012

SystemAdmin - Tue Aug 21 15:56:26 EDT 2012
just using the Analysis Wizard within DOORS.

Okay, i found a solution (cannot explain 100% why though). Change the following code in the analysis wizard:
 

displayRich("\\pard " " ")
else
displayRich("\\pard " s)

 


to

 

 

 

displayRich(" ")
else
displayRich(s)



Maybe that helps, regards, Mathias



 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Re: Bullet + DXL-Layout
SystemAdmin - Wed Aug 22 11:02:27 EDT 2012

Mathias Mamsch - Tue Aug 21 17:14:24 EDT 2012

Okay, i found a solution (cannot explain 100% why though). Change the following code in the analysis wizard:
 

displayRich("\\pard " " ")
else
displayRich("\\pard " s)

 


to

 

 

 

displayRich(" ")
else
displayRich(s)



Maybe that helps, regards, Mathias



 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Hello,

I'm sorry to say that didn't work for me.

-Jim

Re: Bullet + DXL-Layout
Mathias Mamsch - Thu Aug 23 02:55:35 EDT 2012

SystemAdmin - Wed Aug 22 11:02:27 EDT 2012
Hello,

I'm sorry to say that didn't work for me.

-Jim

Okay, when I open your example dpa with DOORS 9.3, go to child, use the analysis wizard and analyse outlinks, all modules, and display the "Object Text" attribute only, one attribute per line checked, then I see the effect you describe. The DXL layout that the analysis wizard generates is attached, as is the modified one and the result I am getting as a screenshot. I am using DOORS 9.3.0.6. The layout dxl sources should work for you (there are no module IDs in there), so just try putting the wizard_modified.dxl in a layout column in child and see if you get the same result. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Attachments

attachment_14878376_bullet.zip

Re: Bullet + DXL-Layout
SystemAdmin - Fri Aug 24 15:07:35 EDT 2012

Mathias Mamsch - Thu Aug 23 02:55:35 EDT 2012
Okay, when I open your example dpa with DOORS 9.3, go to child, use the analysis wizard and analyse outlinks, all modules, and display the "Object Text" attribute only, one attribute per line checked, then I see the effect you describe. The DXL layout that the analysis wizard generates is attached, as is the modified one and the result I am getting as a screenshot. I am using DOORS 9.3.0.6. The layout dxl sources should work for you (there are no module IDs in there), so just try putting the wizard_modified.dxl in a layout column in child and see if you get the same result. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Hello,

your solution doesn't seem to work for DOORS 9.3.0.7.

-Jim

Re: Bullet + DXL-Layout
Mathias Mamsch - Fri Aug 24 15:18:53 EDT 2012

SystemAdmin - Fri Aug 24 15:07:35 EDT 2012
Hello,

your solution doesn't seem to work for DOORS 9.3.0.7.

-Jim

Possible, but improbable. Can you tell me what exactly you did before I install DOORS 9.3.0.7 to verify? Did you take the modifed DXL layout, put it to your example project child module? And what was the result? Two bullets for both? Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Bullet + DXL-Layout
SystemAdmin - Fri Aug 24 15:54:25 EDT 2012

Mathias Mamsch - Fri Aug 24 15:18:53 EDT 2012
Possible, but improbable. Can you tell me what exactly you did before I install DOORS 9.3.0.7 to verify? Did you take the modifed DXL layout, put it to your example project child module? And what was the result? Two bullets for both? Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

I restored the archive went to the child and created a column using your modified code and I still see the double bullets.

-Jim

Re: Bullet + DXL-Layout
Mathias Mamsch - Fri Aug 24 16:33:31 EDT 2012

SystemAdmin - Fri Aug 24 15:54:25 EDT 2012
I restored the archive went to the child and created a column using your modified code and I still see the double bullets.

-Jim

Installed 9.3.0.7 ... Performed the same steps you described. Still get the correct result (see screenshot, is this what you were expecting, but not getting??). We seem to be doing something differently or seem to be talking about different problems. I restored the dpa you attached and I open the child module, create a new DXL layout column with the following code.

// DXL generated by DOORS traceability wizard on 23 August 2012.
// Wizard version 2.0, DOORS version 9.3.0.6
pragma runLim, 0
void showOut(Object o, int depth) {
    Link l
    LinkRef lr
    ModName_ otherMod = null
    Module linkMod = null
    ModuleVersion otherVersion = null
    Object othero
    string disp = null
    string s = null
    string plain, plainDisp
    int plainTextLen
    int count
    bool doneOne = false
    string linkModName = "*"
    for l in all(o->linkModName) do {
        otherVersion = targetVersion l
        otherMod = module(otherVersion)
        if (null otherMod || isDeleted otherMod) continue
        othero = target l
        if (null othero) {
            load(otherVersion,false)
        }
        othero = target l
        if (null othero) continue
        if (isDeleted othero) continue
        doneOne = true
        if (depth == 1) {
            s = probeRichAttr_(othero,"Object Text", false)
            if (s == "") 
            displayRich(" ")
            else
            displayRich( s)
        }
    }
    if (depth == 1) {
        ExternalLink extLink
        doneOne = false
        for extLink in o->"" do {
            if (!doneOne) {
                displayRich("{\\b External Links:}")
                doneOne = true
            }
        }
    }
}
showOut(obj,1)

 


It should really work - please also try to go to parent directly and then insert a DXL layout column with the following code:

 

 

 

string s = richTextWithOle (obj."Object Text")
displayRich s



You will get the same result. If you get double bullets in that case, we would be back to my first post, but Louie and me already tested, that this is not the case. If you print out strings s in both cases, then you will see that what the DXL Layout above tries to display is exactly the same. If not then this would be pretty curious. If you still cannot reproduce the result, please insert the "print s" statements in both columns (in parent and child) and post the result. Regards, Mathias



 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 


Attachments

attachment_14879219_bullet_9_3_0_7.png

Re: Bullet + DXL-Layout
SystemAdmin - Fri Aug 24 16:58:35 EDT 2012

Mathias Mamsch - Fri Aug 24 16:33:31 EDT 2012

Installed 9.3.0.7 ... Performed the same steps you described. Still get the correct result (see screenshot, is this what you were expecting, but not getting??). We seem to be doing something differently or seem to be talking about different problems. I restored the dpa you attached and I open the child module, create a new DXL layout column with the following code.

// DXL generated by DOORS traceability wizard on 23 August 2012.
// Wizard version 2.0, DOORS version 9.3.0.6
pragma runLim, 0
void showOut(Object o, int depth) {
    Link l
    LinkRef lr
    ModName_ otherMod = null
    Module linkMod = null
    ModuleVersion otherVersion = null
    Object othero
    string disp = null
    string s = null
    string plain, plainDisp
    int plainTextLen
    int count
    bool doneOne = false
    string linkModName = "*"
    for l in all(o->linkModName) do {
        otherVersion = targetVersion l
        otherMod = module(otherVersion)
        if (null otherMod || isDeleted otherMod) continue
        othero = target l
        if (null othero) {
            load(otherVersion,false)
        }
        othero = target l
        if (null othero) continue
        if (isDeleted othero) continue
        doneOne = true
        if (depth == 1) {
            s = probeRichAttr_(othero,"Object Text", false)
            if (s == "") 
            displayRich(" ")
            else
            displayRich( s)
        }
    }
    if (depth == 1) {
        ExternalLink extLink
        doneOne = false
        for extLink in o->"" do {
            if (!doneOne) {
                displayRich("{\\b External Links:}")
                doneOne = true
            }
        }
    }
}
showOut(obj,1)

 


It should really work - please also try to go to parent directly and then insert a DXL layout column with the following code:

 

 

 

string s = richTextWithOle (obj."Object Text")
displayRich s



You will get the same result. If you get double bullets in that case, we would be back to my first post, but Louie and me already tested, that this is not the case. If you print out strings s in both cases, then you will see that what the DXL Layout above tries to display is exactly the same. If not then this would be pretty curious. If you still cannot reproduce the result, please insert the "print s" statements in both columns (in parent and child) and post the result. Regards, Mathias



 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Hello,

Object 2 is showing two bullets when in the parent there is only one being displayed in the Module.

-Jim

Re: Bullet + DXL-Layout
SystemAdmin - Fri Aug 24 17:06:56 EDT 2012

SystemAdmin - Fri Aug 24 16:58:35 EDT 2012
Hello,

Object 2 is showing two bullets when in the parent there is only one being displayed in the Module.

-Jim

sorry my error its been a long day. Once again sorry.

-Jim

Re: Bullet + DXL-Layout
SystemAdmin - Mon Sep 17 14:43:20 EDT 2012

Mathias Mamsch - Fri Aug 24 16:33:31 EDT 2012

Installed 9.3.0.7 ... Performed the same steps you described. Still get the correct result (see screenshot, is this what you were expecting, but not getting??). We seem to be doing something differently or seem to be talking about different problems. I restored the dpa you attached and I open the child module, create a new DXL layout column with the following code.

// DXL generated by DOORS traceability wizard on 23 August 2012.
// Wizard version 2.0, DOORS version 9.3.0.6
pragma runLim, 0
void showOut(Object o, int depth) {
    Link l
    LinkRef lr
    ModName_ otherMod = null
    Module linkMod = null
    ModuleVersion otherVersion = null
    Object othero
    string disp = null
    string s = null
    string plain, plainDisp
    int plainTextLen
    int count
    bool doneOne = false
    string linkModName = "*"
    for l in all(o->linkModName) do {
        otherVersion = targetVersion l
        otherMod = module(otherVersion)
        if (null otherMod || isDeleted otherMod) continue
        othero = target l
        if (null othero) {
            load(otherVersion,false)
        }
        othero = target l
        if (null othero) continue
        if (isDeleted othero) continue
        doneOne = true
        if (depth == 1) {
            s = probeRichAttr_(othero,"Object Text", false)
            if (s == "") 
            displayRich(" ")
            else
            displayRich( s)
        }
    }
    if (depth == 1) {
        ExternalLink extLink
        doneOne = false
        for extLink in o->"" do {
            if (!doneOne) {
                displayRich("{\\b External Links:}")
                doneOne = true
            }
        }
    }
}
showOut(obj,1)

 


It should really work - please also try to go to parent directly and then insert a DXL layout column with the following code:

 

 

 

string s = richTextWithOle (obj."Object Text")
displayRich s



You will get the same result. If you get double bullets in that case, we would be back to my first post, but Louie and me already tested, that this is not the case. If you print out strings s in both cases, then you will see that what the DXL Layout above tries to display is exactly the same. If not then this would be pretty curious. If you still cannot reproduce the result, please insert the "print s" statements in both columns (in parent and child) and post the result. Regards, Mathias



 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Hello,

After a two week vacation in northern Quebec I am refreshed and was once again had time to look into this further. I am still experiencing the issue. See the update archive for reference. Go to the child module and view the trace view, there seems to be an issue with the concatenation of the two strings for "object text" any ideas? Thank you

-Jim
 

// DXL generated by DOORS traceability wizard on 17 September 2012.
// Wizard version 2.0, DOORS version 9.3.0.7
pragma runLim, 0
void showOut(Object o, int depth) {
    Link l
    LinkRef lr
    ModName_ otherMod = null
    Module linkMod = null
    ModuleVersion otherVersion = null
    Object othero
    string disp = null
    string s = null
    string plain, plainDisp
    int plainTextLen
    int count
    bool doneOne = false
    string linkModName = "*"
    for l in all(o->linkModName) do {
        otherVersion = targetVersion l
        otherMod = module(otherVersion)
        if (null otherMod || isDeleted otherMod) continue
        othero = target l
        if (null othero) {
            load(otherVersion,false)
        }
        othero = target l
        if (null othero) continue
        if (isDeleted othero) continue
        doneOne = true
        if (depth == 1) {
            s = probeRichAttr_(othero,"Absolute Number", true)
            s = "Absolute Number:" s
            if (s == "") 
            displayRich(" ")
            else
            displayRich(s)
            s = probeRichAttr_(othero,"Object Number", true)
            s = "Object Number:" s
            if (s == "") 
            displayRich(" ")
            else
            displayRich(s)
            s = probeRichAttr_(othero,"Object Text", true)
// Issue with concatenation of the two strings any ideas??
            //s = "Object Text:" s
            if (s == "") 
            displayRich(" ")
            else
            displayRich(s)
        }
    }
    if (depth == 1) {
        ExternalLink extLink
        doneOne = false
        for extLink in o->"" do {
            if (!doneOne) {
                displayRich("{\\b External Links:}")
                doneOne = true
            }
        }
    }
}
showOut(obj,1)

Attachments

attachment_14887559_Test.dpa

Re: Bullet + DXL-Layout
Mathias Mamsch - Mon Sep 17 16:58:18 EDT 2012

SystemAdmin - Mon Sep 17 14:43:20 EDT 2012

Hello,

After a two week vacation in northern Quebec I am refreshed and was once again had time to look into this further. I am still experiencing the issue. See the update archive for reference. Go to the child module and view the trace view, there seems to be an issue with the concatenation of the two strings for "object text" any ideas? Thank you

-Jim
 

// DXL generated by DOORS traceability wizard on 17 September 2012.
// Wizard version 2.0, DOORS version 9.3.0.7
pragma runLim, 0
void showOut(Object o, int depth) {
    Link l
    LinkRef lr
    ModName_ otherMod = null
    Module linkMod = null
    ModuleVersion otherVersion = null
    Object othero
    string disp = null
    string s = null
    string plain, plainDisp
    int plainTextLen
    int count
    bool doneOne = false
    string linkModName = "*"
    for l in all(o->linkModName) do {
        otherVersion = targetVersion l
        otherMod = module(otherVersion)
        if (null otherMod || isDeleted otherMod) continue
        othero = target l
        if (null othero) {
            load(otherVersion,false)
        }
        othero = target l
        if (null othero) continue
        if (isDeleted othero) continue
        doneOne = true
        if (depth == 1) {
            s = probeRichAttr_(othero,"Absolute Number", true)
            s = "Absolute Number:" s
            if (s == "") 
            displayRich(" ")
            else
            displayRich(s)
            s = probeRichAttr_(othero,"Object Number", true)
            s = "Object Number:" s
            if (s == "") 
            displayRich(" ")
            else
            displayRich(s)
            s = probeRichAttr_(othero,"Object Text", true)
// Issue with concatenation of the two strings any ideas??
            //s = "Object Text:" s
            if (s == "") 
            displayRich(" ")
            else
            displayRich(s)
        }
    }
    if (depth == 1) {
        ExternalLink extLink
        doneOne = false
        for extLink in o->"" do {
            if (!doneOne) {
                displayRich("{\\b External Links:}")
                doneOne = true
            }
        }
    }
}
showOut(obj,1)

Remember you are dealing with richText here. If you concatenate "Object Text:" to a richText you get: "Object Text:{\rtf1\vs20\... some text}" which is no valid richText anymore. Therefore you need to do:
 

s = "Object Number:" richTextFragment s

 


which will effectively remove the rtf header from s and therefore give you valid richText again. Regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Re: Bullet + DXL-Layout
SystemAdmin - Mon Sep 17 17:46:22 EDT 2012

Mathias Mamsch - Mon Sep 17 16:58:18 EDT 2012

Remember you are dealing with richText here. If you concatenate "Object Text:" to a richText you get: "Object Text:{\rtf1\vs20\... some text}" which is no valid richText anymore. Therefore you need to do:
 

s = "Object Number:" richTextFragment s

 


which will effectively remove the rtf header from s and therefore give you valid richText again. Regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

hello,

That worked for the bullets, but what about ole(s) within the parent text. Thank you for the help.

-Jim

Re: Bullet + DXL-Layout
Mathias Mamsch - Mon Sep 17 19:24:31 EDT 2012

SystemAdmin - Mon Sep 17 17:46:22 EDT 2012
hello,

That worked for the bullets, but what about ole(s) within the parent text. Thank you for the help.

-Jim

Well ... probeRichAttr_ does not give you OLE objects. Try using richTextWithOle instead. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Bullet + DXL-Layout
SystemAdmin - Tue Sep 18 13:13:49 EDT 2012

Mathias Mamsch - Mon Sep 17 19:24:31 EDT 2012
Well ... probeRichAttr_ does not give you OLE objects. Try using richTextWithOle instead. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Thank you for all the help.

-Jim