Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Krasilnikov2008-02-18 11:31:05 -0500
committerOleg Krasilnikov2008-02-18 11:31:05 -0500
commitddc04e4d51c4744356fbe0b374ec51df46ab7650 (patch)
tree962a227877079decde6d38eb0f2dd2c5908ea19e
parent99891e51260a56ac64c4d9b872cf1cdf16e03cd4 (diff)
downloadorg.eclipse.cdt-ddc04e4d51c4744356fbe0b374ec51df46ab7650.tar.gz
org.eclipse.cdt-ddc04e4d51c4744356fbe0b374ec51df46ab7650.tar.xz
org.eclipse.cdt-ddc04e4d51c4744356fbe0b374ec51df46ab7650.zip
Bug # 219320 : EnvDialog createDialogArea IllegalArgumentException when value is <undefined>
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/EnvDialog.java3
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/EnvironmentTab.java2
2 files changed, 4 insertions, 1 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 7034757d4c..a250e751f9 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
@@ -119,7 +119,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 7ab157eec0..549a41c6fa 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
@@ -256,6 +256,7 @@ public class EnvironmentTab extends AbstractCPropertyTab {
vars.createVariable(dlg.t1.trim(), dlg.t2.trim(),
IEnvironmentVariable.ENVVAR_REPLACE, var.getDelimiter());
updateData();
+ table.setSelection(n);
}
break;
case 3: // remove
@@ -289,6 +290,7 @@ public class EnvironmentTab extends AbstractCPropertyTab {
var.getDelimiter(), cfgd);
}
updateData();
+ table.setSelection(n);
break;
}
updateButtons();

Back to the top