DESCRIPTION

Bug 479592 - Support for Docker Compose

Also added a 'DockerConnectionManager#getAllConnections()' method that
returns a list (can be empty) to use Java 8 Streams API
Also added a 'DockerConnectionManager#hasConnections()' to verify if there's
any connection (avoids checking for null and size > 0)

Refactored the BuildDockerImageJob by extracting common methods in a superclass.

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


COMMENTS

author: Zechariah Krause
date: 2016-08-22 06:25:22.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2016-08-22 06:25:29.000000000

Patch Set 3:

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

-------------------------------------
author: Brenden Conley
date: 2016-08-22 06:44:06.000000000

Patch Set 3: Verified+1

Build Successful 

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

-------------------------------------
author: Kaylin Maxwell
date: 2016-08-22 18:03:12.000000000

Patch Set 3: Code-Review-1

(5 comments)

Line:525, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/EditDockerConnectionPage.java -> nls marker

Line:44, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/consoles/StyledTextBuilder.java -> need nls markers in this file

Line:114, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerCompose.java -> need nls marker

Line:118, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerCompose.java -> needs nls string...same for strings below

Line:15, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/jobs/JobMessages.properties -> remove merge markers

-------------------------------------
author: Kaylin Maxwell
date: 2016-08-22 19:24:25.000000000

Patch Set 3:

I get the following on my RHEL 6.8 box.  I don't have docker-compose installed, but I would expect a better error than an NPE

java.lang.NullPointerException
	at org.eclipse.linuxtools.internal.docker.ui.consoles.DockerComposeConsoleUtils.lambda$0(DockerComposeConsoleUtils.java:55)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
	at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
	at org.eclipse.linuxtools.internal.docker.ui.consoles.DockerComposeConsoleUtils.findConsole(DockerComposeConsoleUtils.java:60)
	at org.eclipse.linuxtools.internal.docker.ui.jobs.DockerComposeUpJob.<init>(DockerComposeUpJob.java:69)
	at org.eclipse.linuxtools.internal.docker.ui.launch.DockerComposeUpLaunchConfigurationDelegate.launch(DockerComposeUpLaunchConfigurationDelegate.java:56)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
	at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
	at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

-------------------------------------
author: Zechariah Krause
date: 2016-08-23 07:18:02.000000000

Patch Set 3:

Thanks for the review, Arianna Johns !
I fixed all the missing 'nls' that you reported. I also removed some unused methods, fixed the NPE that you reported (it was due to a console.getType() returning null, from the stacktrace you provided). Also, I added a call to MessageDialog.openError() to display an error message to the user when the 'docker-compose' command failed to execute.

-------------------------------------
author: Gerrit Code Review
date: 2016-08-23 16:54:22.000000000

Change has been successfully cherry-picked as c0c70d37c102e8f4a74629c801d108f75c7b574b by Kaylin Maxwell

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