diff options
author | Oleg Krasilnikov | 2008-02-18 16:20:49 +0000 |
---|---|---|
committer | Oleg Krasilnikov | 2008-02-18 16:20:49 +0000 |
commit | e9e1c3b1afb64b42bd637543368586e8be61ed37 (patch) | |
tree | ae7ef20e9e410ed3a0020b6c68d3c797bb0f9cd4 /core | |
parent | 84c9619cf4928ef468d241f8ddd95ee09081baf7 (diff) | |
download | org.eclipse.cdt-e9e1c3b1afb64b42bd637543368586e8be61ed37.tar.gz org.eclipse.cdt-e9e1c3b1afb64b42bd637543368586e8be61ed37.tar.xz org.eclipse.cdt-e9e1c3b1afb64b42bd637543368586e8be61ed37.zip |
Bug #219320 : EnvDialog createDialogArea IllegalArgumentException when value is <undefined>
Diffstat (limited to 'core')
-rw-r--r-- | core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/EnvDialog.java | 5 | ||||
-rw-r--r-- | core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/EnvironmentTab.java | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/EnvDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/EnvDialog.java index 9a46b0993d7..f04c303bf50 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/EnvDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/EnvDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 Intel Corporation and others. + * Copyright (c) 2007, 2008 Intel 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 @@ -124,7 +124,8 @@ public class EnvDialog extends Dialog { text1.setText(var.getName()); text1.setEnabled(false); // don't change name - text2.setText(var.getValue()); + String s = var.getValue(); + text2.setText(s == null ? AbstractCPropertyTab.EMPTY_STR : s); } gd.horizontalSpan = 3; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/EnvironmentTab.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/EnvironmentTab.java index 256fb7eba02..3fee728cf25 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/EnvironmentTab.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/EnvironmentTab.java @@ -354,6 +354,8 @@ public class EnvironmentTab extends AbstractCPropertyTab { vars.createVariable(dlg.t1.trim(), dlg.t2.trim(), IEnvironmentVariable.ENVVAR_REPLACE, var.getDelimiter()); updateData(); + table.setSelection(n); + updateButtons(); } } @@ -376,6 +378,8 @@ public class EnvironmentTab extends AbstractCPropertyTab { var.getDelimiter(), cfgd); } updateData(); + table.setSelection(n); + updateButtons(); } private void handleEnvDelButtonSelected(int n) { |