1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Bug 310191 - [number format detail] Detail pane does not clear up when DSF-GDB session is terminated

This commit is contained in:
Pawel Piech 2010-05-19 18:45:18 +00:00
parent 06f8d01d6c
commit fee4df23ae

View file

@ -8,6 +8,7 @@
* Contributors: * Contributors:
* IBM Corporation - initial API and implementation * IBM Corporation - initial API and implementation
* Wind River Systems, Inc. - extended implementation * Wind River Systems, Inc. - extended implementation
* Navid Mehregani (TI) - Bugzilla 310191 - Detail pane does not clear up when DSF-GDB session is terminated
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.dsf.debug.internal.ui.viewmodel.numberformat.detail; package org.eclipse.cdt.dsf.debug.internal.ui.viewmodel.numberformat.detail;
@ -273,6 +274,10 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
fElements = elements; fElements = elements;
} }
public IProgressMonitor getDetailMonitor() {
return fMonitor;
}
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor) * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
*/ */
@ -307,6 +312,11 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
new DataRequestMonitor<Map<String,Object>>(executor, null) { new DataRequestMonitor<Map<String,Object>>(executor, null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
// Bugzilla 310191: Detail pane does not clear up when DSF-GDB session is terminated
if (fMonitor.isCanceled())
return;
Set<String> properties = new HashSet<String>(1); Set<String> properties = new HashSet<String>(1);
properties.add(IElementPropertiesProvider.PROP_NAME); properties.add(IElementPropertiesProvider.PROP_NAME);
final String[] formats = (String[])getData().get( final String[] formats = (String[])getData().get(
@ -727,6 +737,11 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
protected void clearTextViewer(){ protected void clearTextViewer(){
if (fDetailJob != null) { if (fDetailJob != null) {
fDetailJob.cancel(); fDetailJob.cancel();
// Bugzilla 310191: Detail pane does not clear up when DSF-GDB session is terminated
IProgressMonitor progressMonitor = fDetailJob.getDetailMonitor();
if (progressMonitor!=null)
progressMonitor.setCanceled(true);
} }
fLastDisplayed = null; fLastDisplayed = null;
fDetailDocument.set(""); //$NON-NLS-1$ fDetailDocument.set(""); //$NON-NLS-1$