Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368808

Summary: [xtext][editor] Editor is not robust against bogus implementations of the JvmModelInferrer
Product: [Modeling] TMF Reporter: Sebastian Zarnekow <sebastian.zarnekow>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sven.efftinge
Version: 2.3.0Flags: sebastian.zarnekow: juno+
Target Milestone: M5   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Sebastian Zarnekow CLA 2012-01-17 05:33:56 EST
I accidently tried to use a broken JDK definition and the Xtend editor did not work:

java.lang.IllegalStateException: Could not create binding for 'java.lang.SuppressWarnings'.
	at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:87)
	at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:1)
	at org.eclipse.xtext.common.types.access.jdt.JdtTypeMirror.initialize(JdtTypeMirror.java:36)
	at org.eclipse.xtext.common.types.access.TypeResource.doLoad(TypeResource.java:92)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1494)
	at org.eclipse.xtext.common.types.access.TypeResource.load(TypeResource.java:80)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
	at org.eclipse.xtext.resource.SynchronizedXtextResourceSet.getResource(SynchronizedXtextResourceSet.java:23)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:216)
	at org.eclipse.xtext.common.types.util.TypeReferences.findDeclaredType(TypeReferences.java:190)
	at org.eclipse.xtext.xtend2.jvmmodel.Xtend2JvmModelInferrer.transform(Xtend2JvmModelInferrer.java:121)
	at org.eclipse.xtext.xtend2.jvmmodel.Xtend2JvmModelInferrer.infer(Xtend2JvmModelInferrer.java:109)
	at org.eclipse.xtext.xbase.jvmmodel.JvmModelAssociator.installDerivedState(JvmModelAssociator.java:203)
	at org.eclipse.xtext.resource.DerivedStateAwareResource.installDerivedState(DerivedStateAwareResource.java:125)
	at org.eclipse.xtext.resource.DerivedStateAwareResource.getContents(DerivedStateAwareResource.java:48)
	at org.eclipse.xtext.xtend2.ui.highlighting.XtendHighlightingCalculator.doProvideHighlightingFor(XtendHighlightingCalculator.java:76)
	at org.eclipse.xtext.xbase.ui.highlighting.XbaseHighlightingCalculator.provideHighlightingFor(XbaseHighlightingCalculator.java:87)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.MergingHighlightedPositionAcceptor.provideHighlightingFor(MergingHighlightedPositionAcceptor.java:51)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.reconcilePositions(HighlightingReconciler.java:87)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.modelChanged(HighlightingReconciler.java:277)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler$1.process(HighlightingReconciler.java:248)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler$1.process(HighlightingReconciler.java:1)
	at org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:36)
	at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:78)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.refresh(HighlightingReconciler.java:245)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.install(HighlightingReconciler.java:199)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingHelper.enable(HighlightingHelper.java:82)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingHelper.install(HighlightingHelper.java:70)
	at org.eclipse.xtext.ui.editor.XtextEditor.installHighlightingHelper(XtextEditor.java:491)
	at org.eclipse.xtext.ui.editor.XtextEditor.createPartControl(XtextEditor.java:454)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2949)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2854)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2846)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2797)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2793)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2777)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2760)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:683)
	at org.eclipse.xtext.xtend2.ui.wizards.NewXtend2ClassWizard$1.run(NewXtend2ClassWizard.java:69)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3945)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3622)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:352)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1433)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1409)
Comment 1 Sven Efftinge CLA 2012-01-19 08:15:11 EST
pushed to master
Comment 2 Karsten Thoms CLA 2017-09-19 17:56:05 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 18:06:49 EDT
Closing all bugs that were set to RESOLVED before Neon.0