Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Rennie2006-01-12 21:53:47 +0000
committerMichael Rennie2006-01-12 21:53:47 +0000
commitda399e75c8bba1c20e9cb2fd7336409485eab689 (patch)
tree460eccbc0052590e65712f79af6f37a4a7561e7a /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
parent8a9b7076cfc81879bddda2220abd0f6ae3714510 (diff)
downloadeclipse.platform.debug-da399e75c8bba1c20e9cb2fd7336409485eab689.tar.gz
eclipse.platform.debug-da399e75c8bba1c20e9cb2fd7336409485eab689.tar.xz
eclipse.platform.debug-da399e75c8bba1c20e9cb2fd7336409485eab689.zip
fixes for bugs 123627, 123635, 123630, 123663
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java31
1 files changed, 26 insertions, 5 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
index 0ae49752c..e3da0676d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
@@ -21,6 +21,7 @@ import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
@@ -681,7 +682,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
//create the toolbar area
createToolbarArea(comp);
-
+
fLaunchConfigurationView = new LaunchConfigurationView(getLaunchGroup());
fLaunchConfigurationView.createLaunchDialogControl(comp);
fDoubleClickAction = new Action() {
@@ -750,7 +751,19 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
*/
private void refreshFilteringLabel() {
try {
- int total = getLaunchManager().getLaunchConfigurations().length + getLaunchManager().getLaunchConfigurationTypes().length;
+ int total = 0;
+ ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations();
+ for(int i = 0; i < configs.length; i++) {
+ if(configs[i].supportsMode(getMode()) & !configs[i].getAttribute(IDebugUIConstants.ATTR_PRIVATE, false)) {
+ total++;
+ }
+ }
+ ILaunchConfigurationType[] types = getLaunchManager().getLaunchConfigurationTypes();
+ for(int i = 0; i < types.length; i++) {
+ if(types[i].supportsMode(getMode()) & types[i].isPublic() & (types[i].getCategory() == getLaunchGroup().getCategory())) {
+ total++;
+ }
+ }
TreeViewer viewer = ((TreeViewer)fLaunchConfigurationView.getViewer());
viewer.getTree().selectAll();
int filtered = ((IStructuredSelection)viewer.getSelection()).size();
@@ -1789,8 +1802,15 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
*/
public void propertyChange(PropertyChangeEvent event) {
StructuredViewer viewer = (StructuredViewer)fLaunchConfigurationView.getViewer();
+ boolean newvalue = false;
+ if(event.getNewValue() instanceof Boolean) {
+ newvalue = ((Boolean)event.getNewValue()).booleanValue();
+ }
+ else {
+ newvalue = Boolean.valueOf(event.getNewValue().toString()).booleanValue();
+ }
if(event.getProperty().equals(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_CLOSED)) {
- if(((Boolean)event.getNewValue()).booleanValue()) {
+ if(newvalue) {
viewer.addFilter(fClosedProjectFilter);
}
else {
@@ -1798,7 +1818,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
}
}
else if(event.getProperty().equals(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_DELETED)) {
- if(((Boolean)event.getNewValue()).booleanValue()) {
+ if(newvalue) {
viewer.addFilter(fDeletedProjectFilter);
}
else {
@@ -1806,7 +1826,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
}
}
else if(event.getProperty().equals(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_TYPES)) {
- if(((Boolean)event.getNewValue()).booleanValue()) {
+ if(newvalue) {
viewer.addFilter(fLCTFilter);
}
else {
@@ -1817,6 +1837,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
viewer.removeFilter(fLCTFilter);
viewer.addFilter(fLCTFilter);
}
+ ((TreeViewer)viewer).expandAll();
refreshFilteringLabel();
updateButtons();
updateMessage();

Back to the top