Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2018-01-03 22:52:36 +0000
committerJeff Johnston2018-01-03 22:52:36 +0000
commitb49930716f572dc7120f3e12071fd5826d240093 (patch)
treea41b21b630a0641abcc4b8ea696f73057624b2fb /launch/org.eclipse.cdt.docker.launcher
parent7050f18ecf8304191295d65d0f516a829575534f (diff)
downloadorg.eclipse.cdt-b49930716f572dc7120f3e12071fd5826d240093.tar.gz
org.eclipse.cdt-b49930716f572dc7120f3e12071fd5826d240093.tar.xz
org.eclipse.cdt-b49930716f572dc7120f3e12071fd5826d240093.zip
Bug 529390 - Run in Container launch config not resetting err message
- modify ContainerTab to reset the error message when Docker Connections/Image changes cause a listener notification and then look to see if no connections or no images errors exist - modify ContainerTab to reset the error message if the Docker Connection selected gets changed - bump org.eclipse.cdt.docker.launcher version to 1.1.1 Change-Id: Iad5051750a5dd53a0eb458d73570fffd9e3867c4
Diffstat (limited to 'launch/org.eclipse.cdt.docker.launcher')
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/META-INF/MANIFEST.MF2
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java11
2 files changed, 12 insertions, 1 deletions
diff --git a/launch/org.eclipse.cdt.docker.launcher/META-INF/MANIFEST.MF b/launch/org.eclipse.cdt.docker.launcher/META-INF/MANIFEST.MF
index 97b2ef01624..5570d05b4b3 100644
--- a/launch/org.eclipse.cdt.docker.launcher/META-INF/MANIFEST.MF
+++ b/launch/org.eclipse.cdt.docker.launcher/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.name
Bundle-SymbolicName: org.eclipse.cdt.docker.launcher;singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.1.qualifier
Bundle-Activator: org.eclipse.cdt.docker.launcher.DockerLaunchUIPlugin
Bundle-Vendor: %Plugin.vendor
Bundle-Localization: plugin
diff --git a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java
index 0d69db41fdd..26b6915b331 100644
--- a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java
+++ b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java
@@ -81,6 +81,7 @@ public class ContainerTab extends AbstractLaunchConfigurationTab implements
connection = connections[index];
connectionUri = connection.getUri();
if (!connectionName.equals(connection.getName())) {
+ setErrorMessage(null);
updateLaunchConfigurationDialog();
initializeImageCombo();
}
@@ -521,6 +522,7 @@ public class ContainerTab extends AbstractLaunchConfigurationTab implements
public void changeEvent(IDockerConnection changedConnection, int type) {
String currUri = null;
int currIndex = 0;
+ setErrorMessage(null);
connections = DockerConnectionManager.getInstance().getConnections();
if (connection != null) {
currUri = connection.getUri();
@@ -542,7 +544,12 @@ public class ContainerTab extends AbstractLaunchConfigurationTab implements
connectionSelector.setText(connectionNames[index]);
connection = connections[index];
connectionUri = connection.getUri();
+ java.util.List<IDockerImage> images = connection.getImages();
+ if (images == null || images.size() == 0) {
+ setErrorMessage(Messages.ContainerTab_Error_No_Images);
+ }
} else {
+ setErrorMessage(Messages.ContainerTab_Error_No_Connections);
connection = null;
connectionUri = "";
connectionSelector.setText("");
@@ -552,7 +559,11 @@ public class ContainerTab extends AbstractLaunchConfigurationTab implements
public void listChanged(IDockerConnection c,
java.util.List<IDockerImage> list) {
+ setErrorMessage(null);
final IDockerImage[] finalList = list.toArray(new IDockerImage[0]);
+ if (finalList.length == 0) {
+ setErrorMessage(Messages.ContainerTab_Error_No_Images);
+ }
if (c.getName().equals(connection.getName())) {
Display.getDefault().syncExec(new Runnable() {
@Override

Back to the top