DESCRIPTION

Bug 479856 - Add "Show in>Web Browser" and "Show in>File Browser"

Added a menu entry in the popup for the "Show In" group
Added 2 menu contributions, one for the Web browser when
 a DockerContainerPort is selected, and the other one
 when a DockerContainerVolume is selected

Opening in the System Explorer reuses some code borrowed
 from org.elipse.ui.ide with some adaptations because
 the host directory for the container volume is not
 necessarily a file or a folder in the workspace, hence
 it cannot be adapted (as in IAdaptable) into an IResource

Change-Id: Ief810a5b89072c0eed673363df93efb0800ed80d
Signed-off-by: Zechariah Krause xxx@xxx.xxx


COMMENTS

author: Zechariah Krause
date: 2015-11-19 17:52:46.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2015-11-19 17:52:52.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/10089/

-------------------------------------
author: Brenden Conley
date: 2015-11-19 18:09:28.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/10089/ : SUCCESS

-------------------------------------
author: Nathanael Holden
date: 2015-11-19 19:38:43.000000000

Patch Set 1: Code-Review-1 Verified+1

(4 comments)

Seems to work fine, but why are we adding DockerContainerPortMapping when we already have an interface and implementation for it ?

Line:58, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/ShowInWebBrowserCommandHandler.java -> I haven't found a way to do it but if there were multiple selected port mappings, couldn't we open each one also, intsead of just the first one selected ?

Line:62, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/ShowInWebBrowserCommandHandler.java -> It seems like 'unix' should work as well. If a connection is a unix socket then the host is 'localhost', or '127.0.0.1'. In fact this is _usually_ the case.

Line:443, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerExplorerContentProvider.java -> Why is this being created instead of using IDockerPortMapping.

Line:52, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/ShowInSystemExplorerCommandHandler.java -> How necessary is having this handler? AFAICT it's just focusing on the file/folder on the host side.

-------------------------------------
author: Zechariah Krause
date: 2015-11-19 20:46:28.000000000

Patch Set 1:

(4 comments)

> (4 comments)
 > 
 > Seems to work fine, but why are we adding DockerContainerPortMapping
 > when we already have an interface and implementation for it ?

Line:58, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/ShowInWebBrowserCommandHandler.java -> No, I think the user will want to open the selected port, nothing else.

Line:62, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/ShowInWebBrowserCommandHandler.java -> Done

Line:443, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerExplorerContentProvider.java -> Because I need the parent container for the selected port mapping.

Line:52, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/ShowInSystemExplorerCommandHandler.java -> Runtime.getRuntime().exec() in getLaunchProcess() (line 96) takes a File as a last parameter.

-------------------------------------
author: Gerrit Code Review
date: 2015-11-19 21:56:51.000000000

Change has been successfully cherry-picked as 67af2cf84c9672e52906fd633b7921680faab5ed by Nathanael Holden

-------------------------------------
