commit | 2ddbe9c12aacd1be830b67ecab1677676e9c4e42 | [log] [tgz] |
---|---|---|
author | Vikas Chandra <Vikas.Chandra@in.ibm.com> | Tue Nov 12 15:58:28 2019 +0530 |
committer | Vikas Chandra <Vikas.Chandra@in.ibm.com> | Wed Nov 13 01:23:26 2019 -0500 |
tree | 081f0169a4ad6838c028068cbcf28d6d4a978329 | |
parent | f7ba3fdbfa0a59d184dcf61891f2bc7800ef3bbc [diff] |
Bug 552945 - Adding a JRE should select the JRE if it is the only JRE present Change-Id: I06dc64a254a2b5518f63720e2a41d654e5cebd6e Signed-off-by: Vikas Chandra <Vikas.Chandra@in.ibm.com>
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java index 092d02b..1911a08 100644 --- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java +++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java
@@ -741,6 +741,10 @@ fVMs.add(result); //refresh from model fVMList.refresh(); + if (fVMs.size() == 1) { + // if this added JRE is the only JRE present, select it + setCheckedJRE(result); + } fVMList.setSelection(new StructuredSelection(result)); //ensure labels are updated fVMList.refresh(true);