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

Bug 428903

Summary: Having a common debug window for all spies
Product: [Eclipse Project] e4 Reporter: Olivier Prouvost <olivier.prouvost>
Component: ToolsAssignee: Olivier Prouvost <olivier.prouvost>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Lars.Vogel, wim.jongman
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Olivier Prouvost CLA 2014-02-24 08:18:45 EST
There are several spies : 

- Context spy
- Live model editor
- Event spy
- CSS Spy

As described in bug #428895 where I started this idea, it would be cool to have only one external window containing all the spies if there are launched. 

There would be only one short cut : Alt Shift F9 for instance (the first used for the live model editor). 

Depending on your launch configuration the different spies would appear in this window. A toolbar could be provided to make them appear if they are closable. 

May be a new bundle : org.eclipse.e4.tools.spy should be created as a common bundle for all spies. It would define : 

- a common processor to add the Alt Shift F9 binding
- a basic extension point to register a spy

Each spy could then extend this plugin and give the class of their part to add in this debug view. 

Any comment ?
Comment 1 Wim Jongman CLA 2014-02-24 08:21:07 EST
(In reply to Olivier Prouvost from comment #0)
> Any comment ?

+1
Comment 2 Lars Vogel CLA 2014-02-24 08:27:23 EST
(In reply to Olivier Prouvost from comment #0)

> Any comment ?

I would prefer to have still the shortcuts for the individual spys. I think it is rare that I want to investigate on the application model, the event system and the CSS at the same time.

But I would be nice to have the option to combine them.
Why not define a custom perspective for all these tools and in the perspective have the option to "Detach perspective as new window". 

In general the option to "detach a perspective as new window" would be a cool IDE feature.
Comment 3 Lars Vogel CLA 2014-02-24 08:53:13 EST
(In reply to Lars Vogel from comment #2)
> In general the option to "detach a perspective as new window" would be a
> cool IDE feature.

Silly me, Window -> New Window is exactly this. I think in this case a custom perspective would be the correct solution instead of a "special" solution with a shortcut opening a new window.
Comment 4 Olivier Prouvost CLA 2014-02-24 08:55:21 EST
Yes good idea...

The perspective and all the key binding stuff would be provided by the common plugin using the extension point...
Comment 5 Olivier Prouvost CLA 2014-03-08 09:56:41 EST
To fix this bug I propose : 

* to create a new plugin named : org.eclipse.e4.tools.spy 
* a new extension point  : org.eclipse.e4.tools.spy.spyPart

This extension point provides : name, part, shortcut, description and icon. The goal of this point is to have one code to manage the short cuts and to target a unique perspective or window. 

I propose to name the window : E4 spies. It will also contain a toolbar to open the spies directly (without having to know the short cuts). It will be easier to discover them.   

For instance, adding a new spy would be like this (no more processor to write) : 

<plugin>
   <extension
         point="org.eclipse.e4.tools.spy.spyPart">
      <spyPart
            description="open the live model editor"
            icon="icons/full/obj16/application_lightning.png"
            name="Model Spy"
            part="org.eclipse.e4.tools.emf.liveeditor.LivePartDelegator"
            shortcut="M2+M3+F9">
      </spyPart>
   </extension>
</plugin>

All the processors in all spies will be removed and replaced by this extension and a common SpyProcessor.

Concerned spies would be : event spy, css spy, live model editor, context spy, and other future spies (memory ? , ...). 

The plugin could also provide some common preferences (when it would be available).

Any idea around this ?
Comment 6 Lars Vogel CLA 2014-05-28 05:50:16 EDT
I think http://git.eclipse.org/c/e4/org.eclipse.e4.tools.git/commit/?id=063d4a133182bee3fb1fb7a8086f13d2b32dd1c9 broke the build

To test try to install the e4 core tools from http://download.vogella.com/luna/e4tools
Comment 7 Olivier Prouvost CLA 2014-05-28 07:41:30 EDT
Do you have the build report ? What is broken exactly ? The hudson report was actually ok in gerrit...
Comment 8 Lars Vogel CLA 2014-05-28 08:05:14 EDT
(In reply to Olivier Prouvost from comment #7)
> Do you have the build report ? What is broken exactly ? The hudson report
> was actually ok in gerrit...

To test try to install the e4 core tools from http://download.vogella.com/luna/e4tools 

I think you now include a new plug-in into a feature but this feature is not build.
Comment 9 Lars Vogel CLA 2014-05-28 08:06:39 EDT
(In reply to Olivier Prouvost from comment #7)
> Do you have the build report ? What is broken exactly ? The hudson report
> was actually ok in gerrit...

For clarification: "You broke the build result", i.e., the build itself works but the result cannot get installed. You can validate that locally by excecuting "mvn clean verify" and trying to install the result from the local update site.
Comment 10 Olivier Prouvost CLA 2014-05-28 13:16:40 EDT
Ok I got it ! 

It seems that the org.eclipse.e4.tools.spy must be added in all the existing features !

I check it locally and I will deliver it as soon as possible.

Sorry about that.
Comment 11 Olivier Prouvost CLA 2014-06-13 17:47:44 EDT
*** Bug 421452 has been marked as a duplicate of this bug. ***
Comment 12 Olivier Prouvost CLA 2014-06-13 17:59:00 EDT
For information, this bug is fixed for : live model editor, event spy and context spy. it has been merged in master for a month.

 The css spy and css scratch pad are in progress but not still delivered.
Comment 13 Olivier Prouvost CLA 2014-07-01 02:52:33 EDT
I pushed a patch for the css spy and scratch pad. 

https://git.eclipse.org/r/#/c/29220/

If everything is Ok I will remove definitively the dead code before closing this bug.
Comment 14 Olivier Prouvost CLA 2014-07-08 07:50:15 EDT
Now 5 spies are in the E4 Spy window : model spy (live model editor), context spy, css spy, scratchpad for css and event spy. 

It will be easy to add other spies (memory spy ?, network spy, ... ?) using the extension point : org.eclipse.e4.tools.spy.spyPart

Only the part and the shortcut must be provided and automatically the spy will be displayed in the E4 spies window. Of course, spies can always be put outside this window.


Latest gerrit review : https://git.eclipse.org/r/#/c/29591/ 

Fixed with latest commit (but there are 5 additionals before) : 

https://git.eclipse.org/c/e4/org.eclipse.e4.tools.git/commit/?id=e9feaae3b7d8a5680ab771964c47b7e448f0a37d