Skip to content

BOY Schema loading fails if triggered by Connector #1637

@jbobnar

Description

@jbobnar

BOY schema loading fails if it is triggered by connector.

java.lang.IllegalArgumentException: Figure is not a child
    at org.eclipse.draw2d.Figure.remove(Figure.java:1267)
    at org.eclipse.draw2d.FreeformLayer.remove(FreeformLayer.java:76)
    at org.eclipse.gef.editpolicies.GraphicalEditPolicy.removeFeedback(GraphicalEditPolicy.java:79)
    at org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy.eraseCreationFeedback(GraphicalNodeEditPolicy.java:80)
    at org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy.eraseSourceFeedback(GraphicalNodeEditPolicy.java:94)
    at org.eclipse.gef.editparts.AbstractEditPart.eraseSourceFeedback(AbstractEditPart.java:353)
    ...

100% reproducible. These are the steps:

  1. Create an opi file with at least two widgets (any widgets will do).
  2. Save the file.
  3. Restart CSS, to make sure that schema is not loaded.
  4. Open the opi created in step 1.
  5. Click on the connector "widget"
  6. Add a connector to the existing widgets.
    Clicking on a widget triggers schema loading. An exception is thrown and the schema is not loaded.

This issue is present in CSS 3.x as well.

The workaround is to always add the widget to the OPI, which triggers loading of the schema. After the schema is loaded, you may delete the added widget and add as many connectors as you wish. It all works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions