Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2015-05-22 06:45:55 -0400
committerRoland Grunberg2015-06-02 17:45:16 -0400
commite6c61ceb202e06db3e32c2e27d86e07627d6537f (patch)
treeed9f13e6b1ee1b0717c209db93a4162964b9df40
parent604ec6fffb57d20a4d3114b2b25e7811e5040d31 (diff)
downloadorg.eclipse.linuxtools-e6c61ceb202e06db3e32c2e27d86e07627d6537f.tar.gz
org.eclipse.linuxtools-e6c61ceb202e06db3e32c2e27d86e07627d6537f.tar.xz
org.eclipse.linuxtools-e6c61ceb202e06db3e32c2e27d86e07627d6537f.zip
docker: Enable warnings and fix them in docker.ui.
Change-Id: Id04cfcb1d9dba83ad763230015e114caaf0f2d5f Signed-off-by: Alexander Kurtakov <akurtako@redhat.com> Reviewed-on: https://git.eclipse.org/r/48447 Tested-by: Hudson CI Reviewed-on: https://git.eclipse.org/r/49256 Reviewed-by: Roland Grunberg <rgrunber@redhat.com>
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/.settings/org.eclipse.jdt.core.prefs94
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/.settings/org.eclipse.jdt.ui.prefs2
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/Activator.java20
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/launch/ContainerLauncher.java10
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/RunConsole.java2
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/AddConnectionCommandHandler.java10
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BaseContainersCommandHandler.java6
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BaseImagesCommandHandler.java6
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BuildImageCommandHandler.java7
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CommandUtils.java3
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CommitContainerCommandHandler.java7
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CreateContainerCommandHandler.java7
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/DisplayContainerLogCommandHandler.java7
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/PullImageCommandHandler.java7
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/PushImageCommandHandler.java7
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshConnectionsCommandHandler.java3
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshContainersCommandHandler.java7
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshImagesCommandHandler.java7
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveConnectionCommandHandler.java9
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveContainerLogCommandHandler.java7
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveContainersCommandHandler.java2
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveImagesCommandHandler.java2
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveTagCommandHandler.java7
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/TagImageCommandHandler.java7
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/preferences/DockerPreferencePage.java3
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/preferences/PreferenceInitializer.java7
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/utils/UIUtils.java3
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerContainersView.java5
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerExplorerView.java1
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerImagesView.java5
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImagePullProgressHandler.java2
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImagePushProgressHandler.java2
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImageViewLabelAndContentProvider.java4
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerCreatePage.java18
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRemovePage.java4
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java10
36 files changed, 176 insertions, 134 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.ui/.settings/org.eclipse.jdt.core.prefs b/containers/org.eclipse.linuxtools.docker.ui/.settings/org.eclipse.jdt.core.prefs
index 267d23cb7d..9944f10769 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/containers/org.eclipse.linuxtools.docker.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,9 +1,103 @@
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
diff --git a/containers/org.eclipse.linuxtools.docker.ui/.settings/org.eclipse.jdt.ui.prefs b/containers/org.eclipse.linuxtools.docker.ui/.settings/org.eclipse.jdt.ui.prefs
index 32fe9378ab..446b847248 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/.settings/org.eclipse.jdt.ui.prefs
+++ b/containers/org.eclipse.linuxtools.docker.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -28,7 +28,7 @@ sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=false
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/Activator.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/Activator.java
index eecc2d4b53..b577ae692b 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/Activator.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/Activator.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2014 Red Hat.
+ * Copyright (c) 2014, 2015 Red Hat Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Red Hat - Initial Contribution
+ * Red Hat Inc. - Initial Contribution
*******************************************************************************/
package org.eclipse.linuxtools.docker.ui;
@@ -36,25 +36,13 @@ public class Activator extends AbstractUIPlugin {
public Activator() {
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
- * )
- */
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
- * )
- */
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/launch/ContainerLauncher.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/launch/ContainerLauncher.java
index 7b88923792..44f8a3e4a1 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/launch/ContainerLauncher.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/launch/ContainerLauncher.java
@@ -88,7 +88,7 @@ public class ContainerLauncher {
final String LAUNCH_TITLE = "ContainerLaunch.title"; //$NON-NLS-1$
final String LAUNCH_EXITED_TITLE = "ContainerLaunchExited.title"; //$NON-NLS-1$
- final List<String> env = new ArrayList<String>();
+ final List<String> env = new ArrayList<>();
env.addAll(toList(origEnv));
env.addAll(toList(envMap));
@@ -98,7 +98,7 @@ public class ContainerLauncher {
// In our case, we want all directories mounted as-is so the executable
// will
// run as the user expects.
- final List<String> volumes = new ArrayList<String>();
+ final List<String> volumes = new ArrayList<>();
if (additionalDirs != null) {
for (String dir : additionalDirs) {
volumes.add(dir + ":" + dir); //$NON-NLS-1$
@@ -111,8 +111,8 @@ public class ContainerLauncher {
final List<String> cmdList = getCmdList(command);
- final Set<String> exposedPorts = new HashSet<String>();
- final Map<String, List<IDockerPortBinding>> portBindingsMap = new HashMap<String, List<IDockerPortBinding>>();
+ final Set<String> exposedPorts = new HashSet<>();
+ final Map<String, List<IDockerPortBinding>> portBindingsMap = new HashMap<>();
if (ports != null) {
for (String port : ports) {
@@ -393,7 +393,7 @@ public class ContainerLauncher {
* @return list of strings
*/
private List<String> getCmdList(String s) {
- ArrayList<String> list = new ArrayList<String>();
+ ArrayList<String> list = new ArrayList<>();
int length = s.length();
boolean insideQuote1 = false; // single-quote
boolean insideQuote2 = false; // double-quote
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/RunConsole.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/RunConsole.java
index 29e402409b..995a9720b4 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/RunConsole.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/RunConsole.java
@@ -256,7 +256,7 @@ public class RunConsole extends IOConsole {
private boolean isCtrlOn;
private final int CTRL_CODE = 262144;
- private final int C_CODE = (int) 'c';
+ private final int C_CODE = 'c';
private final int TAB_CODE = 9;
public TTYKeyListener() {
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/AddConnectionCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/AddConnectionCommandHandler.java
index b4b3c1a6fd..0002385573 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/AddConnectionCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/AddConnectionCommandHandler.java
@@ -12,9 +12,7 @@ package org.eclipse.linuxtools.internal.docker.ui.commands;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.linuxtools.internal.docker.ui.wizards.NewDockerConnection;
@@ -28,10 +26,10 @@ import org.eclipse.ui.navigator.CommonViewer;
* @author xcoulon
*
*/
-public class AddConnectionCommandHandler extends AbstractHandler implements IHandler {
+public class AddConnectionCommandHandler extends AbstractHandler {
@Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ public Object execute(ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
if(activePart instanceof CommonNavigator) {
final boolean connectionAdded = openWizard(new NewDockerConnection(), HandlerUtil.getActiveShell(event));
@@ -47,7 +45,7 @@ public class AddConnectionCommandHandler extends AbstractHandler implements IHan
public static boolean openWizard(final IWizard wizard, final Shell shell) {
WizardDialog wizardDialog = new WizardDialog(shell, wizard);
wizardDialog.create();
- return wizardDialog.open() == Dialog.OK;
+ return wizardDialog.open() == Window.OK;
}
}
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BaseContainersCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BaseContainersCommandHandler.java
index 3d74cccd04..63777c12f8 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BaseContainersCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BaseContainersCommandHandler.java
@@ -18,8 +18,6 @@ import java.util.List;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -37,10 +35,10 @@ import org.eclipse.ui.handlers.HandlerUtil;
* @author xcoulon
*
*/
-public abstract class BaseContainersCommandHandler extends AbstractHandler implements IHandler {
+public abstract class BaseContainersCommandHandler extends AbstractHandler {
@Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ public Object execute(ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
final List<IDockerContainer> selectedContainers = getSelectedContainers(activePart);
final IDockerConnection connection = getCurrentConnection(activePart);
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BaseImagesCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BaseImagesCommandHandler.java
index 8599de6907..4228724bb5 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BaseImagesCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BaseImagesCommandHandler.java
@@ -18,8 +18,6 @@ import java.util.List;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -37,10 +35,10 @@ import org.eclipse.ui.handlers.HandlerUtil;
* @author jjohnstn
*
*/
-public abstract class BaseImagesCommandHandler extends AbstractHandler implements IHandler {
+public abstract class BaseImagesCommandHandler extends AbstractHandler {
@Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ public Object execute(ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
final List<IDockerImage> selectedImages = getSelectedImages(activePart);
final IDockerConnection connection = getCurrentConnection(activePart);
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BuildImageCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BuildImageCommandHandler.java
index d9d38faaa9..60b6059c54 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BuildImageCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BuildImageCommandHandler.java
@@ -12,8 +12,6 @@ package org.eclipse.linuxtools.internal.docker.ui.commands;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -31,8 +29,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
-public class BuildImageCommandHandler extends AbstractHandler implements
- IHandler {
+public class BuildImageCommandHandler extends AbstractHandler {
private final static String BUILD_IMAGE_JOB_TITLE = "ImageBuild.msg"; //$NON-NLS-1$
private static final String ERROR_BUILDING_IMAGE = "ImageBuildError.msg"; //$NON-NLS-1$
@@ -40,7 +37,7 @@ public class BuildImageCommandHandler extends AbstractHandler implements
private IDockerConnection connection;
@Override
- public Object execute(final ExecutionEvent event) throws ExecutionException {
+ public Object execute(final ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
final ImageBuild wizard = new ImageBuild();
final boolean buildImage = CommandUtils.openWizard(wizard,
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CommandUtils.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CommandUtils.java
index 2af584e4d2..b0a93db185 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CommandUtils.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CommandUtils.java
@@ -17,7 +17,6 @@ import java.util.Iterator;
import java.util.List;
import org.eclipse.core.commands.IHandler;
-import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.Viewer;
@@ -196,7 +195,7 @@ public class CommandUtils {
public static boolean openWizard(final IWizard wizard, final Shell shell) {
final WizardDialog wizardDialog = new WizardDialog(shell, wizard);
wizardDialog.create();
- return wizardDialog.open() == Dialog.OK;
+ return wizardDialog.open() == Window.OK;
}
}
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CommitContainerCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CommitContainerCommandHandler.java
index 780ae74ed5..cca75db704 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CommitContainerCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CommitContainerCommandHandler.java
@@ -14,8 +14,6 @@ import java.util.List;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -32,8 +30,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
-public class CommitContainerCommandHandler extends AbstractHandler implements
- IHandler {
+public class CommitContainerCommandHandler extends AbstractHandler {
private final static String COMMIT_CONTAINER_JOB_TITLE = "ContainerCommitTitle.msg"; //$NON-NLS-1$
private final static String COMMIT_CONTAINER_MSG = "ContainerCommit.msg"; //$NON-NLS-1$
@@ -43,7 +40,7 @@ public class CommitContainerCommandHandler extends AbstractHandler implements
private IDockerContainer container;
@Override
- public Object execute(final ExecutionEvent event) throws ExecutionException {
+ public Object execute(final ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
List<IDockerContainer> selectedContainers = CommandUtils
.getSelectedContainers(activePart);
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CreateContainerCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CreateContainerCommandHandler.java
index d9d7f6ac84..fa09375b7a 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CreateContainerCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/CreateContainerCommandHandler.java
@@ -15,8 +15,6 @@ import java.util.List;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -37,8 +35,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
-public class CreateContainerCommandHandler extends AbstractHandler implements
- IHandler {
+public class CreateContainerCommandHandler extends AbstractHandler {
private final static String CREATE_CONTAINER_JOB_TITLE = "ContainerCreateTitle.msg"; //$NON-NLS-1$
private final static String CREATE_CONTAINER_MSG = "ContainerCreate.msg"; //$NON-NLS-1$
@@ -48,7 +45,7 @@ public class CreateContainerCommandHandler extends AbstractHandler implements
private IDockerImage image;
@Override
- public Object execute(final ExecutionEvent event) throws ExecutionException {
+ public Object execute(final ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
List<IDockerImage> selectedImages = CommandUtils
.getSelectedImages(activePart);
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/DisplayContainerLogCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/DisplayContainerLogCommandHandler.java
index 834df737b4..f5bb60e5ee 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/DisplayContainerLogCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/DisplayContainerLogCommandHandler.java
@@ -15,8 +15,6 @@ import java.util.List;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.linuxtools.docker.core.DockerException;
import org.eclipse.linuxtools.docker.core.EnumDockerLoggingStatus;
@@ -30,8 +28,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
-public class DisplayContainerLogCommandHandler extends AbstractHandler implements
- IHandler {
+public class DisplayContainerLogCommandHandler extends AbstractHandler {
private static final String CONTAINER_LOG_TITLE = "ContainerLog.title"; //$NON-NLS-1$
private static final String ERROR_LOGGING_CONTAINER = "ContainerLogError.msg"; //$NON-NLS-1$
@@ -40,7 +37,7 @@ public class DisplayContainerLogCommandHandler extends AbstractHandler implement
private IDockerContainer container;
@Override
- public Object execute(final ExecutionEvent event) throws ExecutionException {
+ public Object execute(final ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
List<IDockerContainer> selectedContainers = CommandUtils
.getSelectedContainers(activePart);
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/PullImageCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/PullImageCommandHandler.java
index f566defaeb..cd775a8745 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/PullImageCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/PullImageCommandHandler.java
@@ -12,8 +12,6 @@ package org.eclipse.linuxtools.internal.docker.ui.commands;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -30,8 +28,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
-public class PullImageCommandHandler extends AbstractHandler implements
- IHandler {
+public class PullImageCommandHandler extends AbstractHandler {
private final static String PULL_IMAGE_JOB_TITLE = "ImagePull.title"; //$NON-NLS-1$
private final static String PULL_IMAGE_JOB_TASK = "ImagePull.msg"; //$NON-NLS-1$
@@ -40,7 +37,7 @@ public class PullImageCommandHandler extends AbstractHandler implements
private IDockerConnection connection;
@Override
- public Object execute(final ExecutionEvent event) throws ExecutionException {
+ public Object execute(final ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
final ImagePull wizard = new ImagePull();
final boolean pullImage = CommandUtils.openWizard(wizard,
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/PushImageCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/PushImageCommandHandler.java
index 2046a52bc0..a173153fed 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/PushImageCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/PushImageCommandHandler.java
@@ -12,8 +12,6 @@ package org.eclipse.linuxtools.internal.docker.ui.commands;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -30,8 +28,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
-public class PushImageCommandHandler extends AbstractHandler implements
- IHandler {
+public class PushImageCommandHandler extends AbstractHandler {
private final static String PUSH_IMAGE_JOB_TITLE = "ImagePush.title"; //$NON-NLS-1$
private final static String PUSH_IMAGE_JOB_TASK = "ImagePush.msg"; //$NON-NLS-1$
@@ -40,7 +37,7 @@ public class PushImageCommandHandler extends AbstractHandler implements
private IDockerConnection connection;
@Override
- public Object execute(final ExecutionEvent event) throws ExecutionException {
+ public Object execute(final ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
final ImagePush wizard = new ImagePush();
final boolean pushImage = CommandUtils.openWizard(wizard,
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshConnectionsCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshConnectionsCommandHandler.java
index 31086a5c2f..31c3bf0a27 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshConnectionsCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshConnectionsCommandHandler.java
@@ -13,7 +13,6 @@ package org.eclipse.linuxtools.internal.docker.ui.commands;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.navigator.CommonNavigator;
@@ -27,7 +26,7 @@ public class RefreshConnectionsCommandHandler extends AbstractHandler {
@Override
- public Object execute(final ExecutionEvent event) throws ExecutionException {
+ public Object execute(final ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
if(activePart instanceof CommonNavigator) {
((CommonNavigator)activePart).getCommonViewer().refresh();
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshContainersCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshContainersCommandHandler.java
index 4ab2b2dc5d..1585c6129f 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshContainersCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshContainersCommandHandler.java
@@ -14,8 +14,6 @@ import static org.eclipse.linuxtools.internal.docker.ui.commands.CommandUtils.ge
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -25,13 +23,12 @@ import org.eclipse.linuxtools.internal.docker.ui.views.DVMessages;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
-public class RefreshContainersCommandHandler extends AbstractHandler implements
- IHandler {
+public class RefreshContainersCommandHandler extends AbstractHandler {
public final static String CONTAINERS_REFRESH_MSG = "ContainersRefresh.msg"; //$NON-NLS-1$
@Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ public Object execute(ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
final IDockerConnection connection = getCurrentConnection(activePart);
if (connection == null) {
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshImagesCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshImagesCommandHandler.java
index 60cf455a9c..3bbe46a136 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshImagesCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RefreshImagesCommandHandler.java
@@ -14,8 +14,6 @@ import static org.eclipse.linuxtools.internal.docker.ui.commands.CommandUtils.ge
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -25,13 +23,12 @@ import org.eclipse.linuxtools.internal.docker.ui.views.DVMessages;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
-public class RefreshImagesCommandHandler extends AbstractHandler implements
- IHandler {
+public class RefreshImagesCommandHandler extends AbstractHandler {
public final static String IMAGES_REFRESH_MSG = "ImagesRefresh.msg"; //$NON-NLS-1$
@Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ public Object execute(ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
final IDockerConnection connection = getCurrentConnection(activePart);
if (connection == null) {
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 db8e4832fc..16888bde39 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
@@ -13,8 +13,6 @@ package org.eclipse.linuxtools.internal.docker.ui.commands;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
import org.eclipse.jface.viewers.ITreeSelection;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.linuxtools.docker.core.DockerConnectionManager;
@@ -28,13 +26,10 @@ import org.eclipse.ui.navigator.CommonViewer;
* @author xcoulon
*
*/
-public class RemoveConnectionCommandHandler extends AbstractHandler implements IHandler {
+public class RemoveConnectionCommandHandler extends AbstractHandler {
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ public Object execute(ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
if(activePart instanceof CommonNavigator) {
final CommonViewer viewer = ((CommonNavigator)activePart).getCommonViewer();
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveContainerLogCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveContainerLogCommandHandler.java
index e629a75350..daef2035ef 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveContainerLogCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveContainerLogCommandHandler.java
@@ -14,8 +14,6 @@ import java.util.List;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
import org.eclipse.linuxtools.docker.core.IDockerConnection;
import org.eclipse.linuxtools.docker.core.IDockerContainer;
import org.eclipse.linuxtools.internal.docker.ui.RunConsole;
@@ -23,14 +21,13 @@ import org.eclipse.linuxtools.internal.docker.ui.views.DockerContainersView;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
-public class RemoveContainerLogCommandHandler extends AbstractHandler implements
- IHandler {
+public class RemoveContainerLogCommandHandler extends AbstractHandler {
private IDockerConnection connection;
private IDockerContainer container;
@Override
- public Object execute(final ExecutionEvent event) throws ExecutionException {
+ public Object execute(final ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
List<IDockerContainer> selectedContainers = CommandUtils
.getSelectedContainers(activePart);
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveContainersCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveContainersCommandHandler.java
index bb7c240da3..ded30596ec 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveContainersCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveContainersCommandHandler.java
@@ -77,7 +77,7 @@ public class RemoveContainersCommandHandler extends BaseContainersCommandHandler
@Override
boolean confirmed(List<IDockerContainer> selectedContainers) {
// ask for confirmation before deleting images
- List<String> containersToRemove = new ArrayList<String>();
+ List<String> containersToRemove = new ArrayList<>();
for (IDockerContainer container : selectedContainers) {
containersToRemove.add(container.name());
}
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveImagesCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveImagesCommandHandler.java
index 7528e63d45..1d369631c9 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveImagesCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveImagesCommandHandler.java
@@ -90,7 +90,7 @@ public class RemoveImagesCommandHandler extends BaseImagesCommandHandler {
@Override
boolean confirmed(List<IDockerImage> selectedImages) {
// ask for confirmation before deleting images
- List<String> imagesToRemove = new ArrayList<String>();
+ List<String> imagesToRemove = new ArrayList<>();
for (IDockerImage image : selectedImages) {
// use repo tags if present, otherwise truncate ids
// to 8 characters so they show up
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveTagCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveTagCommandHandler.java
index d129b7adc9..256eaa6718 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveTagCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/RemoveTagCommandHandler.java
@@ -14,8 +14,6 @@ import java.util.List;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -32,8 +30,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
-public class RemoveTagCommandHandler extends AbstractHandler implements
- IHandler {
+public class RemoveTagCommandHandler extends AbstractHandler {
private final static String REMOVE_TAG_JOB_TITLE = "ImageRemoveTagTitle.msg"; //$NON-NLS-1$
private final static String REMOVE_TAG_MSG = "ImageRemoveTag.msg"; //$NON-NLS-1$
@@ -43,7 +40,7 @@ public class RemoveTagCommandHandler extends AbstractHandler implements
private IDockerImage image;
@Override
- public Object execute(final ExecutionEvent event) throws ExecutionException {
+ public Object execute(final ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
List<IDockerImage> selectedImages = CommandUtils
.getSelectedImages(activePart);
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/TagImageCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/TagImageCommandHandler.java
index 0cb6b2e683..977417d117 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/TagImageCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/TagImageCommandHandler.java
@@ -14,8 +14,6 @@ import java.util.List;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -32,8 +30,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
-public class TagImageCommandHandler extends AbstractHandler implements
- IHandler {
+public class TagImageCommandHandler extends AbstractHandler {
private final static String TAG_IMAGE_JOB_TITLE = "ImageTagTitle.msg"; //$NON-NLS-1$
private final static String TAG_IMAGE_MSG = "ImageTag.msg"; //$NON-NLS-1$
@@ -43,7 +40,7 @@ public class TagImageCommandHandler extends AbstractHandler implements
private IDockerImage image;
@Override
- public Object execute(final ExecutionEvent event) throws ExecutionException {
+ public Object execute(final ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
List<IDockerImage> selectedImages = CommandUtils
.getSelectedImages(activePart);
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/preferences/DockerPreferencePage.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/preferences/DockerPreferencePage.java
index f426e8e51e..224c9cab7b 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/preferences/DockerPreferencePage.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/preferences/DockerPreferencePage.java
@@ -45,6 +45,7 @@ public class DockerPreferencePage extends PreferencePage implements
*
* @see PreferenceInitializer
*/
+ @Override
public void init(final IWorkbench workbench) {
}
@@ -114,4 +115,4 @@ public class DockerPreferencePage extends PreferencePage implements
});
}
-} \ No newline at end of file
+}
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/preferences/PreferenceInitializer.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/preferences/PreferenceInitializer.java
index 71885e81ce..efb3701af2 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/preferences/PreferenceInitializer.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/preferences/PreferenceInitializer.java
@@ -23,12 +23,7 @@ import org.eclipse.linuxtools.docker.ui.Activator;
*/
public class PreferenceInitializer extends AbstractPreferenceInitializer {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#
- * initializeDefaultPreferences()
- */
+ @Override
public void initializeDefaultPreferences() {
final IPreferenceStore store = Activator.getDefault().getPreferenceStore();
store.setDefault(REFRESH_TIME, 15);
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/utils/UIUtils.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/utils/UIUtils.java
index 1171c566f4..929b4543d0 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/utils/UIUtils.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/utils/UIUtils.java
@@ -182,12 +182,13 @@ public class UIUtils {
Assert.isNotNull(contributionManager);
Assert.isTrue(control != null && !control.isDisposed());
- final IMenuService menuService = (IMenuService) PlatformUI
+ final IMenuService menuService = PlatformUI
.getWorkbench().getService(IMenuService.class);
menuService.populateContributionManager(
(ContributionManager) contributionManager, id);
contributionManager.update(true);
control.addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
menuService
.releaseContributions((ContributionManager) contributionManager);
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerContainersView.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerContainersView.java
index 8b6ba79db8..e16157962c 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerContainersView.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerContainersView.java
@@ -101,10 +101,11 @@ public class DockerContainersView extends ViewPart implements
return DockerExplorerView.VIEW_ID;
}
+ @SuppressWarnings("unchecked")
@Override
- public Object getAdapter(@SuppressWarnings("rawtypes") final Class adapter) {
+ public <T> T getAdapter(final Class<T> adapter) {
if (adapter == IPropertySheetPage.class) {
- return new TabbedPropertySheetPage(this, true);
+ return (T) new TabbedPropertySheetPage(this, true);
}
return super.getAdapter(adapter);
}
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerExplorerView.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerExplorerView.java
index 775c3c7da3..efa5a00654 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerExplorerView.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerExplorerView.java
@@ -195,6 +195,7 @@ public class DockerExplorerView extends CommonNavigator implements
private SelectionAdapter onExplanationClicked(
final Control connectionsPane, final Control explanationPane) {
return new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
final NewDockerConnection wizard = new NewDockerConnection();
final WizardDialog dialog = new WizardDialog(PlatformUI
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerImagesView.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerImagesView.java
index 2db18d9055..313cc7b316 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerImagesView.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerImagesView.java
@@ -103,10 +103,11 @@ public class DockerImagesView extends ViewPart implements IDockerImageListener,
return DockerExplorerView.VIEW_ID;
}
+ @SuppressWarnings("unchecked")
@Override
- public Object getAdapter(@SuppressWarnings("rawtypes") final Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
if (adapter == IPropertySheetPage.class) {
- return new TabbedPropertySheetPage(this, true);
+ return (T) new TabbedPropertySheetPage(this, true);
}
return super.getAdapter(adapter);
}
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImagePullProgressHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImagePullProgressHandler.java
index c01c034d50..3cc2695d99 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImagePullProgressHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImagePullProgressHandler.java
@@ -37,7 +37,7 @@ public class ImagePullProgressHandler implements IDockerProgressHandler {
private String image;
private DockerConnection connection;
- private Map<String, ProgressJob> progressJobs = new HashMap<String, ProgressJob>();
+ private Map<String, ProgressJob> progressJobs = new HashMap<>();
public ImagePullProgressHandler(IDockerConnection connection, String image) {
this.image = image;
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImagePushProgressHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImagePushProgressHandler.java
index b3adbf4be3..bc1037f8d0 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImagePushProgressHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImagePushProgressHandler.java
@@ -34,7 +34,7 @@ public class ImagePushProgressHandler implements IDockerProgressHandler {
private String image;
private DockerConnection connection;
- private Map<String, ProgressJob> progressJobs = new HashMap<String, ProgressJob>();
+ private Map<String, ProgressJob> progressJobs = new HashMap<>();
public ImagePushProgressHandler(IDockerConnection connection, String image) {
this.image = image;
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImageViewLabelAndContentProvider.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImageViewLabelAndContentProvider.java
index 82998ce19f..1038bdeacb 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImageViewLabelAndContentProvider.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImageViewLabelAndContentProvider.java
@@ -39,7 +39,7 @@ public class ImageViewLabelAndContentProvider extends BaseLabelProvider
private int column;
private int weight;
- private static final Map<Integer, Column> lookup = new HashMap<Integer, Column>();
+ private static final Map<Integer, Column> lookup = new HashMap<>();
static {
for (Column c : EnumSet.allOf(Column.class))
@@ -67,7 +67,7 @@ public class ImageViewLabelAndContentProvider extends BaseLabelProvider
return lookup.size();
}
- };
+ }
public void setTableViewer(TableViewer viewer) {
}
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerCreatePage.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerCreatePage.java
index 1b9d5f2759..59443f2cfb 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerCreatePage.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerCreatePage.java
@@ -135,7 +135,7 @@ public class ContainerCreatePage extends WizardPage {
}
private List<String> getCmdList(String s) {
- ArrayList<String> list = new ArrayList<String>();
+ ArrayList<String> list = new ArrayList<>();
int length = s.length();
boolean insideQuote1 = false; // single-quote
boolean insideQuote2 = false; // double-quote
@@ -196,7 +196,7 @@ public class ContainerCreatePage extends WizardPage {
}
private List<String> getEnvList(String str) {
- ArrayList<String> envVars = new ArrayList<String>();
+ ArrayList<String> envVars = new ArrayList<>();
Pattern p1 = Pattern.compile("(\\w+[=]\\\".*?\\\"\\s*).*"); //$NON-NLS-1$
Pattern p2 = Pattern.compile("(\\w+[=]'.*?'\\s*).*"); //$NON-NLS-1$
@@ -347,7 +347,7 @@ public class ContainerCreatePage extends WizardPage {
String s = volumesText.getText().trim();
if (s.length() == 0)
return null;
- Set<String> volumeSet = new HashSet<String>();
+ Set<String> volumeSet = new HashSet<>();
String[] volumes = s.split("\\s+");
for (String volume : volumes) {
volume = volume.trim();
@@ -361,7 +361,7 @@ public class ContainerCreatePage extends WizardPage {
String s = volumesText.getText().trim();
if (s.length() == 0)
return null;
- List<String> hostVolumes = new ArrayList<String>();
+ List<String> hostVolumes = new ArrayList<>();
String[] volumes = s.split("\\s+");
for (String volume : volumes) {
volume = volume.trim();
@@ -375,7 +375,7 @@ public class ContainerCreatePage extends WizardPage {
String s = portSpecsText.getText().trim();
if (s.length() == 0)
return null;
- List<String> specList = new ArrayList<String>();
+ List<String> specList = new ArrayList<>();
String[] specs = s.split("\\s+");
for (String spec : specs) {
spec = spec.trim();
@@ -389,7 +389,7 @@ public class ContainerCreatePage extends WizardPage {
String s = exposedPortsText.getText().trim();
if (s.length() == 0)
return null;
- Set<String> exposedPortsSet = new HashSet<String>();
+ Set<String> exposedPortsSet = new HashSet<>();
String[] exposedPorts = s.split("\\s+");
for (String exposedPort : exposedPorts) {
exposedPort = exposedPort.trim();
@@ -413,7 +413,7 @@ public class ContainerCreatePage extends WizardPage {
String s = exposedPortsText.getText().trim();
if (s.length() == 0)
return null;
- Map<String, List<IDockerPortBinding>> portBindingsMap = new HashMap<String, List<IDockerPortBinding>>();
+ Map<String, List<IDockerPortBinding>> portBindingsMap = new HashMap<>();
String[] exposedPorts = s.split("\\s+");
for (String exposedPort : exposedPorts) {
exposedPort = exposedPort.trim();
@@ -451,7 +451,7 @@ public class ContainerCreatePage extends WizardPage {
String s = onBuildText.getText().trim();
if (s.length() == 0)
return null;
- List<String> onBuildList = new ArrayList<String>();
+ List<String> onBuildList = new ArrayList<>();
String[] onBuildStrings = s.split("\\s+");
for (String onBuildString : onBuildStrings) {
onBuildString = onBuildString.trim();
@@ -465,7 +465,7 @@ public class ContainerCreatePage extends WizardPage {
String s = entryPointText.getText().trim();
if (s.length() == 0)
return null;
- List<String> entryPointList = new ArrayList<String>();
+ List<String> entryPointList = new ArrayList<>();
String[] entryPoints = s.split("\\s+");
for (String entryPoint : entryPoints) {
entryPoint = entryPoint.trim();
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRemovePage.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRemovePage.java
index 862fc07a42..5bfe6ed266 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRemovePage.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ImageRemovePage.java
@@ -38,7 +38,7 @@ public class ImageRemovePage extends WizardPage {
private Text nameText;
- private List<String> images = new ArrayList<String>();
+ private List<String> images = new ArrayList<>();
public ImageRemovePage() {
super(WizardMessages.getString(NAME));
@@ -65,7 +65,7 @@ public class ImageRemovePage extends WizardPage {
boolean error = false;
String nameField = nameText.getText().trim();
- ArrayList<String> validNames = new ArrayList<String>();
+ ArrayList<String> validNames = new ArrayList<>();
if (nameField.length() == 0) {
setErrorMessage(WizardMessages.getString(NAME_EMPTY_RULE));
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java
index 7c8fa2e3be..8dd5f4ab6b 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/NewDockerConnectionPage.java
@@ -42,6 +42,8 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
+import com.spotify.docker.client.DockerCertificateException;
+
/**
* @author xcoulon
*
@@ -208,7 +210,7 @@ public class NewDockerConnectionPage extends WizardPage {
try {
getWizard().getContainer().run(true, true, new IRunnableWithProgress() {
@Override
- public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ public void run(final IProgressMonitor monitor) {
monitor.beginTask("Retrieving Docker connection settings...", 1);
try {
final DockerConnection.Defaults defaults = new DockerConnection.Defaults();
@@ -358,6 +360,7 @@ public class NewDockerConnectionPage extends WizardPage {
private ModifyListener onConnectionNameModification() {
return new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent evt) {
NewDockerConnectionPage.this.connectionName = ((Text) evt.widget).getText();
}
@@ -366,6 +369,7 @@ public class NewDockerConnectionPage extends WizardPage {
private ModifyListener onUnixSocketModification() {
return new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent evt) {
NewDockerConnectionPage.this.unixSocketPath = ((Text) evt.widget).getText();
}
@@ -374,6 +378,7 @@ public class NewDockerConnectionPage extends WizardPage {
private ModifyListener onTcpHostModification() {
return new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent evt) {
NewDockerConnectionPage.this.tcpHost = ((Text) evt.widget).getText();
}
@@ -382,6 +387,7 @@ public class NewDockerConnectionPage extends WizardPage {
private ModifyListener onTcpCertPathModification() {
return new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent evt) {
NewDockerConnectionPage.this.tcpCertPath = ((Text) evt.widget).getText();
}
@@ -402,7 +408,7 @@ public class NewDockerConnectionPage extends WizardPage {
try {
getWizard().getContainer().run(true, false, new IRunnableWithProgress() {
@Override
- public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ public void run(final IProgressMonitor monitor) {
monitor.beginTask("Pinging Docker daemon...", IProgressMonitor.UNKNOWN);
try {
final DockerConnection dockerConnection = getDockerConnection();

Back to the top