mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 17:55:39 +02:00
Added the "Filtering" page to the breakpoint properties.
This commit is contained in:
parent
7b09731328
commit
48ce308451
8 changed files with 439 additions and 1 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
2004-08-25 Mikhail Khodjaiants
|
||||||
|
Added the "Filtering" page to the breakpoint properties.
|
||||||
|
* CBreakpointWorkbenchAdapterFactory.java: new
|
||||||
|
* CDebugUIMessages.properties
|
||||||
|
* PropertyPageMessages.properties
|
||||||
|
* CBreakpointFilteringPage.java: new
|
||||||
|
* ThreadFilterEditor.java: new
|
||||||
|
* plugin.xml
|
||||||
|
* plugin.properties
|
||||||
|
|
||||||
2004-08-24 Mikhail Khodjaiants
|
2004-08-24 Mikhail Khodjaiants
|
||||||
Moved the property pages and related classes into the newly created package - "org.eclipse.cdt.debug.internal.ui.propertypages".
|
Moved the property pages and related classes into the newly created package - "org.eclipse.cdt.debug.internal.ui.propertypages".
|
||||||
* PropertyPageMessages.properties: new
|
* PropertyPageMessages.properties: new
|
||||||
|
|
|
@ -121,3 +121,4 @@ DebuggingCContext.name=Debugging C/C++
|
||||||
DebuggingCContext.description=Debugging C/C++ Programs
|
DebuggingCContext.description=Debugging C/C++ Programs
|
||||||
|
|
||||||
CommonBreakpointPage.label=Common
|
CommonBreakpointPage.label=Common
|
||||||
|
FilteringBreakpointPage.label=Filtering
|
||||||
|
|
|
@ -1077,6 +1077,12 @@
|
||||||
class="org.eclipse.cdt.debug.internal.ui.propertypages.CBreakpointPropertyPage"
|
class="org.eclipse.cdt.debug.internal.ui.propertypages.CBreakpointPropertyPage"
|
||||||
name="%CommonBreakpointPage.label"
|
name="%CommonBreakpointPage.label"
|
||||||
id="org.eclipse.cdt.debug.ui.propertypages.breakpoint.common"/>
|
id="org.eclipse.cdt.debug.ui.propertypages.breakpoint.common"/>
|
||||||
|
<page
|
||||||
|
adaptable="true"
|
||||||
|
objectClass="org.eclipse.cdt.debug.core.model.ICBreakpoint"
|
||||||
|
class="org.eclipse.cdt.debug.internal.ui.propertypages.CBreakpointFilteringPage"
|
||||||
|
name="%FilteringBreakpointPage.label"
|
||||||
|
id="org.eclipse.cdt.debug.ui.propertypages.breakpoint.filtering"/>
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
<extension
|
||||||
id="org.eclipse.cdt.debug.ui.editors"
|
id="org.eclipse.cdt.debug.ui.editors"
|
||||||
|
@ -1239,6 +1245,11 @@
|
||||||
type="org.eclipse.debug.ui.actions.IToggleBreakpointsTarget">
|
type="org.eclipse.debug.ui.actions.IToggleBreakpointsTarget">
|
||||||
</adapter>
|
</adapter>
|
||||||
</factory>
|
</factory>
|
||||||
|
<factory
|
||||||
|
class="org.eclipse.cdt.debug.internal.ui.CBreakpointWorkbenchAdapterFactory"
|
||||||
|
adaptableType="org.eclipse.cdt.debug.core.model.ICBreakpoint">
|
||||||
|
<adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
|
||||||
|
</factory>
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.ui.themes">
|
point="org.eclipse.ui.themes">
|
||||||
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
|
package org.eclipse.cdt.debug.internal.ui;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
|
||||||
|
import org.eclipse.cdt.debug.core.model.ICLineBreakpoint;
|
||||||
|
import org.eclipse.cdt.debug.core.model.ICWatchpoint;
|
||||||
|
import org.eclipse.core.runtime.IAdapterFactory;
|
||||||
|
import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
|
import org.eclipse.ui.model.IWorkbenchAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adapter factory for C/C++ breakpoints.
|
||||||
|
*/
|
||||||
|
public class CBreakpointWorkbenchAdapterFactory implements IAdapterFactory {
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
|
||||||
|
*/
|
||||||
|
public Object getAdapter( Object adaptableObject, Class adapterType ) {
|
||||||
|
if ( adapterType != IWorkbenchAdapter.class || !(adaptableObject instanceof ICBreakpoint) ) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return new IWorkbenchAdapter() {
|
||||||
|
|
||||||
|
public Object[] getChildren( Object o ) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImageDescriptor getImageDescriptor( Object object ) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel( Object o ) {
|
||||||
|
// for now
|
||||||
|
if ( (o instanceof ICLineBreakpoint) ) {
|
||||||
|
return CDebugUIMessages.getString( "CBreakpointWorkbenchAdapterFactory.0" ); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
if ( (o instanceof ICWatchpoint) ) {
|
||||||
|
return CDebugUIMessages.getString( "CBreakpointWorkbenchAdapterFactory.1" ); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getParent( Object o ) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
|
||||||
|
*/
|
||||||
|
public Class[] getAdapterList() {
|
||||||
|
return new Class[] { IWorkbenchAdapter.class };
|
||||||
|
}
|
||||||
|
}
|
|
@ -43,3 +43,5 @@ CDTDebugModelPresentation.28=[function: {0}]
|
||||||
CDTDebugModelPresentation.29=[ignore count: {0}]
|
CDTDebugModelPresentation.29=[ignore count: {0}]
|
||||||
CDTDebugModelPresentation.30=if
|
CDTDebugModelPresentation.30=if
|
||||||
CDTDebugModelPresentation.31=at
|
CDTDebugModelPresentation.31=at
|
||||||
|
CBreakpointWorkbenchAdapterFactory.0=C/C++ breakpoint
|
||||||
|
CBreakpointWorkbenchAdapterFactory.1=C/C++ watchpoint
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
|
package org.eclipse.cdt.debug.internal.ui.propertypages;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
|
||||||
|
import org.eclipse.swt.SWT;
|
||||||
|
import org.eclipse.swt.layout.GridData;
|
||||||
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
import org.eclipse.swt.widgets.Control;
|
||||||
|
import org.eclipse.ui.dialogs.PropertyPage;
|
||||||
|
|
||||||
|
public class CBreakpointFilteringPage extends PropertyPage {
|
||||||
|
|
||||||
|
private ThreadFilterEditor fThreadFilterEditor;
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
|
||||||
|
*/
|
||||||
|
protected Control createContents( Composite parent ) {
|
||||||
|
noDefaultAndApplyButton();
|
||||||
|
Composite mainComposite = new Composite( parent, SWT.NONE );
|
||||||
|
mainComposite.setFont( parent.getFont() );
|
||||||
|
mainComposite.setLayout( new GridLayout() );
|
||||||
|
mainComposite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
|
||||||
|
createThreadFilterEditor( mainComposite );
|
||||||
|
setValid( true );
|
||||||
|
return mainComposite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ICBreakpoint getBreakpoint() {
|
||||||
|
return (ICBreakpoint)getElement();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void createThreadFilterEditor( Composite parent ) {
|
||||||
|
fThreadFilterEditor = new ThreadFilterEditor( parent, this );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ThreadFilterEditor getThreadFilterEditor() {
|
||||||
|
return fThreadFilterEditor;
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,3 +29,4 @@ CBreakpointPropertyPage.16=Invalid condition.
|
||||||
CBreakpointPropertyPage.17=&Ignore count:
|
CBreakpointPropertyPage.17=&Ignore count:
|
||||||
CBreakpointPropertyPage.18=Type:
|
CBreakpointPropertyPage.18=Type:
|
||||||
CBreakpointPropertyPage.19=Enabled
|
CBreakpointPropertyPage.19=Enabled
|
||||||
|
ThreadFilterEditor.0=&Restrict to Selected Thread(s):
|
||||||
|
|
|
@ -0,0 +1,298 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
|
package org.eclipse.cdt.debug.internal.ui.propertypages;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import org.eclipse.cdt.debug.core.model.ICDebugTarget;
|
||||||
|
import org.eclipse.debug.core.DebugException;
|
||||||
|
import org.eclipse.debug.core.DebugPlugin;
|
||||||
|
import org.eclipse.debug.core.ILaunch;
|
||||||
|
import org.eclipse.debug.core.ILaunchManager;
|
||||||
|
import org.eclipse.debug.core.model.IDebugElement;
|
||||||
|
import org.eclipse.debug.core.model.IDebugTarget;
|
||||||
|
import org.eclipse.debug.core.model.IStackFrame;
|
||||||
|
import org.eclipse.debug.core.model.IThread;
|
||||||
|
import org.eclipse.debug.internal.ui.DebugUIPlugin;
|
||||||
|
import org.eclipse.debug.ui.DebugUITools;
|
||||||
|
import org.eclipse.jface.viewers.AbstractTreeViewer;
|
||||||
|
import org.eclipse.jface.viewers.CheckStateChangedEvent;
|
||||||
|
import org.eclipse.jface.viewers.CheckboxTreeViewer;
|
||||||
|
import org.eclipse.jface.viewers.ICheckStateListener;
|
||||||
|
import org.eclipse.jface.viewers.ITreeContentProvider;
|
||||||
|
import org.eclipse.jface.viewers.Viewer;
|
||||||
|
import org.eclipse.swt.SWT;
|
||||||
|
import org.eclipse.swt.layout.GridData;
|
||||||
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
import org.eclipse.swt.widgets.Label;
|
||||||
|
|
||||||
|
public class ThreadFilterEditor {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Comment for ThreadFilterEditor.
|
||||||
|
*/
|
||||||
|
public class CheckHandler implements ICheckStateListener {
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ICheckStateListener#checkStateChanged(org.eclipse.jface.viewers.CheckStateChangedEvent)
|
||||||
|
*/
|
||||||
|
public void checkStateChanged( CheckStateChangedEvent event ) {
|
||||||
|
Object element = event.getElement();
|
||||||
|
if ( element instanceof IDebugTarget ) {
|
||||||
|
checkTarget( (IDebugTarget)element, event.getChecked() );
|
||||||
|
}
|
||||||
|
else if ( element instanceof IThread ) {
|
||||||
|
checkThread( (IThread)element, event.getChecked() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check or uncheck a debug target in the tree viewer.
|
||||||
|
* When a debug target is checked, attempt to
|
||||||
|
* check all of the target's threads by default.
|
||||||
|
* When a debug target is unchecked, uncheck all
|
||||||
|
* its threads.
|
||||||
|
*/
|
||||||
|
protected void checkTarget( IDebugTarget target, boolean checked ) {
|
||||||
|
getThreadViewer().setChecked( target, checked );
|
||||||
|
getThreadViewer().setGrayed( target, false );
|
||||||
|
getThreadViewer().expandToLevel( target, AbstractTreeViewer.ALL_LEVELS );
|
||||||
|
IThread[] threads;
|
||||||
|
try {
|
||||||
|
threads = target.getThreads();
|
||||||
|
}
|
||||||
|
catch( DebugException exception ) {
|
||||||
|
DebugUIPlugin.log( exception );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for( int i = 0; i < threads.length; i++ ) {
|
||||||
|
getThreadViewer().setChecked( threads[i], checked );
|
||||||
|
getThreadViewer().setGrayed( threads[i], false );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check or uncheck a thread.
|
||||||
|
* Update the thread's debug target.
|
||||||
|
*/
|
||||||
|
protected void checkThread( IThread thread, boolean checked ) {
|
||||||
|
getThreadViewer().setChecked( thread, checked );
|
||||||
|
IDebugTarget target = (thread).getDebugTarget();
|
||||||
|
IThread[] threads;
|
||||||
|
try {
|
||||||
|
threads = target.getThreads();
|
||||||
|
}
|
||||||
|
catch( DebugException exception ) {
|
||||||
|
DebugUIPlugin.log( exception );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int checkedNumber = 0;
|
||||||
|
for( int i = 0; i < threads.length; i++ ) {
|
||||||
|
if ( getThreadViewer().getChecked( threads[i] ) ) {
|
||||||
|
++checkedNumber;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( checkedNumber == 0 ) {
|
||||||
|
getThreadViewer().setChecked( target, false );
|
||||||
|
getThreadViewer().setGrayed( target, false );
|
||||||
|
}
|
||||||
|
else if ( checkedNumber == threads.length ) {
|
||||||
|
getThreadViewer().setChecked( target, true );
|
||||||
|
getThreadViewer().setGrayed( target, false );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
getThreadViewer().setGrayChecked( target, true );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Comment for ThreadFilterEditor.
|
||||||
|
*/
|
||||||
|
public class ThreadFilterContentProvider implements ITreeContentProvider {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for ThreadFilterContentProvider.
|
||||||
|
*/
|
||||||
|
public ThreadFilterContentProvider() {
|
||||||
|
super();
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public Object[] getChildren( Object parent ) {
|
||||||
|
if ( parent instanceof IDebugTarget ) {
|
||||||
|
ICDebugTarget target = (ICDebugTarget)((IDebugTarget)parent).getAdapter( ICDebugTarget.class );
|
||||||
|
if ( target != null ) {
|
||||||
|
try {
|
||||||
|
return ((ICDebugTarget)parent).getThreads();
|
||||||
|
}
|
||||||
|
catch( DebugException e ) {
|
||||||
|
DebugUIPlugin.log( e );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( parent instanceof ILaunchManager ) {
|
||||||
|
List children = new ArrayList();
|
||||||
|
ILaunch[] launches = ((ILaunchManager)parent).getLaunches();
|
||||||
|
IDebugTarget[] targets;
|
||||||
|
ICDebugTarget target;
|
||||||
|
for( int i = 0, numLaunches = launches.length; i < numLaunches; i++ ) {
|
||||||
|
targets = launches[i].getDebugTargets();
|
||||||
|
for( int j = 0, numTargets = targets.length; j < numTargets; j++ ) {
|
||||||
|
target = (ICDebugTarget)targets[j].getAdapter( ICDebugTarget.class );
|
||||||
|
if ( target != null && !target.isDisconnected() && !target.isTerminated() ) {
|
||||||
|
children.add( target );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return children.toArray();
|
||||||
|
}
|
||||||
|
return new Object[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public Object getParent( Object element ) {
|
||||||
|
if ( element instanceof IThread ) {
|
||||||
|
return ((IThread)element).getDebugTarget();
|
||||||
|
}
|
||||||
|
if ( element instanceof IDebugTarget ) {
|
||||||
|
return ((IDebugElement)element).getLaunch();
|
||||||
|
}
|
||||||
|
if ( element instanceof ILaunch ) {
|
||||||
|
return DebugPlugin.getDefault().getLaunchManager();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public boolean hasChildren( Object element ) {
|
||||||
|
if ( element instanceof IStackFrame ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ( element instanceof IDebugElement ) {
|
||||||
|
return getChildren( element ).length > 0;
|
||||||
|
}
|
||||||
|
if ( element instanceof ILaunch ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if ( element instanceof ILaunchManager ) {
|
||||||
|
return ((ILaunchManager)element).getLaunches().length > 0;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public Object[] getElements( Object inputElement ) {
|
||||||
|
return getChildren( inputElement );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
|
||||||
|
*/
|
||||||
|
public void dispose() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void inputChanged( Viewer viewer, Object oldInput, Object newInput ) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private CBreakpointFilteringPage fPage;
|
||||||
|
|
||||||
|
private CheckboxTreeViewer fThreadViewer;
|
||||||
|
|
||||||
|
private ThreadFilterContentProvider fContentProvider;
|
||||||
|
|
||||||
|
private CheckHandler fCheckHandler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for ThreadFilterEditor.
|
||||||
|
*/
|
||||||
|
public ThreadFilterEditor( Composite parent, CBreakpointFilteringPage page ) {
|
||||||
|
fPage = page;
|
||||||
|
fContentProvider = new ThreadFilterContentProvider();
|
||||||
|
fCheckHandler = new CheckHandler();
|
||||||
|
createThreadViewer( parent );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected CBreakpointFilteringPage getPage() {
|
||||||
|
return fPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createThreadViewer( Composite parent ) {
|
||||||
|
Label label = new Label( parent, SWT.NONE );
|
||||||
|
label.setText( PropertyPageMessages.getString( "ThreadFilterEditor.0" ) ); //$NON-NLS-1$
|
||||||
|
label.setFont( parent.getFont() );
|
||||||
|
label.setLayoutData( new GridData() );
|
||||||
|
GridData data = new GridData( GridData.FILL_BOTH );
|
||||||
|
data.heightHint = 100;
|
||||||
|
fThreadViewer = new CheckboxTreeViewer( parent, SWT.BORDER );
|
||||||
|
fThreadViewer.addCheckStateListener( fCheckHandler );
|
||||||
|
fThreadViewer.getTree().setLayoutData( data );
|
||||||
|
fThreadViewer.getTree().setFont( parent.getFont() );
|
||||||
|
fThreadViewer.setContentProvider( fContentProvider );
|
||||||
|
fThreadViewer.setLabelProvider( DebugUITools.newDebugModelPresentation() );
|
||||||
|
fThreadViewer.setInput( DebugPlugin.getDefault().getLaunchManager() );
|
||||||
|
setInitialCheckedState();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the debug targets that appear in the tree
|
||||||
|
*/
|
||||||
|
protected IDebugTarget[] getDebugTargets() {
|
||||||
|
Object input = fThreadViewer.getInput();
|
||||||
|
if ( !(input instanceof ILaunchManager) ) {
|
||||||
|
return new IDebugTarget[0];
|
||||||
|
}
|
||||||
|
ILaunchManager launchManager = (ILaunchManager)input;
|
||||||
|
return launchManager.getDebugTargets();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected CheckboxTreeViewer getThreadViewer() {
|
||||||
|
return fThreadViewer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the initial checked state of the tree viewer.
|
||||||
|
* The initial state should reflect the current state
|
||||||
|
* of the breakpoint. If the breakpoint has a thread
|
||||||
|
* filter in a given thread, that thread should be
|
||||||
|
* checked.
|
||||||
|
*/
|
||||||
|
protected void setInitialCheckedState() {
|
||||||
|
// try {
|
||||||
|
// IDebugTarget[] targets = getDebugTargets();
|
||||||
|
// for( int i = 0, numTargets = targets.length; i < numTargets; i++ ) {
|
||||||
|
// ICDebugTarget target = (ICDebugTarget)targets[i].getAdapter( ICDebugTarget.class );
|
||||||
|
// if ( target != null ) {
|
||||||
|
// ICThread filteredThread = fPage.getBreakpoint().getThreadFilter( target );
|
||||||
|
// if ( filteredThread != null ) {
|
||||||
|
// fCheckHandler.checkThread( filteredThread, true );
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// catch( CoreException e ) {
|
||||||
|
// DebugUIPlugin.log( e );
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue