mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 23:55:26 +02:00
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
(cherry picked from commit b49930716f
)
This commit is contained in:
parent
3a323a4a57
commit
9dbd3cffef
2 changed files with 12 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue