Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Opening external browser
Opening external browser [message #1823681] Tue, 31 March 2020 06:06 Go to next message
Avi Shaked is currently offline Avi ShakedFriend
Messages: 116
Registered: October 2019
Senior Member
Hi,

In
https://www.eclipse.org/sirius/doc/1.0.x/specifier/general/Model_Operations.html#standard_java_actions
it is mentioned that:
Quote:
org.eclipse.sirius.ui.business.api.action.openHelpSection
This external Java action can be used to open the Eclipse Help system (or actually any web page) on a specific section from inside a tool (typically a popup menu).


However, when I tried to use it to open a different webpage (specified using href), it always opens the help section and tries to get the href content within the help section address (127.0.0.1 ...).
Is there any way I can use this action to open a web page other than the help pages?

If not, can you suggest an alternative?

Thanks,
Avi
Re: Opening external browser [message #1823682 is a reply to message #1823681] Tue, 31 March 2020 06:26 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 347
Registered: July 2009
Senior Member
You might try something like:

PlatformUI.workbench.browserSupport.externalBrowser.openURL(new URL('https://your.website'))


(This code snippet is Xtend, so you need to replace properties by getters when using in Java).
Re: Opening external browser [message #1823690 is a reply to message #1823682] Tue, 31 March 2020 08:32 Go to previous messageGo to next message
Avi Shaked is currently offline Avi ShakedFriend
Messages: 116
Registered: October 2019
Senior Member
Thanks Axel.

I did try it at first but it did not work (I assume that it failed because I used this external call from within a VSM, so I will try it later after I prepare the plugin if I find no alternative).

Re: Opening external browser [message #1823786 is a reply to message #1823682] Thu, 02 April 2020 06:25 Go to previous message
Avi Shaked is currently offline Avi ShakedFriend
Messages: 116
Registered: October 2019
Senior Member
Ok, so I ended up implementing an externalJavaAction extension myself (details: "actionClass" referring to a function in my own Sirius design project, and a simpler function "id" that is used similarly in the External Java Action tool).

I think the documentation regarding the OpenHelpSection is misleading (I looked into the function's source, and it seems like it always turns on the help system, so there's no option to navigate to any webpage).

Regards,
Avi
Previous Topic:Sirius behavior changes when deployed into a eclipse plugin
Next Topic:Impossible to use External Java Action
Goto Forum:
  


Current Time: Mon Oct 19 20:54:06 GMT 2020

Powered by FUDForum. Page generated in 0.02148 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top