Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Coulon2015-08-31 12:23:47 +0000
committerRoland Grunberg2015-09-01 19:17:28 +0000
commite1bdd90fbb3c1286d364545a15a486ce9718395e (patch)
treebf44097f121e0c58a0c92fa0be12be1831ba11b4 /containers/org.eclipse.linuxtools.docker.core/src/org/eclipse
parent3e3dd8de7d0993f3321bd3226974b4b30f328a97 (diff)
downloadorg.eclipse.linuxtools-e1bdd90fbb3c1286d364545a15a486ce9718395e.tar.gz
org.eclipse.linuxtools-e1bdd90fbb3c1286d364545a15a486ce9718395e.tar.xz
org.eclipse.linuxtools-e1bdd90fbb3c1286d364545a15a486ce9718395e.zip
Bug 470577 - Docker Explorer does not show the latest image id after an image build
DockerExplorerView is now properly registered as a listener. Change-Id: I4a8c5a597f5c13c861613c45a413f4d669bccabb Signed-off-by: Xavier Coulon <xcoulon@redhat.com> Reviewed-on: https://git.eclipse.org/r/54882 Tested-by: Hudson CI Reviewed-by: Roland Grunberg <rgrunber@redhat.com> Tested-by: Roland Grunberg <rgrunber@redhat.com>
Diffstat (limited to 'containers/org.eclipse.linuxtools.docker.core/src/org/eclipse')
-rw-r--r--containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/IDockerContainerListener.java9
-rw-r--r--containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/IDockerImageListener.java11
-rw-r--r--containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java3
-rw-r--r--containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainerRefreshManager.java5
4 files changed, 20 insertions, 8 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/IDockerContainerListener.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/IDockerContainerListener.java
index 85924a1524..d92b310044 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/IDockerContainerListener.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/IDockerContainerListener.java
@@ -15,12 +15,13 @@ import java.util.List;
public interface IDockerContainerListener {
/**
- * Listener notification method
+ * Called when the list of {@link IDockerContainer} for the given
+ * {@link IDockerConnection} changed
*
* @param connection
- * - Docker connection
- * @param list
- * - new list of IDockerContainers
+ * - the Docker connection
+ * @param containers
+ * - the new list of {@link IDockerContainer}
*/
void listChanged(IDockerConnection connection, List<IDockerContainer> list);
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/IDockerImageListener.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/IDockerImageListener.java
index d1195a3b5b..1b63e526d4 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/IDockerImageListener.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/IDockerImageListener.java
@@ -14,6 +14,15 @@ import java.util.List;
public interface IDockerImageListener {
- void listChanged(IDockerConnection manager, List<IDockerImage> list);
+ /**
+ * Called when the list of {@link IDockerImage} for the given
+ * {@link IDockerConnection} changed
+ *
+ * @param connection
+ * - the Docker connection
+ * @param images
+ * - the new list of {@link IDockerImage}
+ */
+ void listChanged(IDockerConnection manager, List<IDockerImage> images);
}
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
index b550080f81..6881537ce7 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
@@ -672,7 +672,8 @@ public class DockerConnection implements IDockerConnection {
if (containerListeners != null) {
Object[] listeners = containerListeners.getListeners();
for (int i = 0; i < listeners.length; ++i) {
- ((IDockerContainerListener) listeners[i]).listChanged(this,
+ ((IDockerContainerListener) listeners[i])
+ .listChanged(this,
list);
}
}
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainerRefreshManager.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainerRefreshManager.java
index b94520f23c..152a27e606 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainerRefreshManager.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainerRefreshManager.java
@@ -38,8 +38,9 @@ public class DockerContainerRefreshManager implements IDockerContainerListener {
}
@Override
- public synchronized void listChanged(IDockerConnection connection,
- List<IDockerContainer> dclist) {
+ public synchronized void listChanged(
+ final IDockerConnection connection,
+ final List<IDockerContainer> dclist) {
ContainerRefreshThread rt = refreshThreadMap.get(connection);
if (rt == null) {

Back to the top