eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[console] IAE selecting OCLinEcore Outline element #711

Closed eclipse-ocl-bot closed 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 348251 | | Status | CLOSED DUPLICATE of bug 348256 | | Importance | P3 normal | | Reported | Jun 03, 2011 13:50 EDT | | Modified | May 27, 2014 09:52 EDT | | Version | 3.1.0 | | Reporter | Ed Willink |

Description

Open the OCLinEcore Tutorial example.\ Open Tutorial.ecore with OCLinEcore editor.\ Open Xtext OCL Console.

Select "Book" in outline

java.lang.IllegalArgumentException: The feature 'ownedNestedPackage' 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:533)\ at org.eclipse.emf.ecore.impl.EModelElementImpl.eObjectForURIFragmentSegment(EModelElementImpl.java:496)\ at org.eclipse.emf.ecore.impl.EPackageImpl.eObjectForURIFragmentSegment(EPackageImpl.java:1830)\ 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.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:219)\ at org.eclipse.ocl.examples.xtext.console.OCLConsolePage$4.exec(OCLConsolePage.java:1074)

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Nov 10, 2011 15:04

Cannot reproduce on Indigo SR1 or Juno M3.

This looks rather like https://bugs.eclipse.org/bugs/show_bug.cgi?id=348256#c2.

This bug has been marked as a duplicate of bug 348256

eclipse-ocl-bot commented 1 month ago

By Klaas Gadeyne on Feb 27, 2013 04:51

(In reply to comment #1)

Cannot reproduce on Indigo SR1 or Juno M3.

This looks rather like https://bugs.eclipse.org/bugs/show_bug.cgi?id=348256#c2.

This bug has been marked as a duplicate of bug 348256

I just encountered the same NPE on Kepler M5, but I also cannot reproduce it consistently :-(

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Feb 27, 2013 05:10

(In reply to comment #2)

I just encountered the same NPE on Kepler M5, but I also cannot reproduce it consistently :-(

Since this bug is an IAE, an NOE can hardly be the same. If you can post the stack trace (at least as far as sendEvent) this kind of bug is quite easy to fix.

(Generally there is an undue assumption that the model is valid. The Outline and Hover text etc work on whatever you have typed at the instant Xtext starts a parse; the result may therefore be in transition and so the Outline etc just needs to be more fault tolerant.)

eclipse-ocl-bot commented 1 month ago

By Klaas Gadeyne on Feb 27, 2013 05:40

(In reply to comment #3)

(In reply to comment #2)

I just encountered the same NPE on Kepler M5, but I also cannot reproduce it consistently :-(

Since this bug is an IAE, an NOE can hardly be the same. If you can post the stack trace (at least as far as sendEvent) this kind of bug is quite easy to fix.

(Generally there is an undue assumption that the model is valid. The Outline and Hover text etc work on whatever you have typed at the instant Xtext starts a parse; the result may therefore be in transition and so the Outline etc just needs to be more fault tolerant.)

Sorry, I did mean IAE!

stack trace below, but as you can see it is very similar to the one in the bug description.

java.lang.IllegalArgumentException: The feature 'ownedNestedPackage' is not a valid feature\ at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eStructuralFeature(BasicEObjectImpl.java:733)\ at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFragmentSegment(BasicEObjectImpl.java:527)\ at org.eclipse.emf.ecore.impl.EModelElementImpl.eObjectForURIFragmentSegment(EModelElementImpl.java:489)\ at org.eclipse.emf.ecore.impl.EPackageImpl.eObjectForURIFragmentSegment(EPackageImpl.java:1829)\ at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject(ResourceImpl.java:777)\ at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject(ResourceImpl.java:753)\ at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:223)\ at org.eclipse.emf.edit.ui.util.EditUIMarkerHelper.getTargetObjects(EditUIMarkerHelper.java:190)\ at org.eclipse.emf.edit.ui.util.EditUIMarkerHelper.getMarkerDiagnostics(EditUIMarkerHelper.java:273)\ at org.eclipse.emf.edit.ui.provider.DiagnosticDecorator$DiagnosticDecoratorAdapter.handleResourceDiagnostics(DiagnosticDecorator.java:762)\ at org.eclipse.emf.edit.ui.provider.DiagnosticDecorator$DiagnosticAdapter.notifyChanged(DiagnosticDecorator.java:214)\ at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)\ at org.eclipse.emf.ecore.resource.impl.ResourceImpl.unload(ResourceImpl.java:1681)\ at org.eclipse.emf.ecore.presentation.EcoreEditor.handleChangedResources(EcoreEditor.java:696)\ at org.eclipse.emf.ecore.presentation.EcoreEditor.handleActivateGen(EcoreEditor.java:639)\ at org.eclipse.emf.ecore.presentation.EcoreEditor.handleActivate(EcoreEditor.java:671)\ at org.eclipse.emf.ecore.presentation.EcoreEditor$1.partActivated(EcoreEditor.java:357)\ at org.eclipse.ui.internal.WorkbenchPage$11.run(WorkbenchPage.java:4454)\ at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)\ at org.eclipse.ui.internal.WorkbenchPage.firePartActivated(WorkbenchPage.java:4452)\ at org.eclipse.ui.internal.WorkbenchPage.access$16(WorkbenchPage.java:4440)\ at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partActivated(WorkbenchPage.java:173)\ at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$2.run(PartServiceImpl.java:193)\ at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)\ at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartActivated(PartServiceImpl.java:191)\ at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:596)\ at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:549)\ at org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer.activate(AbstractPartRenderer.java:105)\ at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$1.handleEvent(ContributedPartRenderer.java:61)\ at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)\ at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4155)\ at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)\ at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1489)\ at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1470)\ at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1569)\ at org.eclipse.swt.widgets.Control.sendMouseEvent(Control.java:3379)\ at org.eclipse.swt.widgets.Tree.sendMouseEvent(Tree.java:2656)\ at org.eclipse.swt.widgets.Control.mouseEvent(Control.java:2532)\ at org.eclipse.swt.widgets.Composite.mouseEvent(Composite.java:886)\ at org.eclipse.swt.widgets.Control.mouseDown(Control.java:2540)\ at org.eclipse.swt.widgets.Tree.mouseDown(Tree.java:2012)\ at org.eclipse.swt.widgets.Display.windowProc(Display.java:5532)\ at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)\ at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:221)\ at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2104)\ at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2312)\ at org.eclipse.swt.widgets.Display.windowProc(Display.java:5596)\ at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)\ at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5035)\ at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5184)\ at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)\ at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128)\ at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3637)\ at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1057)\ at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)\ at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:941)\ at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:79)\ at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)\ at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)\ at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)\ 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:354)\ at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)\ 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:636)\ at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)\ at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Feb 27, 2013 05:55

(In reply to comment #2)

I just encountered the same NPE on Kepler M5

Definitely not the saem. The original had

org.eclipse.ocl.examples.xtext.console.OCLConsolePage$4.exec(OCLConsolePage.java:1074)

as the last application-specific frame beforee generic EMF support.

Your trace has

org.eclipse.emf.edit.ui.util.EditUIMarkerHelper.getTargetObjects(EditUIMarkerHelper.java:190)\ at org.eclipse.emf.edit.ui.util.EditUIMarkerHelper.getMarkerDiagnostics(EditUIMarkerHelper.java:273)\ at org.eclipse.emf.edit.ui.provider.DiagnosticDecorator$DiagnosticDecoratorAdapter.handleResourceDiagnostics(DiagnosticDecorator.java:762)

and no "ocl" anywhere. This looks much more like Bug 400393, which is only indirectly affected by OCL tooling.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2014 09:44

CLOSED after more than a year in RESOLVED state.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2014 09:52

and CLOSE