Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345442 - NullPointerException in RenameActionProvider.fillContextMenu
Summary: NullPointerException in RenameActionProvider.fillContextMenu
Status: CLOSED FIXED
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.8.0   Edit
Assignee: Michael Wenz CLA
QA Contact:
URL:
Whiteboard: Indigo RC1 theme_bugs
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-11 11:16 EDT by Michael Wenz CLA
Modified: 2011-06-24 08:43 EDT (History)
0 users

See Also:
michael.wenz: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Wenz CLA 2011-05-11 11:16:01 EDT
Reported in https://bugs.eclipse.org/bugs/show_bug.cgi?id=345272:
----
when implementing the UpdateFeature i get the following NPE:

I just followed the instructions under "Test: Update a EClass Name"
When I invoke the context menu in the PROJECT EXPLORER under EClasses
I get the following exception. Is this a bug ?

PS. should i post this first to the forum instead of bugzilla ? 

!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
    at
org.eclipse.graphiti.examples.common.RenameActionProvider.fillContextMenu(RenameActionProvider.java:57)
    at
org.eclipse.ui.navigator.NavigatorActionService$2.run(NavigatorActionService.java:221)

as additional note: 
it also does not work with the delivered example so I think there must be some
bug
--- 
The RenameActionProvider gets an instance of an EClass with eResource == null
Comment 1 Michael Wenz CLA 2011-05-12 04:31:29 EDT
Problem was that all EClass objects in the tree were unloaded right after retrieving them for listing in the tree; because of that they are proxies only for which the eResource cannot be retrieved. I fixed this by modifying the time when the unload happens. For EClasses shown in the tree the unload is only performed before refreshing the tree not afterwards now.

Fixed in head.

Michael
Comment 2 Michael Wenz CLA 2011-05-12 10:58:47 EDT
Verified in install
Comment 3 Michael Wenz CLA 2011-06-24 08:43:46 EDT
Part of Graphiti Indigo 0.8.0