Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365041 - Similar named entries in Surround with menu cause confusion
Summary: Similar named entries in Surround with menu cause confusion
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.8 M5   Edit
Assignee: Deepak Azad CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-29 06:25 EST by Deepak Azad CLA
Modified: 2012-01-05 08:50 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Deepak Azad CLA 2011-11-29 06:25:21 EST
In the Surround With menu there are two (confusing) items
1. Try/catch Block  - uses 'Code Templates'
2. try (try catch block) - based on 'Editor Templates'
The first one invokes the Surround With 'Refactoring' which will find the exact exceptions thrown from the selection and use those in the catch block. The second one, which uses the editor template, always uses 'Exception' in the catch block.

=> This can be quite confusing. 

Solution
1. Use icons in the Surround With menu
a) The 'green arrow' we use for Quick Assists can be used to indicate that the action is a refactoring
b) In Content Assist popup we use an icon to indicate template proposals, the same icon can be used here.

2. 'Configure Templates' action should also show the 'Code Template' node.
Comment 1 Deepak Azad CLA 2011-12-24 07:13:39 EST
Fixed in master - 52f1ab9ee335b34a6fc25ad2f613fcd4ed03ac67

The Surround With menu looks quite nice with the icons, and I think the icons make it clearer what the corresponding actions do.

(In reply to comment #0)
> 2. 'Configure Templates' action should also show the 'Code Template' node.
The only possible glitch in the fix is that the 'Code Style' node is not auto-expanded, and a user has to expand that to see the 'Code Templates' node. But I don't think that this is too bad.
Comment 2 Dani Megert CLA 2012-01-05 08:50:44 EST
(In reply to comment #1)
> Fixed in master - 52f1ab9ee335b34a6fc25ad2f613fcd4ed03ac67
> 
> The Surround With menu looks quite nice with the icons, and I think the icons
> make it clearer what the corresponding actions do.

+1.


> (In reply to comment #0)
> > 2. 'Configure Templates' action should also show the 'Code Template' node.
> The only possible glitch in the fix is that the 'Code Style' node is not
> auto-expanded, and a user has to expand that to see the 'Code Templates' node.
> But I don't think that this is too bad.

I've fixed that.