Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Hyperlinks in the GraphRep
Answer
3/22/16 8:54 AM
I am currently working on ADOxx metamodelling and I'm having a hard time with some details.
The following command allows me to have two functions:
1) show in a rectangle the name of the class to whom the instance is referenced
2)Allows me to click the link that takes me directly to that class
------------------------------------------------------------------------------------------------------------------
#set the link of the reference    IF (sProcess != "")   
       ATTR "Reference capability" x
: (tabx2 + (tabw3/2) ) y: (taby1+(tabh2/2)+(0.3cm))                                                  
                                                  w:c: (tabw2+tabw3) h:c
: (tabh2-0.2cm) line-break:rigorous
                                                  format:"%m" 
   
ENDIF
------------------------------------------------------------------------------------------------------------------
Please see the screenshot attached for further clarification

What I would need is some support with all these 3 options below:
1)be able to substitute the name of the link with whatever text I want without disrupting the link
2)Substitute the name of the instance which is in the middle with the name of the link(so only the link remains in the middle of the instance).
3) I am referring to an instance but the link shows only the referred class. How can I show only the referred instance instead?
Thank you very for your hep and support
Attachment

Attachments: Untitled.png (107.4k)

RE: Hyperlinks in the GraphRep
Answer
3/22/16 8:57 AM as a reply to Anonymous.
1) You can use an attribute of type string and change it in the modelling environment (NOTEBOOK) that you can read in the GraphRep. The linkage would be odne with the so called HOTSPOT command.In this case it would be like:[font='courier new', courier]AVAL hl:"reference_attribute"

1AVAL txt:"text_attribute"
2IF (LEN hl)
3  FILL color:lightblue
4  ELLIPSE x:1.4cm y:-0.3cm rx:0.35cm ry:0.25cm
5  FONT h:0.4cm
6  TEXT (txt) x:-.5cm y:-0.5cm
7  HOTSPOT "reference_attribute" x:-.5cm y:-0.5cm w:0.5cm h:0.5cm
8ENDIF

2) You can use here your implementation below and if you want to display the name of the target instance you have to set the format to '%o'. 
3) See 2.

You can find a detailed documentation with an example of the GraphRep at the following link:
https://www.adoxx.org/live/adoxx-notation-language-graphrep