diff options
author | Mikhail Khodjaiants | 2005-12-20 21:15:55 +0000 |
---|---|---|
committer | Mikhail Khodjaiants | 2005-12-20 21:15:55 +0000 |
commit | 7b6a59669226443339697124da2dbf3b03e3ec26 (patch) | |
tree | 1cc3f51a534535b478472921f2a09cd573a774c5 /launch | |
parent | 4c2b367e01d9b33fc10f924820d8e8c8e4dd92d6 (diff) | |
download | org.eclipse.cdt-7b6a59669226443339697124da2dbf3b03e3ec26.tar.gz org.eclipse.cdt-7b6a59669226443339697124da2dbf3b03e3ec26.tar.xz org.eclipse.cdt-7b6a59669226443339697124da2dbf3b03e3ec26.zip |
Bug 121474: NPE in CDebuggerTab.
Diffstat (limited to 'launch')
-rw-r--r-- | launch/org.eclipse.cdt.launch/ChangeLog | 4 | ||||
-rw-r--r-- | launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java | 44 |
2 files changed, 25 insertions, 23 deletions
diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog index f5617daea7b..c510090f3ba 100644 --- a/launch/org.eclipse.cdt.launch/ChangeLog +++ b/launch/org.eclipse.cdt.launch/ChangeLog @@ -1,3 +1,7 @@ +2005-12-20 Mikhail Khodjaiants + Bug 121474: NPE in CDebuggerTab. + * CDebuggerTab.java + 2005-09-08 Mikhail Khodjaiants The "Debugger" tab of the launch configuration dialog is too wide. * CDebuggerTab.java diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java index dcde2361e97..51163409043 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java @@ -28,7 +28,6 @@ import org.eclipse.cdt.debug.core.ICDebugConfiguration; import org.eclipse.cdt.launch.internal.ui.AbstractCDebuggerTab; import org.eclipse.cdt.launch.internal.ui.LaunchMessages; import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin; -import org.eclipse.cdt.launch.internal.ui.PixelConverter; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; @@ -36,13 +35,10 @@ import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.internal.ui.SWTUtil; import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; @@ -277,28 +273,30 @@ public class CDebuggerTab extends AbstractCDebuggerTab { programName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, (String)null); } catch (CoreException e) { } - IPath exePath = new Path(programName); - if (projectName != null && !projectName.equals("")) { //$NON-NLS-1$ - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); - ICExtensionReference[] parserRef = CCorePlugin.getDefault().getBinaryParserExtensions(project); - for (int i = 0; i < parserRef.length; i++) { - try { - IBinaryParser parser = (IBinaryParser)parserRef[i].createExtension(); - IBinaryObject exe = (IBinaryObject)parser.getBinary(exePath); - if (exe != null) { - return exe; + if (programName != null ) { + IPath exePath = new Path(programName); + if (projectName != null && !projectName.equals("")) { //$NON-NLS-1$ + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); + ICExtensionReference[] parserRef = CCorePlugin.getDefault().getBinaryParserExtensions(project); + for (int i = 0; i < parserRef.length; i++) { + try { + IBinaryParser parser = (IBinaryParser)parserRef[i].createExtension(); + IBinaryObject exe = (IBinaryObject)parser.getBinary(exePath); + if (exe != null) { + return exe; + } + } catch (ClassCastException e) { + } catch (IOException e) { } - } catch (ClassCastException e) { - } catch (IOException e) { } } - } - IBinaryParser parser = CCorePlugin.getDefault().getDefaultBinaryParser(); - try { - IBinaryObject exe = (IBinaryObject)parser.getBinary(exePath); - return exe; - } catch (ClassCastException e) { - } catch (IOException e) { + IBinaryParser parser = CCorePlugin.getDefault().getDefaultBinaryParser(); + try { + IBinaryObject exe = (IBinaryObject)parser.getBinary(exePath); + return exe; + } catch (ClassCastException e) { + } catch (IOException e) { + } } return null; } |