Bug 144561 - NPE in AbstractModelerPropertySection
Summary: NPE in AbstractModelerPropertySection
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0   Edit
Hardware: PC Linux
: P3 major
Target Milestone: 1.0   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-05-30 18:20 EDT by Christian Damus CLA
Modified: 2008-08-13 13:05 EDT (History)
0 users

See Also:


Attachments
A tweak to avoid the NPE (1.35 KB, patch)
2006-05-30 18:23 EDT, Christian Damus CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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