eclipse-sirius / sirius-web

Sirius Web: open-source low-code platform to define custom web applications supporting your specific visual languages
https://eclipse.dev/sirius/sirius-web.html
Eclipse Public License 2.0
72 stars 48 forks source link

Completion support broken in the new architecture #3571

Open pcdavid opened 3 months ago

pcdavid commented 3 months ago

Steps to reproduce:

  1. Create a new studio project
  2. Create a Diagram Description and select it
  3. In the Details view, focus on "Domain type".
  4. Start typing "flow::S" and hit Ctrl-Space
  5. Nothing happens. A proposal for "flow::System" should be visible (it is in the old arch)

This is beacause in the implementation of the completion proposal computation (org.eclipse.sirius.components.view.emf.DomainTypeTextfieldCustomizer.getCompletionProposalsProvider()) we look for all types visible in the current ResourceSet's PackageRegistry, but in the new architecture a Studio project's editing context only knows about the "studio level" (view) metamodels (see org.eclipse.sirius.web.application.studio.services.StudioEditingContextInitializer).

pcdavid commented 3 months ago

For the same reason, even if you enter the full type name, you get a validation error as all the domain-level types are unknown to the studio project:

The element description "flow::CompositeProcessor" does not have a valid domain class

pcdavid commented 3 months ago

The bug is described with the "flow" metamodel as an example, but it is not available on the new app (at the moment). However the bug is still valid with e.g. papaya which is available:

image