DESCRIPTION

Bug 480401 - Create a launch configuration when running an image from wizard

Creating a LaunchConfiguration when the container starts, adding
  a creation_date attribute to be able to find the latest launch config
  for a given image name, when the user selects the image again to run
  another container.

Protecting the domain class initialization by checking that retrieved
  info from the client are not null.

Retrieving last launch configuration for the selected image name
  to prefill the wizard (some refactoring was required to pass
  the last launch configuration and fill the page models)

Added SWTBot tests

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


COMMENTS

author: Zechariah Krause
date: 2015-11-30 15:25:52.000000000

Uploaded patch set 6.

-------------------------------------
author: Brenden Conley
date: 2015-11-30 15:25:59.000000000

Patch Set 6:

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

-------------------------------------
author: Brenden Conley
date: 2015-11-30 15:43:18.000000000

Patch Set 6: Verified+1

Build Successful 

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

-------------------------------------
author: Kaylin Maxwell
date: 2015-11-30 18:09:31.000000000

Patch Set 6: Code-Review-1

(9 comments)

Line:170, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RunImageCommandHandler.java -> why are you removing waiting for the logging thread to stop?

Line:86, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/launch/LaunchConfigurationUtils.java -> why are you removing this as part of your patch?  Did you move it elsewhere?

Line:88, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/launch/RunDockerImageLaunchConfigurationDelegate.java -> This new getImage interface is based on image id whereas the RunImage launch configuration and wizard seems to be using image names from the pull-down.  You are asking for image name above and using it to feed to getImage().

Line:434, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/launch/RunImageMainTab.java -> Why are you changing these?  The model has WritableList inputs.

Line:433, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/launch/RunImageVolumesTab.java -> Again, why did you change from WritableList?

Line:624, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java -> As an alternative, you could leave the API from the interface and have it only exposed in the internal class.  The users would have to cast to DockerConnection, but they are internal classes probably.

Line:28, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/Messages.java -> Should leave this due to API restrictions (it is a public API).

Line:22, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/Messages.properties -> Leave this.

Line:95, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/IDockerConnection.java -> Further to our previous discussions, you will need to either create an IDockerConnection2 or add a default implementation here to keep minor API compatibility for an interface.

-------------------------------------
author: Zechariah Krause
date: 2015-11-30 19:43:03.000000000

Patch Set 6:

(5 comments)

replied to comments. Will introduce an IDockerConnection2 interface.

Line:170, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RunImageCommandHandler.java -> that was not meant to be removed. I will restore that block.

Line:86, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/launch/LaunchConfigurationUtils.java -> because it's not necessary from what I could see. Did you really need that hint to display the button ?

Line:434, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/launch/RunImageMainTab.java -> because if you set a new WritableList, the observable will keep looking for changes in the old reference and it will miss all new changes.

Line:28, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/Messages.java -> ok.

Line:22, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/Messages.properties -> ok

-------------------------------------
author: Zechariah Krause
date: 2015-11-30 19:47:01.000000000

Patch Set 6:

I think I'll make it simpler and not introduce a new IDockerConnection2 interface but instead, I'll cast to DockerConnection and use the public method but it won't be in the API.

-------------------------------------
author: Kaylin Maxwell
date: 2015-11-30 20:46:26.000000000

Patch Set 6:

(2 comments)

Line:86, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/launch/LaunchConfigurationUtils.java -> That's how CDT does it.  It keeps buttons consistent in minimum size.  Flip between the CDT/Java configurations and then the main tab of ours.  The Search button is too small and inconsistent with other configurations.  Same thing with Add/Remove/Edit.  I had fixed this using this method.  It was used but you commented out the call from the main tab.  It should be used by all the right-hand buttons next to our tables in the tabs and so I put it in the Utils so the logic could be shared.

Line:434, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/launch/RunImageMainTab.java -> Ok.

-------------------------------------
author: Gerrit Code Review
date: 2015-12-01 20:09:50.000000000

Change has been successfully cherry-picked as 6c859255f4bca47dfc8ace839ba28d07a9a2cc37 by Kaylin Maxwell

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