Closed eclipse-ocl-bot closed 5 hours ago
By Ed Willink on Jun 03, 2011 15:28
Cannot reproduce. Must be dependent on a complex preamble.
The NPE itself suggests that editor.getDocument() returned null.
A simple guard will at least just leave nothing happening quietly.
Since hard to reproduce patch for RC4 not essential.
By Ed Willink on Jun 03, 2011 15:59
Problem is that the OCLinEcore editor is editing a *.ecore file.
The OCLinEcore editor knows that the *.ecore is an Xtext resource and so the subsequent fragment makes sense.
The Console thinks the *.ecore is an Ecore resource and IAEs on the inconsistent fragment.
Need to normalize everything to Pivot URIs. Too hard for RC4.
Works ok from an *.oclinecore, except that the selection is a CS class rather than the AST class.
By Ed Willink on Aug 23, 2011 03:31
(In reply to comment #0)
RC3: In the OCLinEcore tutorial open Tutorial.ecore as OCLinEcore, selerct a reference and Open Declaration
java.lang.NullPointerException
Still cannot reproduce; perhaps Xtext fixed a race condition that allowed access to a half initialized editor. Anyway NPE guard added to OCLinEcoreEditorCallback$XtextEditor_EcoreEditor.getEObject.
(In reply to comment #2)
Problem is that the OCLinEcore editor is editing a *.ecore file.
It can go wrong both ways.
OCLConsolePage.refreshSelection now gets TypeManager to load the pivot for a selected Ecore or UML object.
OCLConsolePage's selectionChanged now converts a CS selection from an Outline to a pivot selection.
Fixes pushed to master.
By Ed Willink on Aug 23, 2011 03:33
Created attachment 201970 SR1 Fix for Console selections
:notepad_spiral: %5B348256%5D+Handle+Ecore+and+CS+selections+in+the+Console.patch
By Ed Willink on Aug 23, 2011 03:34
Please review patch for SR1.
By Axel Uhl on Aug 23, 2011 06:01
Source changes look ok to me, but Adolfo should again review too with a working xtext set-up.
By Ed Willink on Aug 29, 2011 04:07
Rebase following bug 351578 now in bug/348256sr1 branch.
Adolfo: any chance of oking it today for RC2?
By Adolfo Sanchez-Barbudo Herrera on Aug 29, 2011 14:50
Ed,
I'm sorry for the delay but I've been at home due to an illness...
Last week I had some problems with the Xtext test cases (still to be solved) in my local workspace and I'm afraid that I didn't try the issue in a second instance so I couldn't properly do the review.
On the other hand the code looked/looks OK to me... so feel free to commit it today.
Let's see if tomorrow I feel better to go to work and do the SR RC2, otherwise I'll do it from my home (probably in the afternoon/evening).
Best Regards,\ Adolfol.
By Ed Willink on Aug 29, 2011 16:19
Thanks. Hope you feel better soon.
Pushed to maintenance/R3_1 for SR1 RC2.
By Ed Willink on Nov 10, 2011 15:04
Bug 348251 has been marked as a duplicate of this bug.
By Ed Willink on May 20, 2013 11:35
CLOSED after a year in the RESOLVED state.
| --- | --- | | Bugzilla Link | 348256 | | Status | CLOSED FIXED | | Importance | P3 normal | | Reported | Jun 03, 2011 14:25 EDT | | Modified | May 20, 2013 11:35 EDT | | Version | 3.1.0 | | Reporter | Ed Willink |
Description
RC3: In the OCLinEcore tutorial open Tutorial.ecore as OCLinEcore, selerct a reference and Open Declaration
java.lang.NullPointerException\ at org.eclipse.ocl.examples.xtext.oclinecore.ui.OCLinEcoreEditorCallback$XtextEditor_EcoreEditor.getEObject(OCLinEcoreEditorCallback.java:108)\ at org.eclipse.ocl.examples.xtext.oclinecore.ui.OCLinEcoreEditorCallback$XtextEditor_EcoreEditor.access$1(OCLinEcoreEditorCallback.java:106)\ at org.eclipse.ocl.examples.xtext.oclinecore.ui.OCLinEcoreEditorCallback$XtextEditor_EcoreEditor$DummyResourceSet.getEObject(OCLinEcoreEditorCallback.java:89)\ at org.eclipse.xtext.ui.ecore.EcoreEditorOpener.selectAndReveal(EcoreEditorOpener.java:26)\ at org.eclipse.xtext.ui.editor.LanguageSpecificURIEditorOpener.open(LanguageSpecificURIEditorOpener.java:82)\ at org.eclipse.xtext.ui.editor.LanguageSpecificURIEditorOpener.open(LanguageSpecificURIEditorOpener.java:70)\ at org.eclipse.xtext.ui.editor.GlobalURIEditorOpener.open(GlobalURIEditorOpener.java:61)\ at org.eclipse.ocl.examples.xtext.essentialocl.ui.model.BaseURIEditorOpener.open(BaseURIEditorOpener.java:32)\ at org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink.open(XtextHyperlink.java:26)