From 196d978624fcb25c379728d10ddfa50be16b6c5d Mon Sep 17 00:00:00 2001 From: Teodor Madan Date: Wed, 28 Jan 2015 17:42:26 +0200 Subject: [PATCH] Bug 458650 - NPE when creating a "C/C++ Remote Application" launch config Change-Id: I72f48aa4fa7b46e0d5ba5e5e8f6e4877269ea7f5 Signed-off-by: Teodor Madan --- .../cdt/launch/remote/tabs/RemoteCDSFMainTab.java | 6 ++---- .../org/eclipse/cdt/launch/ui/CAbstractMainTab.java | 13 ++++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java index 8aa813071f0..64f12594329 100644 --- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java +++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2014 PalmSource, Inc. and others. + * Copyright (c) 2006, 2015 PalmSource, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -224,8 +224,6 @@ public class RemoteCDSFMainTab extends CMainTab { handleRemoteConnectionPropertiesSelected(); } }); - - updateConnectionPulldown(); } /* @@ -698,7 +696,7 @@ public class RemoteCDSFMainTab extends CMainTab { updateTargetProgFromConfig(config); updateSkipDownloadFromConfig(config); - updateConnectionButtons(); + updateConnectionPulldown(); isInitializing = false; } diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CAbstractMainTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CAbstractMainTab.java index d927aab9e5d..aa98aa75d25 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CAbstractMainTab.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CAbstractMainTab.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2011 Nokia Corporation and others. + * Copyright (c) 2010, 2015 Nokia Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -611,12 +611,15 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab { */ protected void updateComboTooltip() { if (fBuildConfigCombo != null) { + // fBuildConfigCombo might not be loaded when controls are created String configId = (String) fBuildConfigCombo.getData(Integer.toString(fBuildConfigCombo.getSelectionIndex())); String tooltip = EMPTY_STRING; - if (configId.equals(AUTO_CONFIG)) { - tooltip = LaunchMessages.CMainTab_Build_Config_Auto_tooltip; - } else if (configId.equals(EMPTY_STRING)) { - tooltip = LaunchMessages.CMainTab_Build_Config_Active_tooltip; + if (configId != null) { + if (configId.equals(AUTO_CONFIG)) { + tooltip = LaunchMessages.CMainTab_Build_Config_Auto_tooltip; + } else if (configId.equals(EMPTY_STRING)) { + tooltip = LaunchMessages.CMainTab_Build_Config_Active_tooltip; + } } fBuildConfigCombo.setToolTipText(tooltip); }