Skip to main content



      Home
Home » Eclipse Projects » Sirius » Opening external browser
Opening external browser [message #1823681] Tue, 31 March 2020 02:06 Go to next message
Eclipse UserFriend
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 02:26 Go to previous messageGo to next message
Eclipse UserFriend
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 04:32 Go to previous messageGo to next message
Eclipse UserFriend
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 02:25 Go to previous message
Eclipse UserFriend
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: Tue Jun 17 18:26:05 EDT 2025

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

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

Back to the top