Suddenly there are build error in all of my Xcore model files. I don't know what I changed in my projects to deserve this.
The error message is the one in the title of the post:
GenModel cannot be resolved.
The errors are from the GenModel
annotation on the package declarations of the XCore files:
@GenModel(modelDirectory="/com.organisation.project/src-gen")
package com.organisation.project.package;
org.eclipse.emf.ecore.xcore.lib
required bundle. PDE reports no errors for the require bundle clause in the manifest file. org.eclipse.emf.ecore.xcore.lib
bundle. If I add the following line in the Xcore files then the build errors disappear:
annotation "http://www.eclipse.org/emf/2002/GenModel" as GenModel
I think I had this problem because Eclipse was confused about the target platform somehow.
Possibly the reason was that I had the EMF source code project opened in my workspace. When I closed them Eclipse did not understand that it again had to used EMF from the target platform.
Setting the target platform to Running Platform , then setting it back again resolved the issue. (The same technique that is recommended at Vogella .)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.