Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [Solved] How to configure a custom QualifiedNameProvider? (Guice binding error)
[Solved] How to configure a custom QualifiedNameProvider? [message #879797] Thu, 31 May 2012 17:28 Go to previous message
Scott Finnie is currently offline Scott Finnie
Messages: 56
Registered: October 2011
Member
I've created a custom QualifiedName provider (extends DefaultDeclarativeQualifiedNameProvider) and configured in the Runtime module as follows:

public class OoaRuntimeModule extends org.domainmodels.AbstractOoaRuntimeModule {

    @Override
    public void configure(Binder binder) {
        super.configure(binder);
        binder
        .bind(IQualifiedNameProvider.class)
        .to(OoaQualifiedNameProvider.class);
    }
}


When I try to create a runtime instance however Guice throws an exception:

1) A binding to org.eclipse.xtext.naming.IQualifiedNameProvider was already configured at org.eclipse.xtext.service.MethodBasedModule.configure(MethodBasedModule.java:55).
  at org.domainmodels.OoaRuntimeModule.configure(OoaRuntimeModule.java:27)

I tried commenting out the fragment in the .mwe2 file but to no avail.

      //fragment = exporting.QualifiedNamesFragment {}


What am I missing? Thanks.

[Updated on: Fri, 01 June 2012 03:36]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic:Problem with imported model when referencing Xbase and JavaVMTypes models
Next Topic:Xbase: overwrite the Operator '='
Goto Forum:
  


Current Time: Fri May 24 18:01:18 EDT 2013

Powered by FUDForum. Page generated in 0.01609 seconds