Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Cannot override final binding bug in 2.2?(Possible bug in 2.2 head version.)
Cannot override final binding bug in 2.2? [message #756561] Mon, 14 November 2011 10:38 Go to next message
Mark Utting is currently offline Mark UttingFriend
Messages: 9
Registered: August 2011
Junior Member
After upgrading to 2.1 and getting bitten by bug 362787 (bugs.eclipse.org/bugs/show_bug.cgi?id=362787) I tried upgrading to the latest 2.2 (2.2.0.v2001111120924).

However, when I try to do 'Generate XText Artifacts' on the new Java-integration tutorial example (copied from www.eclipse.org/Xtext/documentation/2_1_0/035-domainmodel-java.php - but I've used a different URL for the grammar), I now get the enclosed error:

Cannot override final binding 'final org.eclipse.xtext.ui.refactoring.ui.IRenameElementHandler -> org.eclipse.xtext.xbase.ui.jvmmodel.refactoring.JvmModelRenameElementHandler (contributed by org.eclipse.xtext.generator.xbase.XbaseGeneratorFragment)'


This seems to be caused by line 177 of XbaseGeneratorFragment:
.addfinalTypeToType("org.eclipse.xtext.ui.refactoring.ui.IRenameElementHandler"
"org.eclipse.xtext.xbase.ui.jvmmodel.refactoring.JvmModelRenameElementHandler")

trying to bind something that is already bound as final?


I'm now going back to the latest maintenance release of 2.1 (download.eclipse.org/modeling/tmf/xtext/downloads/drops/2.1.1/N201111110236/tmf-xtext-Update-N201111110236.zip) to see if this fixes bug 362787 without introducing this new "Cannot override final binding" problem.

Cheers
Mark



0 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering platform uri 'C:\marku\starlog\trunk'
2023 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Adding generated EPackage 'org.eclipse.xtext.xbase.XbasePackage'
2197 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'www.eclipse.org/Xtext/Xbase/XAnnotations' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
2199 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'www.eclipse.org/xtext/xbase/Xtype' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
2208 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'www.eclipse.org/xtext/xbase/Xbase' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
2208 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'www.eclipse.org/xtext/common/JavaVMTypes' from 'platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel'
2809 [main] INFO ipse.emf.mwe.utils.DirectoryCleaner - Cleaning C:\marku\starlog\trunk\nz.ac.waikato.jstar2\..\nz.ac.waikato.jstar2\src-gen
2820 [main] INFO ipse.emf.mwe.utils.DirectoryCleaner - Cleaning C:\marku\starlog\trunk\nz.ac.waikato.jstar2\..\nz.ac.waikato.jstar2.ui\src-gen
2964 [main] INFO ipse.xtext.generator.LanguageConfig - generating infrastructure for nz.ac.waikato.jstar2.JStar with fragments : ImplicitRuntimeFragment, ImplicitUiFragment, GrammarAccessFragment, EcoreGeneratorFragment, SerializerFragment, ResourceFactoryFragment, XtextAntlrGeneratorFragment, JavaValidatorFragment, ImportNamespacesScopingFragment, QualifiedNamesFragment, BuilderIntegrationFragment, GeneratorFragment, FormatterFragment, LabelProviderFragment, OutlineTreeProviderFragment, QuickOutlineFragment, QuickfixProviderFragment, JavaBasedContentAssistFragment, XtextAntlrUiGeneratorFragment, Junit4Fragment, TypesGeneratorFragment, XbaseGeneratorFragment, CodetemplatesGeneratorFragment, RefactorElementNameFragment, CompareFragment
5135 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'www.waikato.ac.nz/jstar2/JStar' from 'platform:/resource/nz.ac.waikato.jstar2/src-gen/nz/ac/waikato/jstar2/JStar.genmodel'
13568 [main] INFO or.validation.JavaValidatorFragment - generating Java-based EValidator API
17946 [main] INFO text.generator.junit.Junit4Fragment - generating Junit4 Test support classes
17986 [main] INFO text.generator.junit.Junit4Fragment - generating Compare Framework infrastructure
18021 [main] ERROR g.eclipse.xtext.generator.Generator - Cannot override final binding 'final org.eclipse.xtext.ui.refactoring.ui.IRenameElementHandler -> org.eclipse.xtext.xbase.ui.jvmmodel.refactoring.JvmModelRenameElementHandler (contributed by org.eclipse.xtext.generator.xbase.XbaseGeneratorFragment)'
java.lang.IllegalStateException: Cannot override final binding 'final org.eclipse.xtext.ui.refactoring.ui.IRenameElementHandler -> org.eclipse.xtext.xbase.ui.jvmmodel.refactoring.JvmModelRenameElementHandler (contributed by org.eclipse.xtext.generator.xbase.XbaseGeneratorFragment)'
at org.eclipse.xtext.generator.CompositeGeneratorFragment.internalGetGuiceBindings(CompositeGeneratorFragment.java:170)
at org.eclipse.xtext.generator.CompositeGeneratorFragment.getGuiceBindingsUi(CompositeGeneratorFragment.java:132)
at org.eclipse.xtext.generator.Generator.generateGuiceModuleUi(Generator.java:341)
at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:129)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:97)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:73)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:64)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:55)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
18022 [main] INFO .emf.mwe2.runtime.workflow.Workflow - Done.
Re: Cannot override final binding bug in 2.2? [message #756609 is a reply to message #756561] Mon, 14 November 2011 14:05 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
thanks for the finding.
I just fixed the issue for 2.2 and the fix will also go into 2.1.1.

You should nevertheless change the order of the XbaseGeneratorFragment and the RenameElementGeneratorFragment in your mwe2 file.
Re: Cannot override final binding bug in 2.2? [message #756761 is a reply to message #756609] Mon, 14 November 2011 23:39 Go to previous message
Mark Utting is currently offline Mark UttingFriend
Messages: 9
Registered: August 2011
Junior Member
Thanks, that workaround fixes that problem. Smile

Mark


Previous Topic:Whitespace problem in comma separated list
Next Topic:Xtext 2: problem with workflow
Goto Forum:
  


Current Time: Tue Mar 31 03:05:48 GMT 2020

Powered by FUDForum. Page generated in 0.01948 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top