debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RomImageTab.java
equal
deleted
inserted
replaced
38 import org.eclipse.swt.widgets.Label; |
38 import org.eclipse.swt.widgets.Label; |
39 import org.eclipse.swt.widgets.Text; |
39 import org.eclipse.swt.widgets.Text; |
40 import org.eclipse.ui.PlatformUI; |
40 import org.eclipse.ui.PlatformUI; |
41 import com.freescale.swt.widgets.CheckboxGroup; |
41 import com.freescale.swt.widgets.CheckboxGroup; |
42 import com.nokia.cdt.internal.debug.launch.LaunchPlugin; |
42 import com.nokia.cdt.internal.debug.launch.LaunchPlugin; |
|
43 import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils; |
43 |
44 |
44 import cwdbg.PreferenceConstants; |
45 import cwdbg.PreferenceConstants; |
45 |
46 |
46 public class RomImageTab extends CLaunchConfigurationTab { |
47 public class RomImageTab extends CLaunchConfigurationTab { |
47 |
48 |
136 FileDialog dialog = new FileDialog(getShell(), SWT.NONE); |
137 FileDialog dialog = new FileDialog(getShell(), SWT.NONE); |
137 |
138 |
138 dialog.setText(Messages.getString("RomImageTab.14")); //$NON-NLS-1$ |
139 dialog.setText(Messages.getString("RomImageTab.14")); //$NON-NLS-1$ |
139 dialog.setFilterExtensions(new String[] {"*.img*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$ |
140 dialog.setFilterExtensions(new String[] {"*.img*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$ |
140 dialog.setFilterNames(new String[] {Messages.getString("RomImageTab.15"), Messages.getString("RomImageTab.16")}); //$NON-NLS-1$ //$NON-NLS-2$ |
141 dialog.setFilterNames(new String[] {Messages.getString("RomImageTab.15"), Messages.getString("RomImageTab.16")}); //$NON-NLS-1$ //$NON-NLS-2$ |
141 |
142 |
|
143 BrowseDialogUtils.initializeFrom(dialog, osImagePath); |
|
144 |
142 String result = dialog.open(); |
145 String result = dialog.open(); |
143 if (result != null && new File(result).exists()) { |
146 if (result != null && new File(result).exists()) { |
144 osImagePath.setText(result); |
147 osImagePath.setText(result); |
145 updateLaunchConfigurationDialog(); |
148 updateLaunchConfigurationDialog(); |
146 } |
149 } |
230 FileDialog dialog = new FileDialog(getShell(), SWT.NONE); |
233 FileDialog dialog = new FileDialog(getShell(), SWT.NONE); |
231 |
234 |
232 dialog.setText(Messages.getString("RomLogFileTab.6")); //$NON-NLS-1$ |
235 dialog.setText(Messages.getString("RomLogFileTab.6")); //$NON-NLS-1$ |
233 dialog.setFilterExtensions(new String[] {"*.log*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$ |
236 dialog.setFilterExtensions(new String[] {"*.log*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$ |
234 dialog.setFilterNames(new String[] {Messages.getString("RomLogFileTab.7"), Messages.getString("RomLogFileTab.8")}); //$NON-NLS-1$ //$NON-NLS-2$ |
237 dialog.setFilterNames(new String[] {Messages.getString("RomLogFileTab.7"), Messages.getString("RomLogFileTab.8")}); //$NON-NLS-1$ //$NON-NLS-2$ |
235 |
238 |
|
239 BrowseDialogUtils.initializeFrom(dialog, romLogFilePath); |
|
240 |
236 String result = dialog.open(); |
241 String result = dialog.open(); |
237 if (result != null && new File(result).exists()) { |
242 if (result != null && new File(result).exists()) { |
238 romLogFilePath.setText(result); |
243 romLogFilePath.setText(result); |
239 updateLaunchConfigurationDialog(); |
244 updateLaunchConfigurationDialog(); |
240 } |
245 } |
261 epoc32DirBrowse = createPushButton(parseRomLogGroup.getGroup(), Messages.getString("RomLogFileTab.5"), null); //$NON-NLS-1$ |
266 epoc32DirBrowse = createPushButton(parseRomLogGroup.getGroup(), Messages.getString("RomLogFileTab.5"), null); //$NON-NLS-1$ |
262 epoc32DirBrowse.addSelectionListener(new SelectionAdapter() { |
267 epoc32DirBrowse.addSelectionListener(new SelectionAdapter() { |
263 |
268 |
264 public void widgetSelected(SelectionEvent evt) { |
269 public void widgetSelected(SelectionEvent evt) { |
265 DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE); |
270 DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE); |
|
271 BrowseDialogUtils.initializeFrom(dialog, epoc32DirPath); |
266 |
272 |
267 dialog.setText(Messages.getString("RomLogFileTab.11")); //$NON-NLS-1$ |
273 dialog.setText(Messages.getString("RomLogFileTab.11")); //$NON-NLS-1$ |
268 String result = dialog.open(); |
274 String result = dialog.open(); |
269 |
275 |
270 if (result != null && new File(result).exists()) { |
276 if (result != null && new File(result).exists()) { |