| Summary: | [editor] NPE in Open Definition | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] OCL | Reporter: | Ed Willink <ed> | ||||
| Component: | Core | Assignee: | OCL Inbox <mdt-ocl-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | Ed Willink <ed> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | adolfosbh, eclipse | ||||
| Version: | 3.1.0 | ||||||
| Target Milestone: | SR1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows Vista | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Ed Willink
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. 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. (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. Created attachment 201970 [details]
SR1 Fix for Console selections
Please review patch for SR1. Source changes look ok to me, but Adolfo should again review too with a working xtext set-up. Rebase following bug 351578 now in bug/348256sr1 branch. Adolfo: any chance of oking it today for RC2? 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. Thanks. Hope you feel better soon. Pushed to maintenance/R3_1 for SR1 RC2. *** Bug 348251 has been marked as a duplicate of this bug. *** CLOSED after a year in the RESOLVED state. |