DESCRIPTION

Bug 475883 - Add "Refresh" commands in the containers and images categories

Removed the 'Refresh' button in the Docker Explorer view toolbar
 as it was confusing and somehow misleading (it would reload
 the connections, that's all)
Added a single 'Refresh' command handler on the 'Containers' and 'Images'
  The 'Refresh' command associated with this handler
  is the default Eclipse 'Refresh' command, so the user can invoke
  the command from the 'File>Refresh' menu.

Refactored the IDockerConnectionManagerListener to specify the
 actual connection that was changed
Remove IDockerConnectionManagerListener implementation in both
 DockerContainersView and DockerImagesView since those views
 already respond to selection changes in the Docker Explorer view.
Changes above fix the problem where a connection with the same hash
 (eg: a connection was removed and then added back) would end up
 with the old DockerExplorerView$ContainerRefresher instance being
 registered instead of the new one.

Added groups for commands and specified the order in which commands
 should appear in the context menus (some declarations in plugin.xml
 were moved to ease the reading of the chaining between commands)

Added tests to verify that the list of containers and images changes
  in the Docker Explorer after calling the command.

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


COMMENTS

author: Zechariah Krause
date: 2015-11-17 09:37:32.000000000

Uploaded patch set 6.

-------------------------------------
author: Brenden Conley
date: 2015-11-17 09:37:38.000000000

Patch Set 6:

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

-------------------------------------
author: Brenden Conley
date: 2015-11-17 09:51:58.000000000

Patch Set 6: Verified+1

Build Successful 

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

-------------------------------------
author: Nathanael Holden
date: 2015-11-17 17:30:48.000000000

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

(8 comments)

This change seems to work when I test it out. Just some things to fix.

Line:26, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerClientFactory.java -> Do we need this ? It seems enough to just let the code stay in DockerConnection since that is our wrapper for the DockerClient. This would also clean up the getter/setter for DockerClientFactory which aren't really needed if we can set the client in DockerConnection.

Line:255, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerExplorerView.java -> Is there any reason to keep this if the class is internal ?

Line:338, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerExplorerView.java -> This should be removed.

Line:27, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/IDockerConnectionManagerListener.java -> If clients don't adopt this new method and continue to use the old one what will happen ? If it doesn't work, then this is technically an API breaking change.

org.eclipse.cdt.internal.docker.launcher.ContainerTab will still be using the older method unless that is updated as well.

Line:24, containers/org.eclipse.linuxtools.docker.ui.tests/src/org/eclipse/linuxtools/internal/docker/ui/testutils/MockDockerImageFactory.java -> You can use Collections.unmodifiableList from java.util instead of guava's ImmutableList.

Line:25, containers/org.eclipse.linuxtools.docker.ui.tests/src/org/eclipse/linuxtools/internal/docker/ui/testutils/MockDockerContainerFactory.java -> You can use Collections.unmodifiableList from java.util instead of guava's ImmutableList.

Line:74, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerExplorerContentProvider.java -> This should be removed.

Line:24, containers/org.eclipse.linuxtools.docker.ui.tests/META-INF/MANIFEST.MF -> I would try to avoid using guava as we might need to declare a uses CQ for it.

-------------------------------------
author: Gerrit Code Review
date: 2015-11-18 16:11:37.000000000

Change has been successfully cherry-picked as 2805b01eb025e8af85ebeb7b30e87591c71e63ea by Zechariah Krause

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