mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-20 06:35:50 +02:00
[233057][remotecdt]Fix button enablement (Apply patch from Johann Draschwandtner)
This commit is contained in:
parent
d335b1e6da
commit
220f17bc92
1 changed files with 22 additions and 3 deletions
|
@ -12,6 +12,7 @@
|
||||||
* Yu-Fen Kuo (MontaVista) - [190613] Fix NPE in Remotecdt when RSEUIPlugin has not been loaded
|
* Yu-Fen Kuo (MontaVista) - [190613] Fix NPE in Remotecdt when RSEUIPlugin has not been loaded
|
||||||
* Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
|
* Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
|
||||||
* Johann Draschwandtner (Wind River) - [231827][remotecdt]Auto-compute default for Remote path
|
* Johann Draschwandtner (Wind River) - [231827][remotecdt]Auto-compute default for Remote path
|
||||||
|
* Johann Draschwandtner (Wind River) - [233057][remotecdt]Fix button enablement
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.remotecdt;
|
package org.eclipse.rse.internal.remotecdt;
|
||||||
|
@ -176,9 +177,9 @@ public class RemoteCMainTab extends CMainTab {
|
||||||
setDirty(true);
|
setDirty(true);
|
||||||
updateLaunchConfigurationDialog();
|
updateLaunchConfigurationDialog();
|
||||||
useDefaultsFromConnection();
|
useDefaultsFromConnection();
|
||||||
|
updatePropertiesButton();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
updateConnectionPulldown();
|
|
||||||
|
|
||||||
newRemoteConnectionButton = createPushButton(projComp, Messages.RemoteCMainTab_New, null);
|
newRemoteConnectionButton = createPushButton(projComp, Messages.RemoteCMainTab_New, null);
|
||||||
newRemoteConnectionButton.addSelectionListener(new SelectionAdapter() {
|
newRemoteConnectionButton.addSelectionListener(new SelectionAdapter() {
|
||||||
|
@ -198,6 +199,7 @@ public class RemoteCMainTab extends CMainTab {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
updateConnectionPulldown();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -307,6 +309,7 @@ public class RemoteCMainTab extends CMainTab {
|
||||||
|
|
||||||
updateTargetProgFromConfig(config);
|
updateTargetProgFromConfig(config);
|
||||||
updateSkipDownloadFromConfig(config);
|
updateSkipDownloadFromConfig(config);
|
||||||
|
updatePropertiesButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void handleNewRemoteConnectionSelected() {
|
protected void handleNewRemoteConnectionSelected() {
|
||||||
|
@ -413,7 +416,6 @@ public class RemoteCMainTab extends CMainTab {
|
||||||
}
|
}
|
||||||
super.buttonPressed(buttonId);
|
super.buttonPressed(buttonId);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
IHost currentConnectionSelected = getCurrentConnection();
|
IHost currentConnectionSelected = getCurrentConnection();
|
||||||
RemoteConnectionPropertyDialog dlg = new RemoteConnectionPropertyDialog(getControl().getShell(),
|
RemoteConnectionPropertyDialog dlg = new RemoteConnectionPropertyDialog(getControl().getShell(),
|
||||||
|
@ -481,11 +483,28 @@ public class RemoteCMainTab extends CMainTab {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(connections.length > 0)
|
if(connections.length > 0) {
|
||||||
connectionCombo.select(connections.length - 1);
|
connectionCombo.select(connections.length - 1);
|
||||||
|
}
|
||||||
|
updatePropertiesButton();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updatePropertiesButton() {
|
||||||
|
if((remoteConnectionPropertiesButton == null) || remoteConnectionPropertiesButton.isDisposed()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
boolean bEnableProperties = false;
|
||||||
|
IHost currentConnectionSelected = getCurrentConnection();
|
||||||
|
if(currentConnectionSelected != null) {
|
||||||
|
IRSESystemType sysType = currentConnectionSelected.getSystemType();
|
||||||
|
if (sysType != null && sysType.isEnabled() && !sysType.isLocal()) {
|
||||||
|
bEnableProperties = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
remoteConnectionPropertiesButton.setEnabled(bEnableProperties);
|
||||||
|
}
|
||||||
|
|
||||||
protected void updateTargetProgFromConfig(ILaunchConfiguration config) {
|
protected void updateTargetProgFromConfig(ILaunchConfiguration config) {
|
||||||
String targetPath = null;
|
String targetPath = null;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue