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

EcoreGenerator generates ImplCustom classes for foreign packages #206

Open
cdietrich opened this issue Feb 9, 2022 · 2 comments
Open

EcoreGenerator generates ImplCustom classes for foreign packages #206

cdietrich opened this issue Feb 9, 2022 · 2 comments

Comments

@cdietrich
Copy link
Member

with

  <eClassifiers xsi:type="ecore:EClass" name="RefExpression" eSuperTypes="../../org.eclipse.xtext.xbase/model/Xbase.ecore#//XExpression">
    <eStructuralFeatures xsi:type="ecore:EReference" name="ref" eType="#//ReqValue"/>
  </eClassifiers>

and

    component = org.eclipse.emf.mwe2.ecore.EcoreGenerator {
        genModel = "platform:/resource/yyyy/model/Zzzz.genmodel"
        srcPath = "platform:/resource/yyy/src"
        generateCustomClasses = true
    }

you will end up with a src/org/eclipse/xtext/xbase/impl/XExpressionImplCustom.java

@cdietrich
Copy link
Member Author

@szarnekow any idea?

@szarnekow
Copy link
Contributor

The code looks completely bonkers for the case that generateCustomClasses was set to true.
It is possible to register multiple src-folders to do the lookup. But if the first one does not contain the custom class, it is generated immediately.
Also the lookup from the classpath is only done after the class was already generated.

I think we need to move the generate stuff out of the loop for the processing.

Also: It might be reasonable to disallow multiple source folders if generateCustom is set to true.

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

2 participants