Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 291832 - [launch] Handle shortcut enablement evaluation exceptions
Summary: [launch] Handle shortcut enablement evaluation exceptions
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.8 M7   Edit
Assignee: Pawel Piech CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-08 16:52 EDT by Ben Vitale CLA
Modified: 2012-04-02 12:55 EDT (History)
2 users (show)

See Also:


Attachments
Proposed patch against HEAD (1.64 KB, patch)
2009-10-08 16:54 EDT, Ben Vitale CLA
no flags Details | Diff
Revised patch (2.89 KB, text/plain)
2009-10-09 12:55 EDT, Ben Vitale CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Vitale CLA 2009-10-08 16:52:06 EDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Build Identifier: I20090611-1540

When the various launch actions create an Expression to evaluate for purposes of enabling a particular shortcut, that evaluation may throw an exception. That exception is not being handled in a meaningful way, which makes troubleshooting broken shortcuts challenging.

Consider these two locations where the catch block is empty.

LaunchShortcutsAction:168
ContextualLaunchAction:221

Perhaps in these cases the status could at least be logged?

Reproducible: Always

Steps to Reproduce:
1. Set up a launch shortcut extension with an enablement clause.
2. Use the typical (with selection) -> (iterate) -> (some property tester that won't accept the type)
3. Fill a launch shortcut menu which causes the evaluation to fall out early due to broken property tester.
Comment 1 Ben Vitale CLA 2009-10-08 16:54:58 EDT
Created attachment 149173 [details]
Proposed patch against HEAD
Comment 2 Ben Vitale CLA 2009-10-09 12:55:00 EDT
Created attachment 149257 [details]
Revised patch

I noticed LaunchConfigurationManager has some handling that appears to make sense in the places I already mentioned; patch revised accordingly.
Comment 3 Pawel Piech CLA 2011-06-07 17:36:42 EDT
Reasonable request.