Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'containers')
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui.tests/src/org/eclipse/linuxtools/internal/docker/ui/testutils/swt/DockerImageHierarchyViewAssertions.java4
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/EnableConnectionCommandHandler.java2
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveConnectionCommandHandler.java2
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/CopyValueAction.java2
4 files changed, 5 insertions, 5 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.ui.tests/src/org/eclipse/linuxtools/internal/docker/ui/testutils/swt/DockerImageHierarchyViewAssertions.java b/containers/org.eclipse.linuxtools.docker.ui.tests/src/org/eclipse/linuxtools/internal/docker/ui/testutils/swt/DockerImageHierarchyViewAssertions.java
index 8e1291bf56..9b34847da8 100644
--- a/containers/org.eclipse.linuxtools.docker.ui.tests/src/org/eclipse/linuxtools/internal/docker/ui/testutils/swt/DockerImageHierarchyViewAssertions.java
+++ b/containers/org.eclipse.linuxtools.docker.ui.tests/src/org/eclipse/linuxtools/internal/docker/ui/testutils/swt/DockerImageHierarchyViewAssertions.java
@@ -60,7 +60,7 @@ public class DockerImageHierarchyViewAssertions
public void hasSelectedElement(final IDockerImage expectedSelection) {
notNullValue();
- final IStructuredSelection selection = (IStructuredSelection) actual.getCommonViewer().getSelection();
+ final IStructuredSelection selection = actual.getCommonViewer().getStructuredSelection();
if (selection.size() != 1) {
failWithMessage("Expected Docker Image Hierarchy view to have <%s> selected elements, but there was <%s>",
1, selection.size());
@@ -84,7 +84,7 @@ public class DockerImageHierarchyViewAssertions
public void hasSelectedElement(final Object expectedSelection) {
notNullValue();
- final IStructuredSelection selection = (IStructuredSelection) actual.getCommonViewer().getSelection();
+ final IStructuredSelection selection = actual.getCommonViewer().getStructuredSelection();
if (selection.size() != 1) {
failWithMessage("Expected Docker Image Hierarchy view to have <%s> selected elements, but there was <%s>",
1, selection.size());
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/EnableConnectionCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/EnableConnectionCommandHandler.java
index 4ab7e1668f..20d8fd1ecf 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/EnableConnectionCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/EnableConnectionCommandHandler.java
@@ -39,7 +39,7 @@ public class EnableConnectionCommandHandler extends AbstractHandler {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
if(activePart instanceof CommonNavigator) {
final CommonViewer viewer = ((CommonNavigator)activePart).getCommonViewer();
- final ITreeSelection selection = (ITreeSelection) viewer.getSelection();
+ final ITreeSelection selection = viewer.getStructuredSelection();
for (TreePath treePath : selection.getPaths()) {
final IDockerConnection conn = (IDockerConnection) treePath
.getLastSegment();
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveConnectionCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveConnectionCommandHandler.java
index 815f1a7ad8..9eb2b09a23 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveConnectionCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveConnectionCommandHandler.java
@@ -35,7 +35,7 @@ public class RemoveConnectionCommandHandler extends AbstractHandler {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
if(activePart instanceof CommonNavigator) {
final CommonViewer viewer = ((CommonNavigator)activePart).getCommonViewer();
- final ITreeSelection selection = (ITreeSelection) viewer.getSelection();
+ final ITreeSelection selection = viewer.getStructuredSelection();
Stream.of(selection.getPaths()).forEach(
p -> DockerConnectionManager.getInstance().removeConnection(
(IDockerConnection) p.getLastSegment()));
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/CopyValueAction.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/CopyValueAction.java
index fd3d8a9503..402e429d08 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/CopyValueAction.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/CopyValueAction.java
@@ -37,7 +37,7 @@ public class CopyValueAction extends Action {
@Override
public void run() {
- IStructuredSelection selection = (IStructuredSelection)treeViewer.getSelection();
+ IStructuredSelection selection = treeViewer.getStructuredSelection();
if (!selection.isEmpty()) {
StringBuilder sb = new StringBuilder();
boolean needEOL = false;

Back to the top