Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 133749 - [Contributions] Create WatchExpression action show up twice in Variables View
Summary: [Contributions] Create WatchExpression action show up twice in Variables View
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.2 RC3   Edit
Assignee: Eric Moffatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 53171 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-28 18:10 EST by Samantha Chan CLA
Modified: 2006-05-19 09:37 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samantha Chan CLA 2006-03-28 18:10:09 EST
*  Show logical structure is on.
*  Expand map until you see key and value.
*  Select from variable "map" to "value" field.  You need to multi-select to reproduce this.
*  You will see the "Create Watch Expression" action twice if you bring up the context menu.


Testcase:
		TreeMap map = new TreeMap();
		map.put("abc", "abc");
		map.put("cbc", "abc");
		map.put("dbc", "abc");
Comment 1 Kevin Barnes CLA 2006-03-30 15:46:33 EST
This behavior can be reproduced by selecting any JDIPlaceholderVariable along with any regular IVariable.
Comment 2 Kevin Barnes CLA 2006-03-30 16:21:27 EST
The WatchAction is contributed as an object contribution on IVariable. JDIPlaceholderVariable is an instance of IVariable, but it should not cause a second menu item to be created.

This is how WatchAction is contributed.
      <objectContribution
            objectClass="org.eclipse.debug.core.model.IVariable"
            id="org.eclipse.debug.ui.WatchActions">
         <action
               label="%Watch.label"
               icon="$nl$/icons/full/etool16/watch_exp.gif"
               helpContextId="variable_watch_action_context"
               class="org.eclipse.debug.internal.ui.actions.expressions.WatchAction"
               menubarPath="openOnGroup"
               enablesFor="+"
               id="org.eclipse.jdt.debug.ui.actions.WatchAction">
         </action>
      </objectContribution>


moving to workbench for comment
Comment 3 Eric Moffatt CLA 2006-04-27 10:25:10 EDT
Kevin, can you give me an example of what a JDIPlaceholderVariable might be?
Comment 4 Kevin Barnes CLA 2006-04-27 11:07:57 EDT
Sorry, a place holder variables are variables for which we only have a value (not a name). A logical structure is an example, the value that we display is the result of an evaluation, there's not usually a java variable directly associated with the value.
Comment 5 Eric Moffatt CLA 2006-05-01 11:21:34 EDT
Promoting to RC3...
Comment 6 Mike Wilson CLA 2006-05-01 12:09:45 EDT
This looks totally bogus, and we should fix it. carefully.
Comment 7 Eric Moffatt CLA 2006-05-04 13:30:10 EDT
Fixed in >20060503.
Comment 8 Eric Moffatt CLA 2006-05-08 10:16:48 EDT
Verified in RC3.
Comment 9 Eric Moffatt CLA 2006-05-15 14:33:24 EDT
*** Bug 53171 has been marked as a duplicate of this bug. ***