Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Check if part is not null when set the selection

Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.ui/ChangeLog,v
retrieving revision 1.106
diff -u -r1.106 ChangeLog
--- ChangeLog 28 Feb 2003 21:31:06 -0000 1.106
+++ ChangeLog 28 Feb 2003 21:37:02 -0000
@@ -1,4 +1,11 @@
 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
  Check if page exists before adding a listener.
  * AbstractListenerActionDelegate.java
 
Index: AddExpressionActionDelegate.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddExpressionActionDelegate.java,v
retrieving revision 1.12
diff -u -r1.12 AddExpressionActionDelegate.java
--- AddExpressionActionDelegate.java 6 Feb 2003 21:26:20 -0000 1.12
+++ AddExpressionActionDelegate.java 28 Feb 2003 21:37:26 -0000
@@ -108,9 +108,9 @@
  public void selectionChanged( IWorkbenchPart part, ISelection selection )
  {
   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();
     if ( element != null && element instanceof IDebugElement )
Index: AddGlobalsActionDelegate.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java,v
retrieving revision 1.4
diff -u -r1.4 AddGlobalsActionDelegate.java
--- AddGlobalsActionDelegate.java 11 Feb 2003 23:49:31 -0000 1.4
+++ AddGlobalsActionDelegate.java 28 Feb 2003 21:37:26 -0000
@@ -110,7 +110,7 @@
   */
  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 )
    {
Index: JumpToLineActionDelegate.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/JumpToLineActionDelegate.java,v
retrieving revision 1.1
diff -u -r1.1 JumpToLineActionDelegate.java
--- JumpToLineActionDelegate.java 5 Feb 2003 22:32:09 -0000 1.1
+++ JumpToLineActionDelegate.java 28 Feb 2003 21:37:26 -0000
@@ -50,9 +50,9 @@
  public void selectionChanged( IWorkbenchPart part, ISelection selection )
  {
   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();
     if ( element != null && element instanceof IDebugElement )
Index: RunToLineActionDelegate.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineActionDelegate.java,v
retrieving revision 1.6
diff -u -r1.6 RunToLineActionDelegate.java
--- RunToLineActionDelegate.java 5 Feb 2003 22:32:09 -0000 1.6
+++ RunToLineActionDelegate.java 28 Feb 2003 21:37:26 -0000
@@ -108,9 +108,9 @@
  public void selectionChanged( IWorkbenchPart part, ISelection selection )
  {
   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();
     if ( element != null && element instanceof IDebugElement )

Back to the top