From 4f4b808f76eedc627a0f2b2eb820997926ca9e02 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Jan 08 2018 19:49:05 +0000 Subject: Fix bug 529390 --- diff --git a/eclipse-cdt-bug-529390.patch b/eclipse-cdt-bug-529390.patch new file mode 100644 index 0000000..4821e61 --- /dev/null +++ b/eclipse-cdt-bug-529390.patch @@ -0,0 +1,45 @@ +diff -up ./launch/org.eclipse.cdt.docker.launcher/META-INF/MANIFEST.MF.orig ./launch/org.eclipse.cdt.docker.launcher/META-INF/MANIFEST.MF +diff -up ./launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java.orig ./launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java +--- ./launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java.orig 2017-09-13 12:02:58.000000000 -0400 ++++ ./launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java 2018-01-08 14:23:15.700642912 -0500 +@@ -81,6 +81,7 @@ public class ContainerTab extends Abstra + connection = connections[index]; + connectionUri = connection.getUri(); + if (!connectionName.equals(connection.getName())) { ++ setErrorMessage(null); + updateLaunchConfigurationDialog(); + initializeImageCombo(); + } +@@ -520,6 +521,7 @@ public class ContainerTab extends Abstra + public void changeEvent(int type) { + String currUri = null; + int currIndex = 0; ++ setErrorMessage(null); + connections = DockerConnectionManager.getInstance().getConnections(); + if (connection != null) { + currUri = connection.getUri(); +@@ -541,7 +543,12 @@ public class ContainerTab extends Abstra + connectionSelector.setText(connectionNames[index]); + connection = connections[index]; + connectionUri = connection.getUri(); ++ java.util.List 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(""); +@@ -555,7 +562,11 @@ public class ContainerTab extends Abstra + + public void listChanged(IDockerConnection c, + java.util.List 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 diff --git a/eclipse-cdt.spec b/eclipse-cdt.spec index 254015a..23c043a 100644 --- a/eclipse-cdt.spec +++ b/eclipse-cdt.spec @@ -36,7 +36,7 @@ Epoch: 1 Summary: Eclipse C/C++ Development Tools (CDT) plugin Name: eclipse-cdt Version: 9.3.2 -Release: 3%{?dist} +Release: 4%{?dist} License: EPL and CPL URL: http://www.eclipse.org/cdt @@ -62,6 +62,9 @@ Patch2: eclipse-cdt-config-ini.patch # Following fixes Standalone Debugger README file to refer to /usr/bin/cdtdebug Patch3: eclipse-cdt-cdtdebug-readme.patch +# Fix error messages in Docker Run/Debug launch dialog so they reset +Patch4: eclipse-cdt-bug-529390.patch + BuildRequires: make BuildRequires: gcc-c++ BuildRequires: tycho @@ -204,6 +207,7 @@ cp %{SOURCE4} man %patch1 -p0 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # Fix tycho target environment TYCHO_ENV="linuxgtk%{eclipse_arch}" @@ -526,6 +530,9 @@ fi %endif %changelog +* Mon Jan 08 2018 Jeff Johnston - 1:9.3.2-4 +- Fix bug 529390 + * Mon Oct 02 2017 Troy Dawson - 1:9.3.2-3 - Cleanup spec file conditionals