Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368595 - some contributions using org.eclipse.ui.menus no longer work in eclipse 4.2 M4
Summary: some contributions using org.eclipse.ui.menus no longer work in eclipse 4.2 M4
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 320478
Blocks: 331444
  Show dependency tree
 
Reported: 2012-01-13 17:32 EST by Winnie Lai CLA
Modified: 2012-02-22 14:06 EST (History)
9 users (show)

See Also:


Attachments
Screenshot depicting the behaviour in question. (8.77 KB, image/png)
2012-01-20 14:33 EST, Remy Suen CLA
no flags Details
Screenshot of update policy and number format (43.48 KB, image/png)
2012-01-20 15:03 EST, Marc Khouzam CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Winnie Lai CLA 2012-01-13 17:32:22 EST
Hello,

I find there are more menu and toolbar contributions through org.eclipse.ui.menus and org.eclipse.ui.commands extension points do not work in eclipse 4.2 M4 in compared to 4.2 M3, which already have a certain set of contributions through these extension points not working in compared to 3.7.x.

I listed some examples in the email below. Take an example in org.eclipse.debug.ui plugin, the watch command org.eclipse.debug.ui.actions.WatchCommand and handler org.eclipse.debug.internal.ui.actions.expressions.WatchHandler. When I select a variable in Variables View and bring up its context menu,  I see the watchHanlder is being called on methods like isEnabled, but I do not see the context menu item ‘Watch’ comes up in the context menu. This also happens to the variables view when I use eclipse 4.2 SDK to debug a java project. So I think it is a general issue.

Is it just broken in M4 that will be fixed in M5? Or is it an intent to start cutting the functionality of the compatibility layer for the release of 4.2?

Thanks,
Winnie


From: cdt-dev-bounces@eclipse.org [mailto:cdt-dev-bounces@eclipse.org] On Behalf Of Lai, Winnie
Sent: Friday, January 13, 2012 1:16 PM
To: cdt-dev@eclipse.org
Subject: [cdt-dev] cdt dsf on eclipse 4.2

Hello,

I am trying eclipse EPP CPP package 4.2 M3 and M4 and compare them with eclipse 3.7.1.  I find some dsf view commands are missing and some toolbar commands enable/disable state are not proper.

Here are some examples of the issues,
-  3.7.1 has view’s pull down menu ‘Number Format’ and ‘Update Policy’ in expression / registers / variables view.  However, 4.2 M3 does not have ‘Update Policy’ though it has ‘Number Format’, while  4.2 M4 does not have both ‘Number Format’ and ‘Update Policy’.
- 3.7.1 has context menu item ‘Watch’ in those views, but 4.2 M4 does not have the menu item.
- 3.7.1 variables view toolbar button has disabled state for add/remove/remove all global buttons, which is what I expected. However, 4.2 M3 and M4 have those  buttons enabled, and once I click on them, they get disabled.

Does anyone see similar issues on these views or other debug related views? Would they be related to e4 compatibility layer as to command-handler mechanism?

Thanks,
Winnie
Comment 1 Dani Megert CLA 2012-01-16 05:48:20 EST
See also bug 368694.
Comment 2 Remy Suen CLA 2012-01-20 14:33:10 EST
Created attachment 209849 [details]
Screenshot depicting the behaviour in question.

(In reply to comment #0)
> -  3.7.1 has view’s pull down menu ‘Number Format’ and ‘Update Policy’ in
> expression / registers / variables view.  However, 4.2 M3 does not have ‘Update
> Policy’ though it has ‘Number Format’, while  4.2 M4 does not have both ‘Number
> Format’ and ‘Update Policy’.

I installed CDT 8.0.0.201109151620 on 3.7.1 but don't see these menu items. What am I doing wrong?
Comment 3 Marc Khouzam CLA 2012-01-20 14:47:32 EST
You have to go to 
  Customize perspective...
  Command Groups Availability
and enable
  Debug Update Modes

This is probably related to Bug 320478
Comment 4 Paul Webster CLA 2012-01-20 14:49:45 EST
Are you talking about the popup menu contributions from  http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/debug/org.eclipse.cdt.debug.ui/plugin.xml like:

       <menuContribution
            locationURI="popup:org.eclipse.debug.ui.RegisterView?after=variableGroup">
            <menu 
                 id="org.eclipse.cdt.debug.ui.registerView_CVariableFormatMenu" 
            	 label="%CVariableFormatMenu.label">
             <visibleWhen>
             	<reference definitionId="org.eclipse.cdt.debug.ui.testAreNumberFormatsSupported"/>
             </visibleWhen>
               <dynamic
	               id="org.eclipse.cdt.debug.ui.numberFormats"
	               class="org.eclipse.cdt.debug.internal.ui.actions.NumberFormatsContribution">
	           </dynamic>
    		  <separator name="formatGroup" visible="false"/>	           
            </menu>         
       </menuContribution>

Those wouldn't appear in the view menu.

If that's not it, which declarations should we be looking at.


PW
Comment 5 Paul Webster CLA 2012-01-20 14:50:45 EST
(In reply to comment #4)
> Those wouldn't appear in the view menu.
> 

But yes they should appear in the view's context menu

PW
Comment 6 Marc Khouzam CLA 2012-01-20 15:03:02 EST
Created attachment 209851 [details]
Screenshot of update policy and number format

Here is a screenshot for the two menu items "Update policy" and "Number format".

Beyond customizing your perspective as mentioned in comment 3, you need to launch a C/C++ Debug session to see the "Number format" one.
Comment 7 Marc Khouzam CLA 2012-01-20 15:06:30 EST
(In reply to comment #6)
> Created attachment 209851 [details]
> Screenshot of update policy and number format

This screenshot shows the view drop-down menu, not the context-menu
Comment 8 Paul Webster CLA 2012-01-20 15:12:11 EST
(In reply to comment #7)
> 
> This screenshot shows the view drop-down menu, not the context-menu

Ah, I see them in the screenshot, thanx.  Where are they contributed from?

PW
Comment 9 Paul Webster CLA 2012-01-20 15:15:53 EST
I found Update Policies in http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/dsf/org.eclipse.cdt.dsf.ui/plugin.xml

PW
Comment 10 Marc Khouzam CLA 2012-01-20 15:18:15 EST
(In reply to comment #9)
> I found Update Policies in
> http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/dsf/org.eclipse.cdt.dsf.ui/plugin.xml

Same place for the NumberFormat
Comment 11 Remy Suen CLA 2012-01-20 16:23:27 EST
(In reply to comment #6)
> Beyond customizing your perspective as mentioned in comment 3, you need to
> launch a C/C++ Debug session to see the "Number format" one.

I can see the 'Number Format' one anyway on I20120119-2200.

(In reply to comment #0)
> - 3.7.1 has context menu item ‘Watch’ in those views, but 4.2 M4 does not have
> the menu item.

This seems to be working for me on I20120119-2200.

> - 3.7.1 variables view toolbar button has disabled state for add/remove/remove
> all global buttons, which is what I expected. However, 4.2 M3 and M4 have those
>  buttons enabled, and once I click on them, they get disabled.

This may be the same problem as bug 361562.
Comment 12 Paul Webster CLA 2012-02-08 10:53:17 EST
(In reply to comment #11)
> I can see the 'Number Format' one anyway on I20120119-2200.
> 
> (In reply to comment #0)
> > - 3.7.1 has context menu item ‘Watch’ in those views, but 4.2 M4 does not
> 
> This seems to be working for me on I20120119-2200.

Remy, so number format and watch are there for M5?  And then the last problem is related to bug 361562.

PW
Comment 13 Remy Suen CLA 2012-02-08 11:08:41 EST
(In reply to comment #12)
> Remy, so number format and watch are there for M5?  And then the last problem
> is related to bug 361562.

Yes, those are okay. Bug 361562 is the same problem as bug 370592.

We are still missing 'Update Policy' though because we cannot customize perspectives yet. Though that's not to say we are 100% sure it'll be fixed once perspectives can be customized.
Comment 14 Remy Suen CLA 2012-02-22 14:06:08 EST
(In reply to comment #13)
> We are still missing 'Update Policy' though because we cannot customize
> perspectives yet. Though that's not to say we are 100% sure it'll be fixed once
> perspectives can be customized.

I can customize the perspective as Marc mentioned in comment 3 and can now see 'Update Policy' with I20120221-2200 on Windows 7.