Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351957 - [spy][regression] Plug-in spy is not working correctly for Eclipse 4.x
Summary: [spy][regression] Plug-in spy is not working correctly for Eclipse 4.x
Status: CLOSED DUPLICATE of bug 356209
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-13 07:58 EDT by Ankur Sharma CLA
Modified: 2012-04-12 15:23 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ankur Sharma CLA 2011-07-13 07:58:41 EDT
Eclipse 4.2 Integration build I20110705-1340

1. Open Target preferences
2. Invoke plugin spy on it or any wizard that open from this page.

The spy does not gives out correct results. This works fine in 3.x
Comment 1 Curtis Windatt CLA 2012-02-09 17:02:26 EST
Moving to platform UI.  Any suggestions on a workaround? I suspect the proper solution is to split off a pde.runtime 4.x stream and obtain the required information from the model.

In 4.2 we get the incorrect shell.  Currently we call HandlerUtil.getActiveShell(event).  In 4.2 this returns the workbench shell, not the local shell where the spy command was invoked from.  Adding the following to the method obtains the local shell first.

Object o = getVariable(event, E4Workbench.LOCAL_ACTIVE_SHELL);
if (o instanceof Shell) {
  return (Shell) o;
}

Same thing happens when we call HandlerUtil.getCurrentSelection().
Comment 2 Thomas Schindl CLA 2012-02-09 17:05:53 EST
the live model tooling provides some introspection to the model:
* Widget-Tree
* Object-Tree with @Injection information
Comment 3 Paul Webster CLA 2012-02-13 08:42:57 EST
If you can add code to PDE that is a no-op in 3.8 and works in 4.2, that would be the best option (least pain :-)

The next best option would be to provide a hook in the main 3.8 bundles, and we'll write a plugin or fragment that we can build in 4.2 to enhance plugin spy.  That way, everything still lives in master.

PW
Comment 4 Michael Rennie CLA 2012-04-12 15:23:23 EDT

*** This bug has been marked as a duplicate of bug 356209 ***