Bug 563660 - Show in of Open Resource Dialog does not include Project Explorer in the Debug perspective
Summary: Show in of Open Resource Dialog does not include Project Explorer in the Debu...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.14   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-28 05:40 EDT by Lars Vogel CLA
Modified: 2021-01-08 05:30 EST (History)
7 users (show)

See Also:


Attachments
Screenshot (171.07 KB, image/png)
2020-05-28 05:40 EDT, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2020-05-28 05:40:14 EDT
Created attachment 283044 [details]
Screenshot

Looks like a regression. Show in does not include the Project Explorer anymore in Eclipse SDK
Version: 2020-06 (4.16)
Build id: I20200525-0929
OS: Linux, v.5.4.0-31-generic, x86_64 / gtk 3.24.18, WebKit 2.28.2
Java version: 1.8.0_252
Comment 1 Lars Vogel CLA 2020-05-28 05:41:25 EDT
No recent changes in OpenResourceDialog (last one ~ 2 years ago).
Comment 2 Andrey Loskutov CLA 2020-05-28 05:48:26 EDT
That depends on selected perspective. Open "Git" one and you will see nothing, open "Java" and you will see everything.
Comment 3 Lars Vogel CLA 2020-05-28 05:52:50 EDT
(In reply to Andrey Loskutov from comment #2)
> That depends on selected perspective. Open "Git" one and you will see
> nothing, open "Java" and you will see everything.

Thanks Andrey. I was using the debug perspective, IMHO it should also be available here. Adjusted the bug report.
Comment 4 Sarika Sinha CLA 2020-05-28 06:19:30 EDT
Will CDT user in debug perspective be interested in that?

Debug perspective is common for Platform.
Comment 5 Lars Vogel CLA 2020-05-28 06:24:26 EDT
(In reply to Sarika Sinha from comment #4)
> Will CDT user in debug perspective be interested in that?
> 
> Debug perspective is common for Platform.

Jonah, can you answer that? AFAIK CDT uses project explorer so I would guess yes, CDT wants to have it also show in show in.
Comment 6 Jonah Graham CLA 2020-05-28 07:47:54 EDT
(In reply to Sarika Sinha from comment #4)
> Will CDT user in debug perspective be interested in that?

Yes.

A common theme that I am seeing (and one that I follow myself) is to be in Debug perspective (virtually) all the time.
Comment 7 Lars Vogel CLA 2020-06-02 10:12:00 EDT
Sarika, can you tell me how can be contributed?

As as got confirmation from Jonah that CDT wants it, we should add it especially as long term we plan to replace Package Explorer with Project Explorer.
Comment 8 Lars Vogel CLA 2020-06-03 05:37:20 EDT
Pierre-Yves, you seems to have work on a similar area before via https://git.eclipse.org/r/#/c/150213/8/org.eclipse.ui.workbench.texteditor/plugin.xml. Would you be interested in helping with this one?
Comment 9 Sarika Sinha CLA 2020-06-03 10:42:32 EDT
(In reply to Lars Vogel from comment #7)
> Sarika, can you tell me how can be contributed?
> 
> As as got confirmation from Jonah that CDT wants it, we should add it
> especially as long term we plan to replace Package Explorer with Project
> Explorer.

I don't have much idea about this.
Comment 10 Pierre-Yves Bigourdan CLA 2020-06-04 13:22:56 EDT
(In reply to Lars Vogel from comment #8)
> Pierre-Yves, you seems to have work on a similar area before via
> https://git.eclipse.org/r/#/c/150213/8/org.eclipse.ui.workbench.texteditor/
> plugin.xml. Would you be interested in helping with this one?

I'll try to have a look a it, probably not in the coming days/weeks though :)
Comment 11 Lars Vogel CLA 2020-09-16 04:48:58 EDT
Adding Alex, as he worked on a similar issue in Bug 550016. Alex, can you handle this bug as well?
Comment 12 Lars Vogel CLA 2020-10-29 10:31:04 EDT
Alex Blewitt, do you know / remember how to add Project Explorer to Open-With in the debug perspective? Would be nice to have this, but no one seems to know how to do this.
Comment 13 Alex Blewitt CLA 2020-10-30 06:18:19 EDT
(In reply to Lars Vogel from comment #11)
> Adding Alex, as he worked on a similar issue in Bug 550016. Alex, can you
> handle this bug as well?

Not sure I was involved with bug 550016 :)

The implementation for (e.g.) Show In System Explorer is picked up by the handler:

https://github.com/eclipse/eclipse.platform.ui/blob/master/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/handlers/ShowInSystemExplorerHandler.java

That's referenced in the plugin.xml file with a command, handler, and menuContribution.

https://github.com/eclipse/eclipse.platform.ui/blob/b78036673f090e2042afc4964a38556a197b7c76/bundles/org.eclipse.ui.ide/plugin.xml#L875-L880
https://github.com/eclipse/eclipse.platform.ui/blob/b78036673f090e2042afc4964a38556a197b7c76/bundles/org.eclipse.ui.ide/plugin.xml#L2391-L2399
https://github.com/eclipse/eclipse.platform.ui/blob/b78036673f090e2042afc4964a38556a197b7c76/bundles/org.eclipse.ui.ide/plugin.xml#L2185-L2200

The menu is visible when the condition referenced in the above is active:

https://github.com/eclipse/eclipse.platform.ui/blob/b78036673f090e2042afc4964a38556a197b7c76/bundles/org.eclipse.ui.ide/plugin.xml#L2520-L2543

So I suspect something similar will be the case for the Show In Project Explorer view will be present, probably via the handler's visibleWhen condition.
Comment 14 Alex Blewitt CLA 2020-10-30 06:54:53 EDT
So it turns out that this contribution isn't visible outside of the JDT perspective, because it's defined as a perspective extension of the JDT:

https://github.com/eclipse/eclipse.jdt.ui/blob/a2b5e55566dae05a95328bae0209bb6f1ad966c3/org.eclipse.jdt.ui/plugin.xml#L611-L615
Comment 15 Alex Blewitt CLA 2020-10-30 07:04:40 EDT
I suspect the easiest solution will be to evolve the showInProjectExplorer action to be a command instead, and then remove the showInPart contribution from the JDT so it doesn't show up twice.
Comment 16 Lars Vogel CLA 2021-01-08 05:30:08 EST
(In reply to Alex Blewitt from comment #15)
> I suspect the easiest solution will be to evolve the showInProjectExplorer
> action to be a command instead, and then remove the showInPart contribution
> from the JDT so it doesn't show up twice.

Sounds great, Alex. Thanks for the investigation, for some reason I did not receive an email about for update, might be one of these times, in which the email server for the foundation had problems. Can you provide a Gerrit for this conversion?