hallvard / plantuml

Embed UML diagrams in files and view them in Eclipse
http://plantuml.sourceforge.net/
209 stars 57 forks source link

java: URI for links to java classes potentially without source #31

Closed hallvard closed 7 years ago

hallvard commented 7 years ago

The platform scheme can be used to link to classes within eclipse, but only if you know the path. A java scheme could be used to link to any java class, and using org.eclipse.jdt.internal.debug.ui.actions.OpenTypeAction to find the path.

hallvard commented 7 years ago

Supported syntax: java:/[#]. Couldn't use java: without /, since the PlantUML library didn't recognize it as a proper link.

hallvard commented 7 years ago

Defined extension point to avoid dependency to jdt in generic link handling code.

arnaudroques commented 7 years ago

Do you wish that the PlantUML library supports syntax [[java:linkWithoutStartingSlash]] ?

hallvard commented 7 years ago

Yes, it would be nice if the library supported the more generic URI syntax, which allows java:linkWithoutStartingSlash!

arnaudroques commented 7 years ago

I'm getting confused because the following example is working for us:

@startuml
class Car {
  Some field [[[java:link1]]]
  Some method() [[[java:link2]]]
}
class Car [[java:link3]]
@enduml

Could you give a non-working example ? Thanks!

hallvard commented 7 years ago

class Links [[java:java.lang.String]] didn't work, but class Links [[java:/java.lang.String]] did.

hallvard commented 7 years ago

My mistake, some other code choked when the URI didn't have a path and stopped the java link without slash from working. So now the / is optional.