mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 23:05:47 +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
This commit is contained in:
parent
7050f18ecf
commit
b49930716f
2 changed files with 12 additions and 1 deletions
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %Plugin.name
|
Bundle-Name: %Plugin.name
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.docker.launcher;singleton:=true
|
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-Activator: org.eclipse.cdt.docker.launcher.DockerLaunchUIPlugin
|
||||||
Bundle-Vendor: %Plugin.vendor
|
Bundle-Vendor: %Plugin.vendor
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
|
|
|
@ -81,6 +81,7 @@ public class ContainerTab extends AbstractLaunchConfigurationTab implements
|
||||||
connection = connections[index];
|
connection = connections[index];
|
||||||
connectionUri = connection.getUri();
|
connectionUri = connection.getUri();
|
||||||
if (!connectionName.equals(connection.getName())) {
|
if (!connectionName.equals(connection.getName())) {
|
||||||
|
setErrorMessage(null);
|
||||||
updateLaunchConfigurationDialog();
|
updateLaunchConfigurationDialog();
|
||||||
initializeImageCombo();
|
initializeImageCombo();
|
||||||
}
|
}
|
||||||
|
@ -521,6 +522,7 @@ public class ContainerTab extends AbstractLaunchConfigurationTab implements
|
||||||
public void changeEvent(IDockerConnection changedConnection, int type) {
|
public void changeEvent(IDockerConnection changedConnection, int type) {
|
||||||
String currUri = null;
|
String currUri = null;
|
||||||
int currIndex = 0;
|
int currIndex = 0;
|
||||||
|
setErrorMessage(null);
|
||||||
connections = DockerConnectionManager.getInstance().getConnections();
|
connections = DockerConnectionManager.getInstance().getConnections();
|
||||||
if (connection != null) {
|
if (connection != null) {
|
||||||
currUri = connection.getUri();
|
currUri = connection.getUri();
|
||||||
|
@ -542,7 +544,12 @@ public class ContainerTab extends AbstractLaunchConfigurationTab implements
|
||||||
connectionSelector.setText(connectionNames[index]);
|
connectionSelector.setText(connectionNames[index]);
|
||||||
connection = connections[index];
|
connection = connections[index];
|
||||||
connectionUri = connection.getUri();
|
connectionUri = connection.getUri();
|
||||||
|
java.util.List<IDockerImage> images = connection.getImages();
|
||||||
|
if (images == null || images.size() == 0) {
|
||||||
|
setErrorMessage(Messages.ContainerTab_Error_No_Images);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
setErrorMessage(Messages.ContainerTab_Error_No_Connections);
|
||||||
connection = null;
|
connection = null;
|
||||||
connectionUri = "";
|
connectionUri = "";
|
||||||
connectionSelector.setText("");
|
connectionSelector.setText("");
|
||||||
|
@ -552,7 +559,11 @@ public class ContainerTab extends AbstractLaunchConfigurationTab implements
|
||||||
|
|
||||||
public void listChanged(IDockerConnection c,
|
public void listChanged(IDockerConnection c,
|
||||||
java.util.List<IDockerImage> list) {
|
java.util.List<IDockerImage> list) {
|
||||||
|
setErrorMessage(null);
|
||||||
final IDockerImage[] finalList = list.toArray(new IDockerImage[0]);
|
final IDockerImage[] finalList = list.toArray(new IDockerImage[0]);
|
||||||
|
if (finalList.length == 0) {
|
||||||
|
setErrorMessage(Messages.ContainerTab_Error_No_Images);
|
||||||
|
}
|
||||||
if (c.getName().equals(connection.getName())) {
|
if (c.getName().equals(connection.getName())) {
|
||||||
Display.getDefault().syncExec(new Runnable() {
|
Display.getDefault().syncExec(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue