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

CDO generation from VPDSL is not customized for Capella #141

Closed
pdulth opened this issue Nov 29, 2021 · 2 comments
Closed

CDO generation from VPDSL is not customized for Capella #141

pdulth opened this issue Nov 29, 2021 · 2 comments
Milestone

Comments

@pdulth
Copy link
Contributor

pdulth commented Nov 29, 2021

When viewpoint elements will inherit from Capella ones, (ie ModelElement), the generation will not generate proper code directly compliant with CDO for Capella applications.
The ViewpointFactoryImpl will not contains capella code customization.

Generation for CDO for Capella use the default EGF CDO Generation instead of the Capella one.

GenerationChain

When we use the CDO for Capella target platform,
image

the generated generationchain is generated with a standard CDO Generation (cdoExtension:CdoGeneration)
image

whereas it shall be Capella one (CapellaExtension:CapellaCdoEmfGeneration)
image

Fcore

It has for side effect that generated fcore is refering to
image

instead of
image

Generated code

When looking at the capella.emf.gen.model.cdo pattern located in org.polarsys.capella.extensions.tools, it overriddes some patterns to generate IHelpers and Factory custom code.

image
image

@pdulth pdulth changed the title CDO generation CDO generation from VPDSL is not customized for Capella Nov 29, 2021
@pdulth
Copy link
Contributor Author

pdulth commented Nov 29, 2021

  • Most of the viewpoints doesn't use the IHelper mechanism to code their derived methods.
  • setId is required. on CapellamodellerResourceImpl, we don't initialize setId when we will attach it to the resource for ModelElement

@pdulth
Copy link
Contributor Author

pdulth commented Nov 29, 2021

Workaround:

After migration with VPDSL,

  • open as text the generationchain file located in the main plugin of the viewpoint
  • replace textually 'cdoExtension:CdoGeneration' to 'CapellaExtension:CapellaCdoEmfGeneration'.
    By opening it again you shall have a Capella Cdo Generation
    image
  • then on the generationchain, run Right click > Run Generation Chain. This will generate a .fcore in the model folder aside.
  • Replace the existing fcore in the .fc plugin.
  • Open it and Right click on root element 'vp' Launcher > Run EGF Activity
    image
  • The code shall be properly generated.

arnauddieumegard added a commit to arnauddieumegard/capella-studio that referenced this issue Dec 15, 2021
Rely on the Capella Cdo Emf Generation for CDO code generation.

Change-Id: I0000000000000000000000000000000000000000
Signed-off-by: Arnaud Dieumegard <[email protected]>
arnauddieumegard added a commit to arnauddieumegard/capella-studio that referenced this issue Dec 15, 2021
Rely on the Capella Cdo Emf Generation for CDO code generation.

Change-Id: I0000000000000000000000000000000000000000
Signed-off-by: Arnaud Dieumegard <[email protected]>
arnauddieumegard added a commit to arnauddieumegard/capella-studio that referenced this issue Dec 15, 2021
Rely on the Capella Cdo Emf Generation for CDO code generation.

Change-Id: I0000000000000000000000000000000000000000
Signed-off-by: Arnaud Dieumegard <[email protected]>
arnauddieumegard added a commit to arnauddieumegard/capella-studio that referenced this issue Dec 15, 2021
Rely on the Capella Cdo Emf Generation for CDO code generation.
Update TP to latest Capella stable

Change-Id: I0000000000000000000000000000000000000000
Signed-off-by: Arnaud Dieumegard <[email protected]>
arnauddieumegard added a commit to arnauddieumegard/capella-studio that referenced this issue Dec 15, 2021
Rely on the Capella Cdo Emf Generation for CDO code generation.

Change-Id: I0000000000000000000000000000000000000000
Signed-off-by: Arnaud Dieumegard <[email protected]>
pdulth pushed a commit that referenced this issue Dec 15, 2021
Rely on the Capella Cdo Emf Generation for CDO code generation.

Change-Id: I0000000000000000000000000000000000000000
Signed-off-by: Arnaud Dieumegard <[email protected]>
@pdulth pdulth added this to the 5.2.0 milestone Dec 15, 2021
@pdulth pdulth closed this as completed Dec 15, 2021
arnauddieumegard added a commit to arnauddieumegard/capella-studio that referenced this issue Dec 20, 2021
Rely on the Capella Cdo Emf Generation for CDO code generation.

Change-Id: I0000000000000000000000000000000000000000
Signed-off-by: Arnaud Dieumegard <[email protected]>
arnauddieumegard added a commit that referenced this issue Dec 22, 2021
Rely on the Capella Cdo Emf Generation for CDO code generation.

Change-Id: I0000000000000000000000000000000000000000
Signed-off-by: Arnaud Dieumegard <[email protected]>
arnauddieumegard added a commit to arnauddieumegard/capella-studio that referenced this issue Jan 3, 2022
arnauddieumegard added a commit to arnauddieumegard/capella-studio that referenced this issue Jan 3, 2022
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

No branches or pull requests

1 participant