mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Check if part is not null when set the selection.
This commit is contained in:
parent
c274d249d0
commit
d4eb2d4416
5 changed files with 14 additions and 7 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2003-02-28 Mikhail Khodjaiants
|
||||||
|
Check if part is not null when set the selection.
|
||||||
|
* AddExpressionActionDelegate.java
|
||||||
|
* AddGlobalsActionDelegate.java
|
||||||
|
* JumpToLineActionDelegate.java
|
||||||
|
* RunToLineActionDelegate.java
|
||||||
|
|
||||||
2003-02-28 Mikhail Khodjaiants
|
2003-02-28 Mikhail Khodjaiants
|
||||||
Check if page exists before adding a listener.
|
Check if page exists before adding a listener.
|
||||||
* AbstractListenerActionDelegate.java
|
* AbstractListenerActionDelegate.java
|
||||||
|
|
|
@ -108,9 +108,9 @@ public class AddExpressionActionDelegate extends AbstractEditorActionDelegate
|
||||||
public void selectionChanged( IWorkbenchPart part, ISelection selection )
|
public void selectionChanged( IWorkbenchPart part, ISelection selection )
|
||||||
{
|
{
|
||||||
IDebugTarget target = null;
|
IDebugTarget target = null;
|
||||||
if ( part.getSite().getId().equals( IDebugUIConstants.ID_DEBUG_VIEW ) )
|
if ( part != null && part.getSite().getId().equals( IDebugUIConstants.ID_DEBUG_VIEW ) )
|
||||||
{
|
{
|
||||||
if ( selection != null && selection instanceof IStructuredSelection )
|
if ( selection instanceof IStructuredSelection )
|
||||||
{
|
{
|
||||||
Object element = ((IStructuredSelection)selection).getFirstElement();
|
Object element = ((IStructuredSelection)selection).getFirstElement();
|
||||||
if ( element != null && element instanceof IDebugElement )
|
if ( element != null && element instanceof IDebugElement )
|
||||||
|
|
|
@ -110,7 +110,7 @@ public class AddGlobalsActionDelegate implements IViewActionDelegate,
|
||||||
*/
|
*/
|
||||||
public void selectionChanged( IWorkbenchPart part, ISelection selection )
|
public void selectionChanged( IWorkbenchPart part, ISelection selection )
|
||||||
{
|
{
|
||||||
if ( part.getSite().getId().equals( IDebugUIConstants.ID_DEBUG_VIEW ) )
|
if ( part != null && part.getSite().getId().equals( IDebugUIConstants.ID_DEBUG_VIEW ) )
|
||||||
{
|
{
|
||||||
if ( selection instanceof IStructuredSelection )
|
if ( selection instanceof IStructuredSelection )
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,9 +50,9 @@ public class JumpToLineActionDelegate extends AbstractEditorActionDelegate
|
||||||
public void selectionChanged( IWorkbenchPart part, ISelection selection )
|
public void selectionChanged( IWorkbenchPart part, ISelection selection )
|
||||||
{
|
{
|
||||||
IDebugTarget target = null;
|
IDebugTarget target = null;
|
||||||
if ( part.getSite().getId().equals( IDebugUIConstants.ID_DEBUG_VIEW ) )
|
if ( part != null && part.getSite().getId().equals( IDebugUIConstants.ID_DEBUG_VIEW ) )
|
||||||
{
|
{
|
||||||
if ( selection != null && selection instanceof IStructuredSelection )
|
if ( selection instanceof IStructuredSelection )
|
||||||
{
|
{
|
||||||
Object element = ((IStructuredSelection)selection).getFirstElement();
|
Object element = ((IStructuredSelection)selection).getFirstElement();
|
||||||
if ( element != null && element instanceof IDebugElement )
|
if ( element != null && element instanceof IDebugElement )
|
||||||
|
|
|
@ -108,9 +108,9 @@ public class RunToLineActionDelegate extends AbstractEditorActionDelegate
|
||||||
public void selectionChanged( IWorkbenchPart part, ISelection selection )
|
public void selectionChanged( IWorkbenchPart part, ISelection selection )
|
||||||
{
|
{
|
||||||
IDebugTarget target = null;
|
IDebugTarget target = null;
|
||||||
if ( part.getSite().getId().equals( IDebugUIConstants.ID_DEBUG_VIEW ) )
|
if ( part != null && part.getSite().getId().equals( IDebugUIConstants.ID_DEBUG_VIEW ) )
|
||||||
{
|
{
|
||||||
if ( selection != null && selection instanceof IStructuredSelection )
|
if ( selection instanceof IStructuredSelection )
|
||||||
{
|
{
|
||||||
Object element = ((IStructuredSelection)selection).getFirstElement();
|
Object element = ((IStructuredSelection)selection).getFirstElement();
|
||||||
if ( element != null && element instanceof IDebugElement )
|
if ( element != null && element instanceof IDebugElement )
|
||||||
|
|
Loading…
Add table
Reference in a new issue