Upgrade from 2.4.3 to 2.6.2 Problem [message #1393858] |
Fri, 04 July 2014 07:32  |
Eclipse User |
|
|
|
We ran xText 2.4.3 with Eclipse 3.7.1 and it worked well.
Running the same xText Project with Eclipse 4.3.1 and the latest xText Version (2.6.2.) results in an error:
com.google.inject.CreationException: Guice creation errors:
1) No implementation for org.eclipse.xtext.ui.shared.contribution.ISharedStateContributionRegistry was bound.
while locating org.eclipse.xtext.ui.shared.contribution.ISharedStateContributionRegistry
for parameter 0 at org.eclipse.xtext.builder.trace.StorageAwareTrace.initializeContributions(Unknown Source)
at org.eclipse.xtext.builder.trace.StorageAwareTrace.initializeContributions(Unknown Source)
while locating com.google.inject.Provider<org.eclipse.xtext.builder.trace.StorageAwareTrace>
for field at org.eclipse.xtext.builder.trace.TraceForStorageProvider.traceToSourceProvider(Unknown Source)
while locating org.eclipse.xtext.builder.trace.TraceForStorageProvider
for field at org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2.fileBasedTraceInformation(Unknown Source)
at org.eclipse.xtext.service.MethodBasedModule.configure(MethodBasedModule.java:55)
2) No implementation for org.eclipse.xtext.ui.shared.contribution.ISharedStateContributionRegistry was bound.
while locating org.eclipse.xtext.ui.shared.contribution.ISharedStateContributionRegistry
for parameter 0 at org.eclipse.xtext.ui.resource.Storage2UriMapperImpl.initializeContributions(Unknown Source)
at org.eclipse.xtext.ui.resource.Storage2UriMapperImpl.initializeContributions(Unknown Source)
at org.eclipse.xtext.service.MethodBasedModule.configure(MethodBasedModule.java:55)
2 errors
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:154)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
at com.google.inject.Guice.createInjector(Guice.java:95)
at com.google.inject.Guice.createInjector(Guice.java:72)
at com.google.inject.Guice.createInjector(Guice.java:62)
at ch.basler.service.dsl.ServiceDSLStandaloneSetupGenerated.createInjector(ServiceDSLStandaloneSetupGenerated.java:28)
at ch.basler.service.dsl.ServiceDSLStandaloneSetupGenerated.createInjectorAndDoEMFRegistration(ServiceDSLStandaloneSetupGenerated.java:22)
at ch.basler.service.dsl.ServiceDSLInjectorProvider.internalCreateInjector(ServiceDSLInjectorProvider.java:34)
at ch.basler.service.dsl.ServiceDSLInjectorProvider.getInjector(ServiceDSLInjectorProvider.java:27)
at ch.basler.service.dsl.ServiceDSLInjectorProvider.setupRegistry(ServiceDSLInjectorProvider.java:42)
at org.eclipse.xtext.junit4.XtextRunner.methodBlock(XtextRunner.java:43)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Actions taken to solve the problem:
rebuild all, regenerate xText Artifacts, check the release note
Any hints, how to solve that?
Thanks a lot for your help
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Upgrade from 2.4.3 to 2.6.2 Problem [message #1398022 is a reply to message #1396690] |
Thu, 10 July 2014 09:45   |
Eclipse User |
|
|
|
we found the originator of the problem:
in the DSLModule declaration we override like the following:
public class ServiceDSLRuntimeModule extends ch.basler.service.dsl.AbstractServiceDSLRuntimeModule {
public Class<? extends EclipseResourceFileSystemAccess2> bindEclipseFSA() {
return UTF8EclipseFilesSystemAccess.class;
}
we need this as otherwise the generated sourcecode does not understand german umlauts.
UTF8EclipseFilesSystemAccess:
public class UTF8EclipseFilesSystemAccess extends EclipseResourceFileSystemAccess2 {
private IProject project;
private File projectFolder;
@Override
protected StringInputStream getInputStream(String contentsAsString, String encoding) {
return super.getInputStream(contentsAsString, "UTF-8");
}
@Override
public void setProject(IProject project) {
this.project = project;
IFile dotProject = project.getFile(".project");
URI dotProjectURI = dotProject.getRawLocationURI();
File dotProjectFile = new File(dotProjectURI);
projectFolder = dotProjectFile.getParentFile();
super.setProject(project);
}
public IProject getProject() {
return project;
}
public File getProjectFolder() {
return projectFolder;
}
public File getJavaIOFile(String path) {
return getJavaIOFile(path, DEFAULT_OUTPUT);
}
private File getJavaIOFile(String path, String outputConfiguration) {
org.eclipse.emf.common.util.URI uri = getURI(path, outputConfiguration);
List<String> segmentsList = uri.segmentsList();
List<String> subList = segmentsList.subList(2, segmentsList.size());
File ret = getProjectFolder();
for (String segment : subList) {
ret = new File(ret, segment);
}
return ret;
}
}
if I remove the binding, the generation works fine - but the umlauts don't work.
Any ideas, what's wrong with the implementation?
Cheers
Frank
|
|
|
|
Powered by
FUDForum. Page generated in 0.06621 seconds