Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 187200

Summary: [Viewers] Deleting filtered config doesn't reset filter + errors
Product: [Eclipse Project] Platform Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Boris Bokowski <bokowski>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie, mik.kersten
Version: 3.3Flags: bokowski: review?
Target Milestone: 3.3 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Dani Megert CLA 2007-05-16 04:10:42 EDT
I20070516-0010.

Deleting a filtered launch config doesn't reset filter and gives error.

1. in the launch config dialog enter a search string so that only one
   config matches
2. delete that config
==> config still visible and follow up error if I select the parent

!ENTRY org.eclipse.debug.ui 4 120 2007-05-16 10:07:48.794
!MESSAGE Error logged from Debug UI: 
!STACK 1
org.eclipse.debug.core.DebugException: Launch configuration xxx at C:\eclipse\workspaces\Development_3_3\plugins\.metadata\.plugins\org.eclipse.debug.core\.launches\xxx.launch does not exist.
	at org.eclipse.debug.internal.core.LaunchManager.createDebugException(LaunchManager.java:857)
	at org.eclipse.debug.internal.core.LaunchManager.getInfo(LaunchManager.java:1305)
	at org.eclipse.debug.internal.core.LaunchConfiguration.getInfo(LaunchConfiguration.java:394)
	at org.eclipse.debug.internal.core.LaunchConfiguration.getType(LaunchConfiguration.java:530)
	at org.eclipse.debug.internal.ui.DefaultLabelProvider.getImageKey(DefaultLabelProvider.java:157)
	at org.eclipse.debug.internal.ui.DefaultLabelProvider.getImage(DefaultLabelProvider.java:59)
	at org.eclipse.debug.internal.ui.DelegatingModelPresentation.getDefaultImage(DelegatingModelPresentation.java:201)
	at org.eclipse.debug.internal.ui.DelegatingModelPresentation.getImage(DelegatingModelPresentation.java:153)
	at org.eclipse.jface.viewers.WrappedViewerLabelProvider.getImage(WrappedViewerLabelProvider.java:117)
	at org.eclipse.jface.viewers.WrappedViewerLabelProvider.update(WrappedViewerLabelProvider.java:165)
	at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:135)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:895)
	at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:97)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.runtime.Platform.run(Platform.java:850)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:193)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:973)
	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:466)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.runtime.Platform.run(Platform.java:850)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:193)
	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2023)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:806)
	at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:781)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:755)
	at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:615)
	at org.eclipse.jface.viewers.AbstractTreeViewer.setExpandedState(AbstractTreeViewer.java:2341)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationViewer.getNonFilteredChildCount(LaunchConfigurationViewer.java:194)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationView.updateFilterLabel(LaunchConfigurationView.java:366)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationView.handleConfigurationRemoved(LaunchConfigurationView.java:327)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationView.launchConfigurationRemoved(LaunchConfigurationView.java:311)
	at org.eclipse.debug.internal.core.LaunchManager$ConfigurationNotifier.run(LaunchManager.java:196)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.debug.internal.core.LaunchManager$ConfigurationNotifier.notify(LaunchManager.java:180)
	at org.eclipse.debug.internal.core.LaunchManager.launchConfigurationDeleted(LaunchManager.java:2042)
	at org.eclipse.debug.internal.core.LaunchConfiguration.delete(LaunchConfiguration.java:241)
	at org.eclipse.debug.internal.ui.launchConfigurations.DeleteLaunchConfigurationAction.performAction(DeleteLaunchConfigurationAction.java:69)
	at org.eclipse.debug.internal.ui.launchConfigurations.AbstractLaunchConfigurationAction$1.run(AbstractLaunchConfigurationAction.java:103)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.debug.internal.ui.launchConfigurations.AbstractLaunchConfigurationAction.run(AbstractLaunchConfigurationAction.java:106)
	at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:443)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3673)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
	at org.eclipse.jface.window.Window.open(Window.java:796)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:1133)
	at org.eclipse.debug.ui.DebugUITools$1.run(DebugUITools.java:387)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:391)
	at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:333)
	at org.eclipse.debug.ui.actions.LaunchAction.runWithEvent(LaunchAction.java:79)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3673)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2365)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2329)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2204)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:497)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:436)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1162)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1137)
!SUBENTRY 1 org.eclipse.debug.core 4 5012 2007-05-16 10:07:48.794
!MESSAGE Launch configuration xxx at C:\eclipse\workspaces\Development_3_3\plugins\.metadata\.plugins\org.eclipse.debug.core\.launches\xxx.launch does not exist.
Comment 1 Michael Rennie CLA 2007-05-16 11:29:45 EDT
it seems that the PatternFilter class has a cache of node data for a given parent node. This cache returns the deleted configs for the parent type when filtering is done.

Shouldn't the cache be updated if I delete a filtered node?

The problem appears to be on line 74 of PatternFilter if it helps...

sending to platform UI for comment.
Comment 2 Boris Bokowski CLA 2007-05-16 17:01:06 EDT
Created attachment 67526 [details]
patch
Comment 3 Michael Rennie CLA 2007-05-16 17:37:16 EDT
+1 the patch fixes debug's issues and does not break anything else in the LCD
Comment 4 Boris Bokowski CLA 2007-05-16 17:47:16 EDT
Released >20070516.
Comment 5 Boris Bokowski CLA 2007-05-18 10:42:34 EDT
Verified using I20070517-1700 on Windows XP.
Comment 6 Boris Bokowski CLA 2007-05-24 15:21:42 EDT
*** Bug 124545 has been marked as a duplicate of this bug. ***
Comment 7 Mik Kersten CLA 2007-05-24 15:51:49 EDT
Just for the record this Bugzilla's record this bug is actually a duplicate of bug 124545, which was opened 2006-01-19.  Minor point and I don't think that there is a need to change the dependency, but I wanted to mention it since that bug had more content about the problem.