Problems with AbstractFormatter2 when building with gradle [message #1754437] |
Fri, 17 February 2017 14:55  |
Eclipse User |
|
|
|
I have a DSL for a language in this multi-project:
https://github.com/JPL-IMCE/jpl.imce.oml.specification.parent
It builds fine with gradle, including an Xcore metamodel
and an Xtext grammar with a few additional Xtend code generators.
I tried to add a formatter following the doc for the new AbstractFormatter2 API. When I build in the Eclipse IDE; it works fine -- i.e., I can launch
a runtime eclipse and test the formatter.
However, when I build with gradle, I get errors like this:
:jpl.imce.oml.specification:generateXtextLanguage
0 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'http://www.eclipse.org/emf/2002/Ecore' from 'platform:/resource/org.eclipse.emf.ecore/model/Ecore.genmodel'
12 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'http://www.w3.org/XML/1998/namespace' from 'platform:/resource/org.eclipse.emf.ecore/model/XMLNamespace.genmodel'
32 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'http://www.eclipse.org/emf/2003/XMLType' from 'platform:/resource/org.eclipse.emf.ecore/model/XMLType.genmodel'
70 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Adding generated EPackage 'org.eclipse.xtext.xbase.XbasePackage'
107 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'http://www.eclipse.org/Xtext/Xbase/XAnnotations' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
109 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'http://www.eclipse.org/xtext/xbase/Xtype' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
118 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'http://www.eclipse.org/xtext/xbase/Xbase' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
118 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'http://www.eclipse.org/xtext/common/JavaVMTypes' from 'platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel'
473 [main] INFO text.xtext.generator.XtextGenerator - Initializing Xtext generator
473 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Adding generated EPackage 'org.eclipse.xtext.common.types.TypesPackage'
534 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering project jpl.imce.oml.specification at 'file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/'
534 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering project jpl.imce.oml.specification.tests at 'file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification.tests/'
534 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering project jpl.imce.oml.specification.ide at 'file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification.ide/'
534 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering project jpl.imce.oml.specification.ui at 'file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification.ui/'
535 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering project jpl.imce.oml.specification.ui.tests at 'file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification.ui.tests/'
535 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering project jpl.imce.oml.specification.idea at 'file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification.idea/'
535 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering project jpl.imce.oml.specification.web at 'file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification.web/'
542 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Using resourceSet registry. The registered Packages will not be registered in the global EPackage.Registry.INSTANCE!
1379 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'xcore.lang' from 'platform:/resource/org.eclipse.emf.ecore.xcore.lib/model/XcoreLang.xcore'
1870 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'jpl.imce.oml.specification.ecore' from 'platform:/resource/jpl.imce.oml.specification.ecore/model/OMLSpecification.xcore'
4185 [main] INFO text.xtext.generator.XtextGenerator - Generating jpl.imce.oml.specification.OntologicalModelingLanguage
17856 [main] INFO text.xtext.generator.XtextGenerator - Generating common infrastructure
17867 [main] INFO .emf.mwe2.runtime.workflow.Workflow - Done.
:jpl.imce.oml.specification:generateXtext
Warning: NLS unused message: auth_alreadySpecified in: org.eclipse.core.internal.runtime.messages
Warning: NLS missing message: line_separator_platform_mac_os_9 in: org.eclipse.core.internal.runtime.messages
ERROR:The method getAnnotationPropertyAccess() from the type OntologicalModelingLanguageGrammarAccess refers to the missing type Object (file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/src/jpl/imce/oml/specification/formatting2/OntologicalModelingLanguageFormatter.xtend line : 60 column : 41)
ERROR:The method getAnnotationPropertyAccess() from the type OntologicalModelingLanguageGrammarAccess refers to the missing type Object (file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/src/jpl/imce/oml/specification/formatting2/OntologicalModelingLanguageFormatter.xtend line : 61 column : 41)
ERROR:The method getAnnotationAccess() from the type OntologicalModelingLanguageGrammarAccess refers to the missing type Object (file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/src/jpl/imce/oml/specification/formatting2/OntologicalModelingLanguageFormatter.xtend line : 67 column : 33)
ERROR:The method getAnnotationAccess() from the type OntologicalModelingLanguageGrammarAccess refers to the missing type Object (file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/src/jpl/imce/oml/specification/formatting2/OntologicalModelingLanguageFormatter.xtend line : 68 column : 33)
ERROR:The method getTerminologyGraphAccess() from the type OntologicalModelingLanguageGrammarAccess refers to the missing type Object (file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/src/jpl/imce/oml/specification/formatting2/OntologicalModelingLanguageFormatter.xtend line : 75 column : 39)
ERROR:The method getTerminologyGraphAccess() from the type OntologicalModelingLanguageGrammarAccess refers to the missing type Object (file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/src/jpl/imce/oml/specification/formatting2/OntologicalModelingLanguageFormatter.xtend line : 76 column : 39)
ERROR:The method getTerminologyGraphAccess() from the type OntologicalModelingLanguageGrammarAccess refers to the missing type Object (file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/src/jpl/imce/oml/specification/formatting2/OntologicalModelingLanguageFormatter.xtend line : 78 column : 52)
ERROR:The method getTerminologyGraphAccess() from the type OntologicalModelingLanguageGrammarAccess refers to the missing type Object (file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/src/jpl/imce/oml/specification/formatting2/OntologicalModelingLanguageFormatter.xtend line : 79 column : 52)
ERROR:The method getTerminologyGraphAccess() from the type OntologicalModelingLanguageGrammarAccess refers to the missing type Object (file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/src/jpl/imce/oml/specification/formatting2/OntologicalModelingLanguageFormatter.xtend line : 102 column : 42)
ERROR:The method getTerminologyGraphAccess() from the type OntologicalModelingLanguageGrammarAccess refers to the missing type Object (file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/src/jpl/imce/oml/specification/formatting2/OntologicalModelingLanguageFormatter.xtend line : 103 column : 42)
ERROR:The method getTerminologyGraphAccess() from the type OntologicalModelingLanguageGrammarAccess refers to the missing type Object (file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/src/jpl/imce/oml/specification/formatting2/OntologicalModelingLanguageFormatter.xtend line : 123 column : 50)
ERROR:The method getTerminologyGraphAccess() from the type OntologicalModelingLanguageGrammarAccess refers to the missing type Object (file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/src/jpl/imce/oml/specification/formatting2/OntologicalModelingLanguageFormatter.xtend line : 124 column : 50)
ERROR:The method getAspectAccess() from the type OntologicalModelingLanguageGrammarAccess refers to the missing type Object (file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/src/jpl/imce/oml/specification/formatting2/OntologicalModelingLanguageFormatter.xtend line : 135 column : 29)
ERROR:The method getAspectAccess() from the type OntologicalModelingLanguageGrammarAccess refers to the missing type Object (file:/opt/local/imce/tools/neon/workspace/jpl.imce.oml.specification.parent/jpl.imce.oml.specification/src/jpl/imce/oml/specification/formatting2/OntologicalModelingLanguageFormatter.xtend line : 136 column : 29)
:jpl.imce.oml.specification:generateXtext FAILED
FAILURE: Build failed with an exception.
It seems that there is some kind of registration or injector missing when running in standalone with gradle that happens when running in the IDE.
I'm using Eclipse Neon with Xtext 2.10 and the xtext-gradle-plugin 1.0.17
Any suggestions?
- Nicolas.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.56299 seconds