This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 415692 - Context menu can be corrupted if there is an invalid property tester
Summary: Context menu can be corrupted if there is an invalid property tester
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 4.3.1   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 412927
Blocks:
  Show dependency tree
 
Reported: 2013-08-22 11:40 EDT by Paul Webster CLA
Modified: 2013-08-28 14:13 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2013-08-22 11:40:59 EDT
Backport this to 4.3.1

+++ This bug was initially created as a clone of Bug #412927 +++

The attached plugin contributes a popup menu action which visibility depends on a property tester class that throws a NPE.
Eclipse E4 (ContributionsAnalyzer.isVisible(MCoreExpression, ExpressionContext)) catches only CoreException which causes such a contribution to corrupt a context menu on Windows (on Linux, this menu  isn't displayed at all).
Since the isVisible method is often called, it is possible that there are some other issues that are difficult to detect/debug.

Test case:
- install the attached plugin 
- right-click some resource 

Attached is a patch.
Comment 1 Paul Webster CLA 2013-08-22 12:06:33 EDT
Curtis, could you please review:
https://git.eclipse.org/r/15784

PW
Comment 2 Dani Megert CLA 2013-08-23 03:21:38 EDT
(In reply to comment #1)
> Curtis, could you please review:
> https://git.eclipse.org/r/15784
> 
> PW

Not that you can also directly add a reviewer on the change.
Comment 3 Dani Megert CLA 2013-08-23 03:22:14 EDT
(In reply to comment #2)
> (In reply to comment #1)
> > Curtis, could you please review:
> > https://git.eclipse.org/r/15784
> > 
> > PW
> 
> Not that you can also directly add a reviewer on the change.
Note ...
Comment 5 Paul Elder CLA 2013-08-28 14:13:31 EDT
Verified in build 4.3.0.M20130828-0800