External links don't work when using the TEOZ engine

0 votes
asked Jul 8, 2015 in Bug by anonymous
External links don't work when I use the TEOZ engine, e.g.:

 

@startuml

!pragma teoz true

participant Bob as "Long Bob" [[http://www.google.com]]

@enduml

1 Answer

0 votes
answered Jul 11, 2015 by plantuml (295,000 points)
Hi,

Thanks for the report.

This has been fixed in last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

Regards,
commented Jul 13, 2015 by anonymous
edited Jul 13, 2015
Thanks, it's working now but the external link implementation seems to be inconsistent when I compare the output of the same external link in an participant and in an activity:

@startuml

'!pragma teoz true
participant object  
participant google [[http://www.google.com google]]
object->google: search [[http://www.google.com]]

@enduml


So I use some kind of workaround to make the behavior consistent:

@startuml
!pragma teoz true
participant object  
participant google as "google [[http://www.google.com search]]"
object->google: search [[http://www.google.com internet]]

@enduml

BTW: this behavior is not related to the TEOZ engine.
Also tooltips don't seem to work in the svg output (at least not on IE11).

Is it safe to work with external links in real diagrams at the moment or is it all still in incubation: http://plantuml.sourceforge.net/incubation.html
commented Jul 13, 2015 by plantuml (295,000 points)
The fact is that links has been introduced incrementally in PlantUML.
At the beginning, the only syntax allowed was:
participant google [[http://www.google.com]]
So the URL should be at the end of participant declaration at this time.

Latter, we have introduced creole parser, which allows a more general use of URL.
But we did not want to break existing diagrams, so the "old" syntax (with URL at the end of participant declaration) is still accepted.

We agree that this is inconsistent and sounds weird/confusing, but we think that ascending compatibility is important.
Please tell us if it's a real issue for you.

Aboout tooltip, it's indeed not working with IE11 (but it's working with Chrome & FireFox).

We used the for test the following diagrams:
@startuml
:Foo:
note right of Foo {
You can [[http://www.yahoo.fr{This is a tooltip} add a tooltip]] to the link.
}
@enduml

Result here : http://www.plantuml.com/plantuml/svg/HOqn3eCm40JxUyM-mFIkgFA2D16YECKcP-7ua3baHOY_uoxI5ZFJxBWRLpk-cVn3rLDHYwZf8mPTq1DEUkc1DnTCavXjVXXQQ-x7ekgMUZubxUXZc6gsj5tW4FuwpvrW4f5JMHrTDCOI-kCD

For us, it's more a IE11 issue.
The generated SVG code is here, and looks ok (at least, to us :-)
The following line contains the tooltip:
<a target="_top" xlink:href="http://www.yahoo.fr" xlink:title="This is a tooltip">

Full SVG:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="89px" style="width:306px;height:89px;" version="1.1" viewBox="0 0 306 89" width="306px">
<defs>
<filter height="300%" id="f1" width="300%" x="-1" y="-1">
<feGaussianBlur result="blurOut" stdDeviation="2.0"/>
<feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/>
<feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/>
<feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/>
</filter>
</defs>
<g>
<ellipse cx="21" cy="18.5" fill="#FEFECE" filter="url(#f1)" rx="8" ry="8" style="stroke: #A80036; stroke-width: 2.0;"/>
<path d="M21,26.5 L21,53.5 M8,34.5 L34,34.5 M21,53.5 L8,68.5 M21,53.5 L34,68.5 " fill="#FEFECE" filter="url(#f1)" style="stroke: #A80036; stroke-width: 2.0;"/>
<text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="26" x="8" y="88.4951">
Foo</text>
<polygon fill="#FBFB77" filter="url(#f1)" points="71,37.5,71,62.6328,297,62.6328,297,47.5,287,37.5,71,37.5" style="stroke: #A80036; stroke-width: 1.0;"/>
<polygon fill="#FBFB77" points="71,37.5,71,46,36.2812,50,71,54,71,62.6328,297,62.6328,297,47.5,287,37.5,71,37.5" style="stroke: #A80036; stroke-width: 1.0;"/>
<line style="stroke: #A80036; stroke-width: 1.0;" x1="287" x2="287" y1="37.5" y2="47.5"/>
<line style="stroke: #A80036; stroke-width: 1.0;" x1="297" x2="287" y1="47.5" y2="47.5"/>
<text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="50" x="77" y="54.5669">
You can</text>
<a target="_top" xlink:href="http://www.yahoo.fr" xlink:title="This is a tooltip">
<text fill="#0000FF" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" text-decoration="underline" textLength="80" x="131" y="54.5669">
add a tooltip</text>
<line style="stroke: #0000FF; stroke-width: 1.0;" x1="131" x2="211" y1="56.5669" y2="56.5669"/>
</a>
<text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="67" x="215" y="54.5669">
to the link.</text>
</g>
</svg>

If anyone has some idea for a workaround on IE11, please post here!
commented Jul 13, 2015 by anonymous
Thanks for the explanation, now that I now how it's working and how I can use external links I don't have any issues anymore :-)

Regarding the tooltips IE11 issue: I can't install other browsers on the laptop I'm using for my work but I wasn't planning to use tooltips anyway. I just noticed the issue while trying some of the examples.
commented Jul 23, 2015 by TJP (400 points)
I tryed to use the tooltip functionality but if I export the diagram out of eclipse via right klick -> export and set the curso on top of the link no tooltip is been shown.

Here my code snipped:
#PaleGreen:[[:ErrorProcessing]];
     note right
         You can [[http://www.google.de{This is a tooltip} add a Tooltip]] to the link.
     end note
detach

And is it possible to add a tooltip on every kind of a Hyperlink like on activities?
commented Jul 23, 2015 by plantuml (295,000 points)
Tooltip is working in your example:

http://www.plantuml.com/plantuml/svg/9Osn2WCX44Jx-ug5z5vlwf3sYck2M8WkAX7tM3TO7FdtUF4npMDWvhQvWaz6hDeO_M0ctfWyjfPhjFQ-m4KbGU0Saqo_UD47lAjWJ18vzBhstbKaYWLLm7DFkS680o4gaeylk126xbEj7GL8GYYvljNSnHh-Nqj0SJxz0000

I think that the issue is on Eclipse Plugin, which may not display tooltip.
You should submit a request here : https://github.com/hallvard/plantuml/

Sorry about that!
...