Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
14 replies Latest Post - ‏2014-07-24T19:27:30Z by a8155058
llandale
llandale
2956 Posts
ACCEPTED ANSWER

Pinned topic ChangeBars-LinkIndicators column?

‏2010-03-22T21:29:07Z |

I see that Change Bars and Link Indicators apply only to the Main column. That's a drag for non-spec like modules that don't have a Main column.

In Feb jsarkic was kind enough to provide an example of a DXL column showing the change bars. See below after I tweaked it.

Can this be enhanced into a column showing link indicators that actually work? That is, hover the mouse and see the link, click to follow to the linked object.
 

  • Louie
// InsertChangeBarColumn.dxl
/*
Inserts a thin column mimicking the 'Change Bars' color of the Main column.
Select a column, run this from the DXL Window
*/
string DXL_Code = "
    // Display change bars in this column
        DBE can = getCanvas()
        if (unsaved obj)
             realBackground(can, realColor_Red)         // Change not yet saves
        elseif (modified obj)
             realBackground(can, realColor_Yellow)      // modified since Baseline
        else realBackground(can, realColor_Blue)                // not modified since baseline
"  // end string DXL_Code
 
Column cCurr = column(getSelectedCol(current Module))
Column cNew = insert(cCurr)
 
dxl(cNew, DXL_Code)
width(cNew, 6)   // Best width seems to be '6', I guess Pixels
 
//      ---- end file InsertChangeBarColumn.dxl ----
Updated on 2014-01-07T22:29:08Z at 2014-01-07T22:29:08Z by iron-man
  • Mathias Mamsch
    Mathias Mamsch
    1957 Posts
    ACCEPTED ANSWER

    Re: ChangeBars-LinkIndicators column?

    ‏2010-03-23T22:11:59Z  in response to llandale

    I am not aware of any possibility to interact with a DXL column (except the dxl layout column reacting on the currently selected object). Therefore it would be hard to impossible to reprogram the link indicators. However you could just put a main column very small in there. If you make it very small the heading numbers won't be displayed. Regards, Mathias
     

    // InsertChangeBarColumn.dxl
    /*
    Inserts a thin column mimicking the 'Change Bars' color of the Main column.
    Select a column, run this from the DXL Window
    */
    string DXL_Code = "
        // Display change bars in this column
            DBE can = getCanvas()
            if (unsaved obj)
                 realBackground(can, realColor_Red)         // Change not yet saves
            elseif (modified obj)
                 realBackground(can, realColor_Yellow)      // modified since Baseline
            else realBackground(can, realColor_Blue)                // not modified since baseline
    "  // end string DXL_Code
     
    if (null getSelectedCol(current Module)) {
            ack "Select a column"
            halt
    }
     
    Column cCurr = column getSelectedCol(current Module)
    Column cNew2 = insert cCurr
     
    width(cNew2, 3)
    title (cNew2, " ")
    main cNew2
     
    Column cNew = insert(cNew2)
    dxl(cNew, DXL_Code)
    width(cNew, 6)   // Best width seems to be '6', I guess Pixels
     
    showChangeBars false
    linkIndicators true 
     
    //      ---- end file InsertChangeBarColumn.dxl ----
    
    Updated on 2014-01-07T22:29:47Z at 2014-01-07T22:29:47Z by iron-man
    • llandale
      llandale
      2956 Posts
      ACCEPTED ANSWER

      Re: ChangeBars-LinkIndicators column?

      ‏2010-03-24T15:07:39Z  in response to Mathias Mamsch
      Well, it turns out this module has in fact Object Heading, but the main 'text' is an attr-DXL summarizing the important attributes. I enhanced that attr-DXL to display the Object Number and Heading for Heading objects, otherwise do the Summary.

      So I aleady have a 'Main' column looking attribute that I display. Displaying the real Main column won't work for me since if I make it narrow, it will be hopelessly long for actual Headings.

      I'm tempted to have the attr-DXL also update the Object Text, but I think that would blossom out History. That would solve my problem as I'd then just display the Main column in all the Views.

      • Louie
  • C_Rubio
    C_Rubio
    5 Posts
    ACCEPTED ANSWER

    Re: ChangeBars-LinkIndicators column?

    ‏2010-11-01T20:29:21Z  in response to llandale
    Hi All,

    Has anyone had any luck with this?

    To Louie's point I run into the same problem with the main column and headings(the width of the rows get to large when you squeeze down the Main Column). I was almost tempted to wipeout the headings and store/restore them for different views, but that is a PITA for larger modules.

    Was hoping there was someway to reassign a Main Column as one that does (or does not) have headings, so that I can squeeze it down so as just to see the Link Indicators. So far I cannot find a way in DXL to just display the indicators.

    Thanks for any suggestions!
    CR
    • llandale
      llandale
      2956 Posts
      ACCEPTED ANSWER

      Re: ChangeBars-LinkIndicators column?

      ‏2010-11-01T22:11:07Z  in response to C_Rubio
      Well, this is what I have so far.

      <1> I need to resolve the problem of the DXL file reading itself as I cannot have it issue a direct readFile command like it currently does in line #55:
      string c_NameFile = "c:/Doors-Stuff/DXL-Local/InProgress/ForGeneral/LO_InsertChangeBar.dxl

      Any help on that would be GREATLY appreciated, and I'll give full credit when I code that capability.

      <2>I also intend to upgrade it to provide the capability to only count links from a specific link module, so we can indeed just display one kind of link (the kind that view would care about).

      Its pretty good so far and we are indeed using it.

      • Louie
      • C_Rubio
        C_Rubio
        5 Posts
        ACCEPTED ANSWER

        Re: ChangeBars-LinkIndicators column?

        ‏2010-11-01T22:37:18Z  in response to llandale
        Thanks for the response,

        I just read the file (but haven't run it yet), but I guess I am confused. Why can't you just read the file? Bad Form? or is it because you need it to be globally accessible?

        If the code is local to a module, then couldn't you just bury the relevant code in a module level text attribute? and parse it out using a module level trigger? (or even easier just have the view saved with the column)...

        I will take a closer look and see if I can get the gist, as I'd like to give you a hand, since you were kind enough to send it. Anyway I'll try and get to this tonight or in the AM, and will get back to you soon!.

        Regards,
        CR
        • llandale
          llandale
          2956 Posts
          ACCEPTED ANSWER

          Re: ChangeBars-LinkIndicators column?

          ‏2010-11-01T23:06:45Z  in response to C_Rubio
          After using it the code is of course embedded in the column in the view; possibly more than one view. But deploying the code so it can be run (in order to get inserted into the view in the first place) is another story. Its bad form to hard code paths like this, and in any event with our large distributed system not everyone will have access to any spot on the network I may choose to put it, and hard code the address.

          What I need is some mechanism for some code to read a copy of itself. This is surely available somewhere because DXL errors seem to know what line number they occur; well I want the code at that line number and indeed at all other line numbers.

          I may have to resort to parsing the "addins" path, to search for the file, but gads that's tough and doesn't guarantee the correct results.

          I have a similar issue with many of my self-deploying triggers; is sure is easier to code code rather than coding inside some string that has to be escaped.

          • Louie
          • Mathias Mamsch
            Mathias Mamsch
            1957 Posts
            ACCEPTED ANSWER

            Re: ChangeBars-LinkIndicators column?

            ‏2010-11-02T00:24:59Z  in response to llandale
            Hey Louie,

            You can get the relative include path of the currently executing code as well as the line number by just looking at the traceback ( dxlHere() ). However that will not solve your problem for all main context executing code, like DXL Layout, triggers, etc.

            I have found a way, of determining the DOORS clients commandline, which is the missing piece for coding a source code lookup function that will emulate the source lookup of DOORS to translate the relative path of an include to the absolute path of an include. But I am not sure that will solve your problem.

            The problem is, in some cases there is really no file being executed, but the code comes from a string (may it be attribute DXL, or just code run over the runStr COM interface). Even worse, the DXL code will be translated to the DXL XTC VM machine code and be discarded by the parser, before the (translated) code is run. Therefore I don't think you will even have a chance to read the currently executing DXL (source) code using some black magic to fornicate with the DOORS client.

            Just my two cents. Regards, Mathias

            Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
            • llandale
              llandale
              2956 Posts
              ACCEPTED ANSWER

              Re: ChangeBars-LinkIndicators column?

              ‏2010-11-02T15:41:52Z  in response to Mathias Mamsch
              I'm pretty sure I could query getenv("DOORSADDINS") and getenv("DOORSPROJECTADDINS") to get the currently values which contain root paths worthy of searching. I wonder what a copy of the command line would do for me. And I wonder how to get that even if I don't see a purpose at this time.

              Yet, even translated code will display the line number and variables involved when there is a run-time error, so to my ignorant mind it seems like the actual line itself is still available during run time.

              Will check with IBM

              • Louie
          • C_Rubio
            C_Rubio
            5 Posts
            ACCEPTED ANSWER

            Re: ChangeBars-LinkIndicators column?

            ‏2010-11-02T13:39:35Z  in response to llandale

            Hi Again,
            OK I understand what you did, and like what I see (very creative in manually creating the Link Arrows). Too bad we can't use the native DOORs indicators (that would make things so much easier). You mentioned:

            
            But deploying the code so it can be run (in order to get inserted into the view in the first
            place) is another story. Its bad form to hard code paths like this, and in any event with our large
            distributed system not everyone will have access to any spot on the network I may choose to put it,
            and hard code the address.
            

             

            Is the server that hosts the DOORs DB globally accessible to all? What we do here, is create a global repository of all DXL's, and create a Drop Down menu for our users to access them. We set up the windows registry to point to the global repository Drop Down folder.

             

             

             

            HKEY_LOCAL_MACHINE\SOFTWARE\Telelogic\DOORS\9.2\Config]
            "defopenlinkmode"="READ_ONLY"
            "defopenmode"="READ_ONLY"
            "Addins"="\\\\your server\\your folder\\Doors\\Doors_DXLs\\Your_global_Menu"
            



            That allows all users access to all DXLs, once they install the registry settings to their Windows environment. It also sets up some additional DOORs defaults that we instantiate corporate wide (Read Only settings).

            In any case using this method you could place your DXL in the globally accessible repository, and voila all could see it (and run it).

            Don't know if that can help you, but hope it does.
            Regards
            CR



             

             

            Updated on 2014-01-07T22:31:13Z at 2014-01-07T22:31:13Z by iron-man
  • dacapri
    dacapri
    11 Posts
    ACCEPTED ANSWER

    Re: ChangeBars-LinkIndicators column?

    ‏2013-10-29T14:30:41Z  in response to llandale

    Hello guys,

    I was reading the entire discussion and we get out of topic.

    I'm looking for a solution to have the change-bar and link-indicators shown in a column different from the main one (object heading and object text).

    Is there somebody with a working solution?

     

    Thanks a lot in advance.

     

    Regards,

    Daniele

     

    • llandale
      llandale
      2956 Posts
      ACCEPTED ANSWER

      Re: ChangeBars-LinkIndicators column?

      ‏2013-10-29T18:54:17Z  in response to dacapri

      I don't think we managed to modify an existing column (e.g. the "Object Identifier") with change bars and link indicators, but we did manage to add a (thin) layout colum showing them; although the links were static and you could not use them to traverse to the linked objects.

      • ChrisAnnal
        ChrisAnnal
        64 Posts
        ACCEPTED ANSWER

        Re: ChangeBars-LinkIndicators column?

        ‏2014-07-24T13:34:13Z  in response to llandale

        I just came across this discussion and wondered if another approach may be to write a for loop to go through the module and do the following:

        If Object Heading is empty (there is nothing but an Object Number displayed),

        Execute the "Edit-->In Place" function for Object Text.

        Object Text = <spacebar>

        Save changes.

        This would effectively make the "Main" column usable like you wanted, without the Object Numbers being crunched on top of each other in the narrowed column. I'm thinking of the case where you have perhaps a module where the Object Heading is irrelevant, but there is still a desire to see the change bars and functional link indicators. This would at least make the existing column more user-friendly in those modules.

        • llandale
          llandale
          2956 Posts
          ACCEPTED ANSWER

          Re: ChangeBars-LinkIndicators column?

          ‏2014-07-24T18:32:56Z  in response to ChrisAnnal

          Yes, I always found it curious that newly created or otherwise "empty" objects were deemed to be "headings" and go heading numering.  Very annoying. 

  • a8155058
    a8155058
    15 Posts
    ACCEPTED ANSWER

    Re: ChangeBars-LinkIndicators column?

    ‏2014-07-24T19:27:30Z  in response to llandale

    Hey, in DOORS 9.6 you can now display these columns in not main.

    Check it out
    http://softqa.wordpress.com/2014/06/06/doors-9-6-a-review/