Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334855 - allowLabelUpdate does not work (was: Navigate > Open Declaration missing)
Summary: allowLabelUpdate does not work (was: Navigate > Open Declaration missing)
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 4.2 M7   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-20 03:11 EST by Dani Megert CLA
Modified: 2012-04-19 03:57 EDT (History)
4 users (show)

See Also:


Attachments
Patch v01 (5.32 KB, patch)
2011-07-14 10:14 EDT, Praveen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2011-01-20 03:11:46 EST
4.1 build: I20110118-1548.

Navigate > Open Declaration is missing.

1. start new workspace
2. paste "public class A {}" into Package Explorer
3. open the 'Navigate' main menu
==> 'Open Declaration (F3)' is missing.
Comment 1 Dani Megert CLA 2011-01-20 03:16:43 EST
Mh, F3 is there but it's called 'Open' instead of 'Open Declaration'.
Comment 2 Dani Megert CLA 2011-01-20 03:20:14 EST
I see: the action is defined as retargetable action with
allowLabelUpdate="true"

And this seems not to work.
Comment 3 Praveen CLA 2011-07-14 10:14:58 EDT
Created attachment 199668 [details]
Patch v01

Currently Eclipse does not register most of the retarget ActionSets defined in the extensions with the part listeners. Thus, whenever any part is activated, any of the retarget actions are not considered and thus, are not updated.

The patch enables makes sure the retarget Action Sets are registered with the part listeners and thus, they are updated when the appropriate view is activated.
Comment 4 Paul Webster CLA 2011-11-01 12:01:56 EDT
Remy, could you please have a look at this patch?

PW
Comment 5 Remy Suen CLA 2011-11-03 13:40:52 EDT
(In reply to comment #4)
> Remy, could you please have a look at this patch?

From some preliminary testing, the patch fixes the problem described by comment 0.
Comment 6 Remy Suen CLA 2011-11-04 10:48:09 EDT
(In reply to comment #3)
> Created attachment 199668 [details]
> Patch v01

It feels to me that a toggling action may potentially be a retarget action though I'm not sure. This patch seems to imply this won't happen given how the if statements are structured.
Comment 7 Eric Moffatt CLA 2011-12-09 13:10:13 EST
Aggregate move to M5. Retarget to a different milestone if you wish...
Comment 8 Dean Roberts CLA 2012-02-23 21:33:10 EST
Is this going to require similar (identical) code in DirectContributionItem?
Comment 9 Paul Webster CLA 2012-02-24 07:35:33 EST
(In reply to comment #8)
> Is this going to require similar (identical) code in DirectContributionItem?

It shouldn't.  DirectContributionItem is hooking up a MDMI to a menuitem.  It doesn't have a 3.x counterpart.

PW
Comment 10 Paul Webster CLA 2012-04-18 08:57:41 EDT
Fixed by bug 319704

PW
Comment 11 Dani Megert CLA 2012-04-19 03:57:24 EDT
Verified in 4.2-N20120418-2000 that this is working.