Bug 525305 – [API]Provide SWT.OpenUrl event (Linux implementation)

(For review/merge)

Linux implementation for OpenUrl event, with use of GDBus.
(As per original patch *1).

URL vs file detection done via "new URI(file).getScheme()".
I tested, this distinguishes URI's from files quite well.

  /myfile/  ./file  file  .. ->  (OpenFile)
  http://www.eclipse.org   mailto:my@mail.com  ..  -> (OpenUrl)

I've tested with latest launcher:
1) Via launcher:
eclipse http://www.eclipse.org /tmp/myFile

2) Via gdbus calls:
gdbus call --session --dest org.eclipse.swt --object-path
/org/eclipse/swt --method org.eclipse.swt.FileOpen
"['http://www.google.com', '/tmp/myFile']"

Patchset 2:
- Updated URL detection logic so that files/urls are properly

[1] Original patch:

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=525305
Change-Id: I6531989e3eb766fdf0715a0a9cb86c9ed2b973f3
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
4 files changed
tree: b02dd29caa3a2f4e721e025fe8dfd9a67eacf639
  1. bundles/
  2. examples/
  3. features/
  4. local-build/
  5. tests/
  6. .gitignore
  7. pom.xml
  8. README.md

Contributing to SWT

Thanks for your interest in this project.

Developer resources:

See the following description for how to contribute a feature or a bug fix to SWT.

Information regarding source code management, builds, coding standards, and more and be found under the following link.

Contributor License Agreement:

Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).


Contact the project developers via the project's “dev” list.

Search for bugs:

This project uses Bugzilla to track ongoing development and issues.

Create a new bug:

Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!