Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 280407

Summary: [design] Action's menu is cached and only updated when the viewpart is deactivated and reactivated
Product: [RT] RAP Reporter: Hasan Ceylan <hceylan>
Component: WorkbenchAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: hceylan
Version: 1.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: sr121
Attachments:
Description Flags
Removes the cache from the pulldown menu
none
Removes the cahce from the pulldown menu none

Description Hasan Ceylan CLA 2009-06-16 04:17:45 EDT
RĂ¼diger,

I am afraid it will take some time produce a snippet and it is unrealistic that I rip the code off of the project I am working on currently.

But I could track down the problem and found out that it is related to the fact that the menu is cached in 
BusinessViewToolBarManager.makeActionButton the menu is cached in action arrow and the cached menu is popped up within the arrow's selection listener.

I think the correct implementation should re-pull the menu from the action when the selection listener is invoked.

HAsan
Comment 1 Holger Staudacher CLA 2009-06-18 09:36:24 EDT
Created attachment 139538 [details]
Removes the cache from the pulldown menu

Hi Hasan,
the attached patch should fix this problem. Can you verify this solution?
Comment 2 Hasan Ceylan CLA 2009-06-18 10:21:57 EDT
Having applied the patch the pulldown button of the action has disappeared...

Hasan
Comment 3 Holger Staudacher CLA 2009-06-18 10:29:45 EDT
Created attachment 139542 [details]
Removes the cahce from the pulldown menu

Sorry my fault. I made changes after testing it. I have attached the right version. Can you pleasy test it again? Thank you.
Comment 4 Hasan Ceylan CLA 2009-07-09 07:18:47 EDT
(In reply to comment #3)
> Created an attachment (id=139542) [details]
> Removes the cahce from the pulldown menu
> 
> Sorry my fault. I made changes after testing it. I have attached the right
> version. Can you pleasy test it again? Thank you.
> 

Hello Holger,

The latest patch resolves the menu cache problem. 
However I have spotted one more problem with the drop down actions:
If the view is a form based view, the actions disappear...

Would you please let me know the time line for that?

Hasan
Comment 5 Holger Staudacher CLA 2009-07-12 10:28:45 EDT
Hi Hasan, this sounds like a new bug. I will proof the behaviour and open a new one.
Comment 6 Holger Staudacher CLA 2009-07-12 10:49:27 EDT
Hasan I can't verify this behaviour. Can you please provide some code to reproduce it and open a separate bug for this? Thanks.
Comment 7 Hasan Ceylan CLA 2009-07-17 09:28:47 EDT
(In reply to comment #6)
> Hasan I can't verify this behaviour. Can you please provide some code to
> reproduce it and open a separate bug for this? Thanks.
> 

Hello Holger,

I think it is rather then being a form based something else.
The common behaviour for our form are the data is passed after the view is created therefore the actions are added to the bars lazily after the initial creation phase.

I think this dould be it!

Regards,
Hasan
Comment 8 Holger Staudacher CLA 2009-07-20 16:34:32 EDT
Hi Hasan,
please post comments that belongs to the forms bug to bug 283276.

The attached patched icommitted to CVS HEAD and 1.2 maintenance.