How can usiSchemaHandlers be used in internal web browser?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

How can usiSchemaHandlers be used in internal web browser?

Mickael Istria-5
Hi all,

I'm brainstorming about possibilities to improve and simplify Marketplace integration in Eclipse IDE, ideally by reducing the amount of specific UI it uses and leveraging more the website (so we maintain a single web UI to consume in the IDE instead of having another view to maintain it it as well).
I see MPC has enabled support for `eclipse+mpc` protocol handler, that's great as invoking some CLI like `eclipse eclipse+mpc://<a href="http://marketplace.eclipse.org/install/1640500`">marketplace.eclipse.org/install/1640500` works fine.
However, I was expected that such `eclipse+mpc` links in the Internal Web Browser would trigger the protocol handler and thus show the Marketplace Client dialog but it was not the case.
So I'm curious about the cases where those protocol handlers are supposed to work out of the box? Is there some setting, or preference or some existing views where I can have a such links working on a single click?
If not, are there bugs open on this topic I could monitor/participate to?

Thanks in advance

--
Mickael Istria
Eclipse IDE developer, for Red Hat Developers

_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can usiSchemaHandlers be used in internal web browser?

Ed Merks-2

Did you enable Window -> Preferences -> General -> Link Handlers for the eclipse+mpc scheme?  Certainly that's needed for clicks of eclipse-mpc scheme links a browser to work.

On 07.04.2020 18:10, Mickael Istria wrote:
Hi all,

I'm brainstorming about possibilities to improve and simplify Marketplace integration in Eclipse IDE, ideally by reducing the amount of specific UI it uses and leveraging more the website (so we maintain a single web UI to consume in the IDE instead of having another view to maintain it it as well).
I see MPC has enabled support for `eclipse+mpc` protocol handler, that's great as invoking some CLI like `eclipse <a class="moz-txt-link-freetext" href="eclipse+mpc://">eclipse+mpc://<a href="http://marketplace.eclipse.org/install/1640500`" moz-do-not-send="true">marketplace.eclipse.org/install/1640500` works fine.
However, I was expected that such `eclipse+mpc` links in the Internal Web Browser would trigger the protocol handler and thus show the Marketplace Client dialog but it was not the case.
So I'm curious about the cases where those protocol handlers are supposed to work out of the box? Is there some setting, or preference or some existing views where I can have a such links working on a single click?
If not, are there bugs open on this topic I could monitor/participate to?

Thanks in advance

--
Mickael Istria
Eclipse IDE developer, for Red Hat Developers

_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev

_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can usiSchemaHandlers be used in internal web browser?

Mickael Istria-5
On Tue, Apr 7, 2020 at 6:18 PM Ed Merks <[hidden email]> wrote:

Did you enable Window -> Preferences -> General -> Link Handlers for the eclipse+mpc scheme?  Certainly that's needed for clicks of eclipse-mpc scheme links a browser to work.


I tried that and that didn't work for me, both in internal and external browser.

_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can usiSchemaHandlers be used in internal web browser?

Rolf Theunissen
Hi,

I did not know about the link handlers defined there. For a custom widget we made an extension to process custom links in the browser. We extended WebBrowserEditor to add a location listener, see below. I don't think that the default WebBrowser processes the Link Handlers as defined in the preferences.

Rolf

@Override
public void createPartControl(org.eclipse.swt.widgets.Composite parent) {
   super.createPartControl(parent);
   webBrowser.getBrowser().addLocationListener(new LocationAdapter() {
     @Override
     public void changing(LocationEvent event) {
        // Do something like opening an editor (in case of platform:/resource/ uri)
     }
   });
}

Op di 7 apr. 2020 om 18:29 schreef Mickael Istria <[hidden email]>:
On Tue, Apr 7, 2020 at 6:18 PM Ed Merks <[hidden email]> wrote:

Did you enable Window -> Preferences -> General -> Link Handlers for the eclipse+mpc scheme?  Certainly that's needed for clicks of eclipse-mpc scheme links a browser to work.


I tried that and that didn't work for me, both in internal and external browser.
_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev

_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can usiSchemaHandlers be used in internal web browser?

Mickael Istria-5
Thanks everyone,
@Ed: I think what you meantioned should work for external browsers, however as I'm either using Flatpak or lauch a local eclipse IDE via CLI and without a .desktop file installed on Linux, the association of the URI scheme with the OS doesn't complete fully, so the external links are still not resolved. I've opened an issue about it for the Flatpak story: https://github.com/flathub/org.eclipse.Java/issues/7
@Rolf: Thanks, that makes sense. I started drafting support for URISchemeProcessors in BrowserViewer, see https://git.eclipse.org/r/160623

_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can usiSchemaHandlers be used in internal web browser?

Becker, Matthias
In reply to this post by Mickael Istria-5

Hi Mickael,

 

I think the idea of the eclipse+mpc uri scheme was to replace the drag&drop of an link from the marketplace to the eclipse window with a more intuitive way. So user’s would simply click a link on the marketplace website.

I don’t know why the marketplace website does not render these links at the moment.

The downside of this is (currently) that the user explicitly has to enable this link hander on the link handers pref page. We did not implement an automatic registration because this writes stuff into the OS and we think such

stuff should always be triggered by a user-interaction.

One could think about an enhancement that proactively asks the users if he wants to enable a new link handler. Oomph could do that when you install a new eclipse but we also need a way to enable this when oomph is not used.

We could fire up a dialog (delayed at the start of the IDE) that basically shows the table from the link handers pref page asking which handlers should be activated. But this would something new to the Eclipse IDE. I never have seen

such (very intrusive) dialogs in the Eclipse IDE.

 

Regarding the internal web browser. Isn’t that just an embedded browser. So I would assume that once the link handler is successfully registered in the OS that links in the internal browsers also works as in the external browser…

 

Regards,

Matthias

 

From: <[hidden email]> on behalf of Mickael Istria <[hidden email]>
Reply to: "Eclipse platform general developers list." <[hidden email]>
Date: Tuesday, 7. April 2020 at 18:12
To: "Eclipse platform general developers list." <[hidden email]>
Subject: [platform-dev] How can usiSchemaHandlers be used in internal web browser?

 

Hi all,

 

I'm brainstorming about possibilities to improve and simplify Marketplace integration in Eclipse IDE, ideally by reducing the amount of specific UI it uses and leveraging more the website (so we maintain a single web UI to consume in the IDE instead of having another view to maintain it it as well).

I see MPC has enabled support for `eclipse+mpc` protocol handler, that's great as invoking some CLI like `eclipse eclipse+mpc://marketplace.eclipse.org/install/1640500` works fine.

However, I was expected that such `eclipse+mpc` links in the Internal Web Browser would trigger the protocol handler and thus show the Marketplace Client dialog but it was not the case.

So I'm curious about the cases where those protocol handlers are supposed to work out of the box? Is there some setting, or preference or some existing views where I can have a such links working on a single click?

If not, are there bugs open on this topic I could monitor/participate to?

 

Thanks in advance


--

Mickael Istria

Eclipse IDE developer, for Red Hat Developers


_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can usiSchemaHandlers be used in internal web browser?

Becker, Matthias
In reply to this post by Rolf Theunissen

Hi Rolf,

 

this is a quite new feature that was introduces in platform 4.10 see: https://www.eclipse.org/eclipse/news/4.10/platform.php#link-handlers

I would assume that once a link handler is registered on OS level that this also works in the internal web browser and that such specific code is not necessary.

 

Regards,

Matthias

 

From: <[hidden email]> on behalf of Rolf Theunissen <[hidden email]>
Reply to: "Eclipse platform general developers list." <[hidden email]>
Date: Tuesday, 7. April 2020 at 18:51
To: "Eclipse platform general developers list." <[hidden email]>
Subject: Re: [platform-dev] How can usiSchemaHandlers be used in internal web browser?

 

Hi,

 

I did not know about the link handlers defined there. For a custom widget we made an extension to process custom links in the browser. We extended WebBrowserEditor to add a location listener, see below. I don't think that the default WebBrowser processes the Link Handlers as defined in the preferences.

 

Rolf

 

@Override
public void createPartControl(org.eclipse.swt.widgets.Composite parent) {
   super.createPartControl(parent);
   webBrowser.getBrowser().addLocationListener(new LocationAdapter() {
     @Override
     public void changing(LocationEvent event) {

        // Do something like opening an editor (in case of platform:/resource/ uri)

     }
   });
}

 

Op di 7 apr. 2020 om 18:29 schreef Mickael Istria <[hidden email]>:

On Tue, Apr 7, 2020 at 6:18 PM Ed Merks <[hidden email]> wrote:

Did you enable Window -> Preferences -> General -> Link Handlers for the eclipse+mpc scheme?  Certainly that's needed for clicks of eclipse-mpc scheme links a browser to work.

 

I tried that and that didn't work for me, both in internal and external browser.

_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev


_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can usiSchemaHandlers be used in internal web browser?

Rolf Theunissen
In reply to this post by Becker, Matthias
Hi Matthias,

I would also assume that if the link handler is correctly registered it would work also work for the internal browser. However, I really wonder what the interaction would be when using multiple instances of Eclipse. I heavily use Oomph and as a result I have dozens of Eclipse installations. How to ensure that the link is opened in a specific instance? How to ensure that is handled by the current instance?

Regards,
Rolf

Op wo 8 apr. 2020 om 08:17 schreef Becker, Matthias <[hidden email]>:

Hi Mickael,

 

I think the idea of the eclipse+mpc uri scheme was to replace the drag&drop of an link from the marketplace to the eclipse window with a more intuitive way. So user’s would simply click a link on the marketplace website.

I don’t know why the marketplace website does not render these links at the moment.

The downside of this is (currently) that the user explicitly has to enable this link hander on the link handers pref page. We did not implement an automatic registration because this writes stuff into the OS and we think such

stuff should always be triggered by a user-interaction.

One could think about an enhancement that proactively asks the users if he wants to enable a new link handler. Oomph could do that when you install a new eclipse but we also need a way to enable this when oomph is not used.

We could fire up a dialog (delayed at the start of the IDE) that basically shows the table from the link handers pref page asking which handlers should be activated. But this would something new to the Eclipse IDE. I never have seen

such (very intrusive) dialogs in the Eclipse IDE.

 

Regarding the internal web browser. Isn’t that just an embedded browser. So I would assume that once the link handler is successfully registered in the OS that links in the internal browsers also works as in the external browser…

 

Regards,

Matthias

 

From: <[hidden email]> on behalf of Mickael Istria <[hidden email]>
Reply to: "Eclipse platform general developers list." <[hidden email]>
Date: Tuesday, 7. April 2020 at 18:12
To: "Eclipse platform general developers list." <[hidden email]>
Subject: [platform-dev] How can usiSchemaHandlers be used in internal web browser?

 

Hi all,

 

I'm brainstorming about possibilities to improve and simplify Marketplace integration in Eclipse IDE, ideally by reducing the amount of specific UI it uses and leveraging more the website (so we maintain a single web UI to consume in the IDE instead of having another view to maintain it it as well).

I see MPC has enabled support for `eclipse+mpc` protocol handler, that's great as invoking some CLI like `eclipse eclipse+mpc://marketplace.eclipse.org/install/1640500` works fine.

However, I was expected that such `eclipse+mpc` links in the Internal Web Browser would trigger the protocol handler and thus show the Marketplace Client dialog but it was not the case.

So I'm curious about the cases where those protocol handlers are supposed to work out of the box? Is there some setting, or preference or some existing views where I can have a such links working on a single click?

If not, are there bugs open on this topic I could monitor/participate to?

 

Thanks in advance


--

Mickael Istria

Eclipse IDE developer, for Red Hat Developers

_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev

_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can usiSchemaHandlers be used in internal web browser?

Mickael Istria-5
In reply to this post by Becker, Matthias
Thanks Matthias,
If you have the opportunity to look at the patch, it'd be great to have your opinion on it.
With this patch, the link handler isn't delegated to the OS, it keeps looking at the current Eclipse instance, which is preferred in the case of internal browser I guess.
The internal browser doesn't delegate unknown scheme to the OS currently as far as I could see (I tried magnet: and mailto: ), and the browser says "The URL can’t be shown" without further action, like it does for eclipse+mpc: before the patch.


_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can usiSchemaHandlers be used in internal web browser?

Becker, Matthias
In reply to this post by Rolf Theunissen

Hi Rolf,

 

as far as I know you can only register once application in the operating system that handles a given URI schemes. And that is also handled in the link handlers pref page.

If we find out that a uri scheme is handles by another application (not the binary currently running) we don’t let the user activate the handler in this eclipse instance

because we would “steal” the uri scheme from another application. This other application may even be a none-eclipse based application and this app may not have

a setting similar to the “link handlers” pref page to re-enabled it’s handler there.

We could think about a “Activate Anyway” option in the link handler’s pref page if the user “really really” what’s to “steal” the link handler from another app.

 

But once again: Only one app hand handle an URI scheme (and that’s an OS limitation and not an eclipse limitation).


Regards,

Matthias

 

From: <[hidden email]> on behalf of Rolf Theunissen <[hidden email]>
Reply to: "Eclipse platform general developers list." <[hidden email]>
Date: Wednesday, 8. April 2020 at 08:28
To: "Eclipse platform general developers list." <[hidden email]>
Subject: Re: [platform-dev] How can usiSchemaHandlers be used in internal web browser?

 

Hi Matthias,

 

I would also assume that if the link handler is correctly registered it would work also work for the internal browser. However, I really wonder what the interaction would be when using multiple instances of Eclipse. I heavily use Oomph and as a result I have dozens of Eclipse installations. How to ensure that the link is opened in a specific instance? How to ensure that is handled by the current instance?

 

Regards,

Rolf

 

Op wo 8 apr. 2020 om 08:17 schreef Becker, Matthias <[hidden email]>:

Hi Mickael,

 

I think the idea of the eclipse+mpc uri scheme was to replace the drag&drop of an link from the marketplace to the eclipse window with a more intuitive way. So user’s would simply click a link on the marketplace website.

I don’t know why the marketplace website does not render these links at the moment.

The downside of this is (currently) that the user explicitly has to enable this link hander on the link handers pref page. We did not implement an automatic registration because this writes stuff into the OS and we think such

stuff should always be triggered by a user-interaction.

One could think about an enhancement that proactively asks the users if he wants to enable a new link handler. Oomph could do that when you install a new eclipse but we also need a way to enable this when oomph is not used.

We could fire up a dialog (delayed at the start of the IDE) that basically shows the table from the link handers pref page asking which handlers should be activated. But this would something new to the Eclipse IDE. I never have seen

such (very intrusive) dialogs in the Eclipse IDE.

 

Regarding the internal web browser. Isn’t that just an embedded browser. So I would assume that once the link handler is successfully registered in the OS that links in the internal browsers also works as in the external browser…

 

Regards,

Matthias

 

From: <[hidden email]> on behalf of Mickael Istria <[hidden email]>
Reply to: "Eclipse platform general developers list." <[hidden email]>
Date: Tuesday, 7. April 2020 at 18:12
To: "Eclipse platform general developers list." <[hidden email]>
Subject: [platform-dev] How can usiSchemaHandlers be used in internal web browser?

 

Hi all,

 

I'm brainstorming about possibilities to improve and simplify Marketplace integration in Eclipse IDE, ideally by reducing the amount of specific UI it uses and leveraging more the website (so we maintain a single web UI to consume in the IDE instead of having another view to maintain it it as well).

I see MPC has enabled support for `eclipse+mpc` protocol handler, that's great as invoking some CLI like `eclipse eclipse+mpc://marketplace.eclipse.org/install/1640500` works fine.

However, I was expected that such `eclipse+mpc` links in the Internal Web Browser would trigger the protocol handler and thus show the Marketplace Client dialog but it was not the case.

So I'm curious about the cases where those protocol handlers are supposed to work out of the box? Is there some setting, or preference or some existing views where I can have a such links working on a single click?

If not, are there bugs open on this topic I could monitor/participate to?

 

Thanks in advance


--

Mickael Istria

Eclipse IDE developer, for Red Hat Developers

_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev


_______________________________________________
platform-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev