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

Bug 325359

Summary: 'Open from clipboard' menu entry should be available in all editor/views
Product: [Eclipse Project] PDE Reporter: Ankur Sharma <ankur_sharma>
Component: UIAssignee: Ankur Sharma <ankur_sharma>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: ankur_sharma, daniel_megert, darin.eclipse, deepakazad, markus.kell.r
Version: 3.7   
Target Milestone: 3.7 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Ankur Sharma CLA 2010-09-15 10:40:20 EDT
This is my use case

1. Copy a stack trace or type name from Mylyn Bugzilla editor. 
2. Open Navigate menu - the 'Open from clipboard' menu entry is disabled

To be able to use it, I have switch the focus to Package Explorer or any open Java editor. If you don't like Mylyn, the behavior is same with console view.

I request an enhancement to have the menu entry enabled and available regardless of active editor/view as this is an Open operation.
Comment 1 Deepak Azad CLA 2010-09-15 11:04:15 EDT
Ankur, which perspective were you using when you encountered this? (I cannot reproduce this in Java perspective)

I can reproduce with
- Plug-in development perspective
- No open editors
- focus in Outline view
(there might be other scenarios as well)

In the above case 'Open Type' and 'Open Type' from Hierarchy are available. I think Open from Clipboard should also be available when 'Open Type' is available.

I will investigate.
Comment 2 Dani Megert CLA 2010-09-15 12:08:52 EDT
The action is in the 'Java Debug' action set. Like always, you have to enable this action set to get the corresponding action.

>In the above case 'Open Type' and 'Open Type' from Hierarchy are available. I
>think Open from Clipboard should also be available when 'Open Type' is
>available.
This is because PDE enables the corresponding action set for its perspective. PDE could do the same for 'Java Debug', which would enable the action for all views inside that perspective.

There's nothing more we can/will do here. The same issue exists e.g. for 'Open Type' in the Team perspective.

Suggest to move to PDE for consideration.
Comment 3 Deepak Azad CLA 2010-09-16 01:00:07 EDT
(In reply to comment #2)
> This is because PDE enables the corresponding action set for its perspective.
> PDE could do the same for 'Java Debug', which would enable the action for all
> views inside that perspective.

Ankur, you could enable this action by default in Plug-in development perspective by adding the following

         <actionSet
               id="org.eclipse.jdt.debug.ui.JDTDebugActionSet">
         </actionSet>

to perspectiveExtenstions in plugin.xml of o.e.pde.ui

<extension
          point="org.eclipse.ui.perspectiveExtensions">
       <perspectiveExtension
            targetID="org.eclipse.pde.ui.PDEPerspective">

Alternatively you could simply use 'Window > Customize Perspective > Command Groups Availability' and select the 'Java Debug' group to be available in PDE, mylyn or any other perspective.
Comment 4 Ankur Sharma CLA 2010-09-23 13:53:51 EDT
After a lengthy discussion with Deepak, we are convinced that 'Java Debug' action set need not be added to PDE perspective as

1. it adds lot of entries to Run menu and makes it very long
2. there exists a workaround where user can customize perspective and add it manually.
3. the 'open from clipboard' is currently unavailable only when the active editor is not Java Editor.