viatra / EMF-IncQuery

This repository is only kept for historic reasons. All development happens on eclipse.org
http://eclipse.org/viatra
13 stars 4 forks source link

Outline-related exception on content assist #212

Closed istvanrath closed 11 years ago

istvanrath commented 12 years ago

Recovered from #71:

For pattern body "nodes", the check expression now correctly sees their type, but whenever I activate a content assist inside the check() expression, I get an exception like this:

pattern courseWithNameLongerThanWeight(C:Course) = {
    Course.subject(C,CName);
    Course.weight(C,W);
    check(C.<<cursor is here>>);
 }
org.eclipse.emf.common.util.WrappedException: java.lang.IllegalArgumentException: The feature 'leftOperand' is not a valid feature
    at org.eclipse.xtext.util.OnChangeEvictingCache.execWithoutCacheClear(OnChangeEvictingCache.java:126)
    at org.eclipse.xtext.xbase.resource.XbaseResource.getEObject(XbaseResource.java:237)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:219)
    at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode$2.exec(AbstractOutlineNode.java:162)
    at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode$2.exec(AbstractOutlineNode.java:1)
    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.outline.impl.AbstractOutlineNode.readOnly(AbstractOutlineNode.java:158)
    at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode.getChildren(AbstractOutlineNode.java:77)
    at org.eclipse.xtext.ui.editor.outline.actions.OutlineWithEditorLinker.findBestNode(OutlineWithEditorLinker.java:136)
    at org.eclipse.xtext.ui.editor.outline.actions.OutlineWithEditorLinker.findBestNode(OutlineWithEditorLinker.java:137)
    at org.eclipse.xtext.ui.editor.outline.actions.OutlineWithEditorLinker.findBestNode(OutlineWithEditorLinker.java:137)
    at org.eclipse.xtext.ui.editor.outline.actions.OutlineWithEditorLinker.findBestNode(OutlineWithEditorLinker.java:137)
    at org.eclipse.xtext.ui.editor.outline.actions.OutlineWithEditorLinker.findBestNode(OutlineWithEditorLinker.java:137)
    at org.eclipse.xtext.ui.editor.outline.actions.OutlineWithEditorLinker.selectInTreeView(OutlineWithEditorLinker.java:125)
    at org.eclipse.xtext.ui.editor.outline.actions.OutlineWithEditorLinker$TextListener.selectionChanged(OutlineWithEditorLinker.java:69)
    at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2749)
    at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2697)
    at org.eclipse.jface.text.TextViewer$5.run(TextViewer.java:2676)
    at org.eclipse.swt.widgets.Display.timerProc(Display.java:4705)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5433)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
    at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:4879)
    at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5226)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
    at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:94)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3607)
    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:123)
    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:344)
    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:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Caused by: java.lang.IllegalArgumentException: The feature 'leftOperand' is not a valid feature
    at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eStructuralFeature(BasicEObjectImpl.java:739)
    at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFragmentSegment(BasicEObjectImpl.java:557)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject(ResourceImpl.java:780)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject(ResourceImpl.java:756)
    at org.eclipse.xtext.resource.XtextResource.access$1(XtextResource.java:1)
    at org.eclipse.xtext.resource.XtextResource$1.getEObject(XtextResource.java:104)
    at org.eclipse.xtext.resource.DefaultFragmentProvider.getEObject(DefaultFragmentProvider.java:26)
    at org.eclipse.xtext.resource.XtextResource.getEObject(XtextResource.java:289)
    at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:219)
    at org.eclipse.xtext.xbase.resource.XbaseResource.access$0(XbaseResource.java:1)
    at org.eclipse.xtext.xbase.resource.XbaseResource$2.exec(XbaseResource.java:239)
    at org.eclipse.xtext.xbase.resource.XbaseResource$2.exec(XbaseResource.java:1)
    at org.eclipse.xtext.util.OnChangeEvictingCache.execWithoutCacheClear(OnChangeEvictingCache.java:124)
istvanrath commented 12 years ago

It seems that this is not reproducible with the final Xtext 2.3

ujhelyiz commented 11 years ago

Closing with WORKSFORME.