Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Rennie2007-01-25 16:32:52 +0000
committerMichael Rennie2007-01-25 16:32:52 +0000
commit20b6ebda3e165032f3fe29ee5b29702481c9bcf7 (patch)
tree8e1d4b07d5fc9d44d9cbbeece6347f64349f7af8 /org.eclipse.debug.ui
parentc2e66ad7317314064d10282813f3ff2682fe2872 (diff)
downloadeclipse.platform.debug-20b6ebda3e165032f3fe29ee5b29702481c9bcf7.tar.gz
eclipse.platform.debug-20b6ebda3e165032f3fe29ee5b29702481c9bcf7.tar.xz
eclipse.platform.debug-20b6ebda3e165032f3fe29ee5b29702481c9bcf7.zip
Bug 171700
[launching] changing LCD filtering with last items elected throws exception
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java36
1 files changed, 22 insertions, 14 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java
index 9ede27a85..b1b6b12f8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java
@@ -73,21 +73,29 @@ public class LaunchConfigurationViewer extends TreeViewer {
if(tree.getItemCount() > 0) {
int index = selectIndex(tree.getItemCount(), indices[0]);
if(index > -1) {
- TreeItem pitem = tree.getItem(indices[0]);
- o = pitem.getData();
- if(indices[1] > -1) {
- index = selectIndex(pitem.getItemCount(), indices[1]);
- if(index > -1) {
- Object d = pitem.getItem(index).getData();
- if(d != null) {
- o = d;
+ TreeItem pitem = null;
+ if(indices[0] > tree.getItemCount()-1) {
+ pitem = tree.getItem(tree.getItemCount()-1);
+ }
+ else {
+ pitem = tree.getItem(indices[0]);
+ }
+ if(pitem != null) {
+ o = pitem.getData();
+ if(indices[1] > -1) {
+ index = selectIndex(pitem.getItemCount(), indices[1]);
+ if(index > -1) {
+ Object d = pitem.getItem(index).getData();
+ if(d != null) {
+ o = d;
+ }
}
- }
- else {
- if(pitem.getItemCount() > 0) {
- o = pitem.getItem((indices[1]-1 > -1 ? indices[1]-1 : 0)).getData();
- if(o == null) {
- o = pitem.getData();
+ else {
+ if(pitem.getItemCount() > 0) {
+ o = pitem.getItem((indices[1]-1 > -1 ? indices[1]-1 : 0)).getData();
+ if(o == null) {
+ o = pitem.getData();
+ }
}
}
}

Back to the top