diff options
author | Mikhail Khodjaiants | 2005-01-19 00:20:24 +0000 |
---|---|---|
committer | Mikhail Khodjaiants | 2005-01-19 00:20:24 +0000 |
commit | e1377f31dc30db8bba302fbc765cc10f7e6f12e1 (patch) | |
tree | 3566d536053f2bf7494fc14a4a601ede97ed7438 | |
parent | 53756a45fc95726e48e6acf7f3dcc0673982f8ed (diff) | |
download | org.eclipse.cdt-e1377f31dc30db8bba302fbc765cc10f7e6f12e1.tar.gz org.eclipse.cdt-e1377f31dc30db8bba302fbc765cc10f7e6f12e1.tar.xz org.eclipse.cdt-e1377f31dc30db8bba302fbc765cc10f7e6f12e1.zip |
Fix for bug 82858: NPE when adding global variable to variable view.
3 files changed, 9 insertions, 4 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index f8720b466f3..d0f6678e947 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,8 @@ +2005-01-18 Mikhail Khodjaiants
+ Fix for bug 82858: NPE when adding global variable to variable view.
+ * CDebugTarget.java
+ * CVariableFactory.java
+
2005-01-04 Mikhail Khodjaiants
Fix for bug 82184: arrayboundsexception on display of array variable.
* CIndexedValue.java
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java index 01eeecb9dd9..315cfcf8a6b 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java @@ -1874,7 +1874,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv public ICGlobalVariable createGlobalVariable( IGlobalVariableDescriptor info ) throws DebugException { ICDIVariableDescriptor vo = null; try { - vo = getCDITarget().getGlobalVariableDescriptors(info.getPath().lastSegment(), null, info.getName()); + vo = getCDITarget().getGlobalVariableDescriptors( info.getPath().lastSegment(), null, info.getName() ); } catch( CDIException e ) { throw new DebugException( new Status( IStatus.ERROR, CDIDebugModel.getPluginIdentifier(), DebugException.TARGET_REQUEST_FAILED, (vo != null) ? vo.getName() + ": " + e.getMessage() : e.getMessage(), null ) ); //$NON-NLS-1$ diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariableFactory.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariableFactory.java index c7d1d15313c..ddd22121ee1 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariableFactory.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariableFactory.java @@ -34,7 +34,7 @@ public class CVariableFactory { } public static IGlobalVariableDescriptor createGlobalVariableDescriptor( final String name, final IPath path ) { - + return new IGlobalVariableDescriptor() { public String getName() { @@ -42,7 +42,7 @@ public class CVariableFactory { } public IPath getPath() { - return path; + return ( path != null ) ? path : new Path( "" ); //$NON-NLS-1$ } public String toString() { @@ -60,7 +60,7 @@ public class CVariableFactory { return createGlobalVariableDescriptor( var.getElementName(), path ); } - public static IGlobalVariableDescriptor createGlobalVariableDescriptor(ISymbol symbol) { + public static IGlobalVariableDescriptor createGlobalVariableDescriptor( ISymbol symbol ) { return createGlobalVariableDescriptor( symbol.getName(), symbol.getFilename() ); } |