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 19:51:36.000000000

Uploaded patch set 7.

-------------------------------------
author: Brenden Conley
date: 2015-11-30 19:51:42.000000000

Patch Set 7:

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

-------------------------------------
author: Brenden Conley
date: 2015-11-30 20:21:20.000000000

Patch Set 7: Verified+1

Build Successful 

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

-------------------------------------
author: Kaylin Maxwell
date: 2015-11-30 22:51:48.000000000

Patch Set 7: Code-Review-1

(3 comments)

Line:630, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java -> As mentioned before, this won't work.  It is passed the image name from RunDockerImageLaunchDelegate.getDockerImage() from the Launch configuration dialog which is the tag (makes sense as users won't be able to choose an image id and know what it represents).  You are looking at the image id which will never match up.

Line:86, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/launch/LaunchConfigurationUtils.java -> Please leave this in place.  It should be used by all the launch tabs to make the button width consistent with all the other launch configuration tabs (e.g. CDT, Java) which use a minimum button size which is larger than we are getting for buttons such as Search.., Add....   This has nothing to do with the problem your patch is attempting to solve.

Line:577, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/launch/RunImageMainTab.java -> This causes an exception to occur on starting up the Run Image Launch configuration as I guess the selected image is null upon creation.  The image id is not restored on initializeFrom so I tried commenting out this setAttribute and then it works again.

-------------------------------------
author: Zechariah Krause
date: 2015-12-01 08:07:31.000000000

Patch Set 7:

(3 comments)

Comments taken into account.

Line:630, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java -> I added an 'IMAGE_ID' constant which is going to store the selected image id (unless no image was selected).

Line:86, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/launch/LaunchConfigurationUtils.java -> It's restored but not used in the code, AFAICS.
The only place where this method was called is in RunImageMainTab:254 but it was commented out in your commit.

Line:577, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/launch/RunImageMainTab.java -> Fixed by checking that the selected image is not null before setting the attributes in the launch configuration

-------------------------------------
author: Zechariah Krause
date: 2015-12-01 13:32:01.000000000

Patch Set 7:

(1 comment)

added a comment.

Line:86, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/launch/LaunchConfigurationUtils.java -> Actually, I am responsible for commenting this method call. I'll restore it in a new version of this patch.

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

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

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