Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diagram tool links fix #62

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ThomasGoering
Copy link

Fixed: Inheritance and supplier links in the diagram tool get lost after retrieval from diagram XML files. Therefore they are not displayed and saved to diagram XML files anymore.

See also: https://groups.google.com/g/eiffel-users/c/bBJKGkAOXf0

Steps to reproduce (this should work with any project that includes more that one class and with at least one inheritance or supplier relation between the classes within one project's cluster, I describe it here with the project I tested it with):

  • Open project in EiffelStudio installation folder: examples/studio/tour (you might want to copy this folder to another location...)
  • Delete folder EIFGENs/classic/Diagrams if the project was already compiled and you used the diagram tool with it
  • Open and compile the project in EiffelStudio
  • Make sure link context tool is active (View -> Link Context Tool)
  • In Browse tool click on class INVALID in cluster root_cluster
  • Open Diagram tool, Disable Auto Hide, make sure inheritance and supplier links are not hidden (there are two toolbar buttons for it) -> one bubble for class INVALID is displayed
  • In Browse tool click on cluster root_cluster -> four bubbles for the classes in the project are display and one inheritance link and one supplier link are displayed
  • In Browse tool click on class INVALID in cluster root_cluster again -> again the one bubble for INVALID
  • In Browse tool click on cluster root_cluster again -> No links displayed this time!!!
  • Click toolbar button "Include all classes of cluster" and move mouse into diagram view -> links displayed again (just when you moved the mouse into the view)

Notes:

In addition to my eiffel-users post I was able to reproduce this issue also with EiffelStudio 23.09 on Linux.

The old code compared the source and target class names of the links in the XML files with the class ids in the model. This obviously always fails and thus the links are not displayed (and stored later).

I tested this fix and it works in my environment, but:

I'm not really sure about what caused this issue but I'm pretty sure it was some kind of code change which introduced this regression because I assume this once worked.
The introduction of the call of class_by_id in EIFFEL_FACTORY was in 2006 with commit a022fd4 but I find it strange that this issue hasn't been reported for like 18 years. So maybe something else caused it?

Also: The XML for the link elements only contains the source and target class names. I don't know if checking only the class name is always sufficient. It seems that in other places in EiffelStudio check are done either for the class id or the cluster and class name.

Fixed: Inheritance and supplier links in the diagram tool get lost after retrieval from diagram XML files. Therefore they are not displayed and saved to diagram XML files anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant