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

Ports on parts do not group below owning block #2368

Closed
1 of 3 tasks
mikekidner opened this issue Jun 17, 2023 · 5 comments · Fixed by #2394
Closed
1 of 3 tasks

Ports on parts do not group below owning block #2368

mikekidner opened this issue Jun 17, 2023 · 5 comments · Fixed by #2394
Labels
bug An issue in the application

Comments

@mikekidner
Copy link
Contributor

Describe the bug

As discussed ports do not group beneath the owning block, if created on the part. Also, ports created on a block are not available to use on the part.

To Reproduce

Steps to reproduce the behavior:

  1. Create a blocks B1 , B2, B3, with ports on B2 and B3. See how they are grouped beneath the blocks in the model.
Screen Shot 2023-06-18 at 8 10 32 am
  1. Create an IBD for B1
Screen Shot 2023-06-18 at 8 12 08 am

See how the ports are not available to use on the diagram

  1. Add a port to a part in the IBD. See how it appears at the top level of the model, not under the owning block
Screen Shot 2023-06-18 at 8 12 46 am

Expected behavior

When adding ports to a block or it's corresponding part, it is expected that the port nests beneath the block.
If a port exists on a block, it should exist on the corresponding part.

OS

  • Linux (Please put in notes the specific distro)
  • macOS
  • Windows

Version

Version of Gaphor: 2.18.1

Additional information

Add any other context about the problem here.

@mikekidner mikekidner changed the title Ports on parts to not group below owning block Ports on parts do not group below owning block Jun 17, 2023
@amolenaar
Copy link
Member

Thanks @mikekidner, I can reproduce this issue.

@amolenaar amolenaar added the bug An issue in the application label Jun 25, 2023
@amolenaar
Copy link
Member

amolenaar commented Jun 25, 2023

The missing piece is here: https://github.com/gaphor/gaphor/blob/main/gaphor/SysML/blocks/connectors.py#L39-L40.

Is a Property actually allowed to have Ports? Port is a subtype of Property.

If so, what would the relation be? For a ProxyPort on a Property? Property.subsettedProperty?

@mikekidner
Copy link
Contributor Author

I think that placing a port on a part should be interpreted as adding a port property to the owning block,
So when dropping a port onto a part in a diagram, it would have to reference the owning block.

To do nested ports, a port would have to have port properties. So ports, may need to be realised as properties that can own properties, as you suggest.

@amolenaar
Copy link
Member

I check Visual Paradigm, and there the port is attached to the type of the property:

image

This would mean that types have to be fixed (currently type is a pretty free form text field).

@amolenaar amolenaar linked a pull request Jun 27, 2023 that will close this issue
6 tasks
@mikekidner
Copy link
Contributor Author

This is great. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants