Bug 144561

Summary: NPE in AbstractModelerPropertySection
Product: [Modeling] GMF-Runtime Reporter: Christian Damus <give.a.damus>
Component: GeneralAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 Keywords: contributed
Version: 1.0   
Target Milestone: 1.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
A tweak to avoid the NPE none

Description Christian Damus CLA 2006-05-30 18:20:58 EDT
The AbstractModelerPropertySection refreshes itself in a read-only transaction, assuming that a transactional context is available.  Sometimes, there isn't such a context, as for example when dealing with a proxy object (for which my application wants to show properties).

A fairly simple change to the executeAsReadAction() method will tolerate nulls by assuming that, without a transactional context, the runnable can just be run.
Comment 1 Christian Damus CLA 2006-05-30 18:23:46 EDT
Created attachment 43033 [details]
A tweak to avoid the NPE

Attached a patch that fixes the NPE for my scenario and allows the proxy to be displayed in my property section.
Comment 2 Steven R. Shaw CLA 2006-05-31 13:11:36 EDT
over to Anthony for evaluation...
Comment 3 Anthony Hunter CLA 2006-06-07 13:40:46 EDT
OK, committed the patch
Comment 4 Richard Gronback CLA 2008-08-13 13:05:46 EDT
[target cleanup] 1.0 RC5 was the original target milestone for this bug
Comment 5 Eclipse Webmaster CLA 2010-07-19 12:30:27 EDT
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug