From 68ccd09ca1f86676b618e739be95e4d40ac3c8df Mon Sep 17 00:00:00 2001 From: Alexander Fedorov Date: Fri, 7 Jul 2023 17:27:14 +0300 Subject: [PATCH] [#449] Import memory window is not working as expected Use `SWT.OPEN` style for import dialogs Signed-off-by: Alexander Fedorov --- .../cdt/debug/ui/memory/transport/PlainTextImporter.java | 4 ++-- .../cdt/debug/ui/memory/transport/RAWBinaryImporter.java | 4 ++-- .../cdt/debug/ui/memory/transport/SRecordImporter.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/PlainTextImporter.java b/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/PlainTextImporter.java index 8de863df91b..82e821a54b7 100644 --- a/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/PlainTextImporter.java +++ b/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/PlainTextImporter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2020 Wind River Systems, Inc. and others. + * Copyright (c) 2006, 2023 Wind River Systems, Inc. and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -157,7 +157,7 @@ public void widgetDefaultSelected(SelectionEvent e) { @Override public void widgetSelected(SelectionEvent e) { - FileDialog dialog = new FileDialog(parent.getShell(), SWT.SAVE); + FileDialog dialog = new FileDialog(parent.getShell(), SWT.OPEN); dialog.setText(Messages.getString("PlainTextImporter.ChooseFile")); //$NON-NLS-1$ dialog.setFilterExtensions(new String[] { "*.*;*" }); //$NON-NLS-1$ dialog.setFilterNames(new String[] { Messages.getString("Importer.AllFiles") }); //$NON-NLS-1$ diff --git a/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/RAWBinaryImporter.java b/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/RAWBinaryImporter.java index c7e36d74b01..c1ad100595c 100644 --- a/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/RAWBinaryImporter.java +++ b/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/RAWBinaryImporter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2020 Wind River Systems, Inc. and others. + * Copyright (c) 2006, 2023 Wind River Systems, Inc. and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -140,7 +140,7 @@ public void widgetDefaultSelected(SelectionEvent e) { @Override public void widgetSelected(SelectionEvent e) { - FileDialog dialog = new FileDialog(parent.getShell(), SWT.SAVE); + FileDialog dialog = new FileDialog(parent.getShell(), SWT.OPEN); dialog.setText(Messages.getString("RAWBinaryImporter.ChooseFile")); //$NON-NLS-1$ dialog.setFilterExtensions(new String[] { "*.*;*" }); //$NON-NLS-1$ dialog.setFilterNames(new String[] { Messages.getString("Importer.AllFiles") }); //$NON-NLS-1$ diff --git a/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/SRecordImporter.java b/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/SRecordImporter.java index 99dafba1ef6..2adf1444d8e 100644 --- a/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/SRecordImporter.java +++ b/memory/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/SRecordImporter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2020 Wind River Systems, Inc. and others. + * Copyright (c) 2006, 2023 Wind River Systems, Inc. and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -194,7 +194,7 @@ public void widgetDefaultSelected(SelectionEvent e) { @Override public void widgetSelected(SelectionEvent e) { - FileDialog dialog = new FileDialog(parent.getShell(), SWT.SAVE); + FileDialog dialog = new FileDialog(parent.getShell(), SWT.OPEN); dialog.setText(Messages.getString("SRecordImporter.ChooseFile")); //$NON-NLS-1$ dialog.setFilterExtensions(new String[] { "*.*;*" }); //$NON-NLS-1$ dialog.setFilterNames(new String[] { Messages.getString("Importer.AllFiles") }); //$NON-NLS-1$