Skip to main content
summaryrefslogtreecommitdiffstats
path: root/memory
diff options
context:
space:
mode:
authorRandy Rohrbach2013-01-03 19:46:50 +0000
committerRandy Rohrbach2013-01-03 23:12:55 +0000
commit2ea99a91b06164df9539bc8ecf2b12c0e560d0a7 (patch)
treee514c3c3e16b1b529173ef18e8ca13545398cea3 /memory
parent2993ef82667e507170ae6fb67e682991471799da (diff)
downloadorg.eclipse.cdt-2ea99a91b06164df9539bc8ecf2b12c0e560d0a7.tar.gz
org.eclipse.cdt-2ea99a91b06164df9539bc8ecf2b12c0e560d0a7.tar.xz
org.eclipse.cdt-2ea99a91b06164df9539bc8ecf2b12c0e560d0a7.zip
Bug 397404 - Trying to export memory on a 64-bit address space does not
bring up the dialog.
Diffstat (limited to 'memory')
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/TraditionalRendering.java6
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/SRecordExporter.java43
2 files changed, 41 insertions, 8 deletions
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/TraditionalRendering.java b/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/TraditionalRendering.java
index b9331ea9f69..df26c55c2bb 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/TraditionalRendering.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/TraditionalRendering.java
@@ -268,8 +268,10 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
* the model provider.
*/
fModel = factory.createModelProxy(block, context);
- fModel.installed(null);
- fModel.addModelChangedListener(TraditionalRendering.this);
+ if ( fModel != null ) {
+ fModel.installed(null);
+ fModel.addModelChangedListener(TraditionalRendering.this);
+ }
}});
}
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/SRecordExporter.java b/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/SRecordExporter.java
index 225ccfc6825..f1e7807b101 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/SRecordExporter.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/SRecordExporter.java
@@ -72,9 +72,13 @@ public class SRecordExporter implements IMemoryExporter
fProperties.put(TRANSFER_START, fStartText.getText());
fProperties.put(TRANSFER_END, fEndText.getText());
- fStartAddress = getStartAddress();
- fEndAddress = getEndAddress();
- fOutputFile = getFile();
+ try
+ {
+ fStartAddress = getStartAddress();
+ fEndAddress = getEndAddress();
+ fOutputFile = getFile();
+ }
+ catch(Exception e) {}
super.dispose();
}
@@ -157,11 +161,38 @@ public class SRecordExporter implements IMemoryExporter
textValue = fProperties.get(TRANSFER_START);
fStartText.setText(textValue != null ? textValue : "0x0"); //$NON-NLS-1$
+
+ try
+ {
+ getStartAddress();
+ }
+ catch(Exception e)
+ {
+ fStartText.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_RED));
+ }
+
textValue = fProperties.get(TRANSFER_END);
fEndText.setText(textValue != null ? textValue : "0x0"); //$NON-NLS-1$
-
- fLengthText.setText(getEndAddress().subtract(getStartAddress()).toString());
+
+ try
+ {
+ getEndAddress();
+ }
+ catch(Exception e)
+ {
+ fEndText.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_RED));
+ }
+
+ try
+ {
+ fLengthText.setText(getEndAddress().subtract(getStartAddress()).toString());
+ }
+ catch(Exception e)
+ {
+ fLengthText.setText("0");
+ fLengthText.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_RED));
+ }
fileButton.addSelectionListener(new SelectionListener() {
@@ -234,7 +265,7 @@ public class SRecordExporter implements IMemoryExporter
}
catch(Exception ex)
{
- fEndText.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_RED));
+ fEndText.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_RED));
validate();
//fParentDialog.setValid(false);
}

Back to the top