Initial fixes for bug #10363 (Browse... button behavior)
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/AddEditSisFileToBuildDialog.java Thu Dec 10 14:51:11 2009 -0600
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/AddEditSisFileToBuildDialog.java Thu Dec 10 14:53:07 2009 -0600
@@ -47,6 +47,7 @@
import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo;
import com.nokia.carbide.cdt.internal.api.builder.SISBuilderInfo2;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
import com.nokia.sdt.utils.ProjectFileResourceProxyVisitor;
public class AddEditSisFileToBuildDialog extends StatusDialog {
@@ -384,7 +385,7 @@
DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.OPEN);
dialog.setText("Choose a folder...");
- dialog.setFilterPath(contentSearchLocationEdit.getText());
+ BrowseDialogUtils.initializeFrom(dialog, contentSearchLocationEdit);
String selectedDir = dialog.open();
if (selectedDir != null && selectedDir.length() > 0) {
@@ -530,11 +531,11 @@
FileDialog fileDialog = new FileDialog(getShell(), SWT.OPEN);
fileDialog.setFilterExtensions(extFilter);
fileDialog.setText(title);
-
- int lastSeparatorIndex = startDir.lastIndexOf(File.separator);
- if (lastSeparatorIndex != -1) {
- fileDialog.setFilterPath(startDir.substring(0, lastSeparatorIndex));
- }
+
+ IPath startPath = new Path(startDir);
+ if (!startPath.isAbsolute() && project != null)
+ startPath = project.getLocation().append(startPath);
+ BrowseDialogUtils.initializeFrom(fileDialog, startPath);
return fileDialog.open();
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideMacroSettingsPage.java Thu Dec 10 14:51:11 2009 -0600
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideMacroSettingsPage.java Thu Dec 10 14:53:07 2009 -0600
@@ -41,6 +41,7 @@
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cdt.internal.builder.CarbideProjectInfo;
import com.nokia.carbide.cdt.internal.builder.CarbideProjectModifier;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
public class CarbideMacroSettingsPage extends PropertyPage {
@@ -77,6 +78,8 @@
fileDialog.setFilterExtensions(new String[] {"*.*"});
fileDialog.setText(Messages.getString("CarbideMacroSettingsPage.BrowseDialogTitle")); //$NON-NLS-1$
+ BrowseDialogUtils.initializeFrom(fileDialog, fMacroFileEdit);
+
String path = fileDialog.open();
if (path != null) {
fMacroFileEdit.setText(path);
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/ROMBuilderTabComposite.java Thu Dec 10 14:51:11 2009 -0600
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/ROMBuilderTabComposite.java Thu Dec 10 14:53:07 2009 -0600
@@ -34,6 +34,7 @@
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.IROMBuilderInfo;
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
/**
* Arguments tab for the Carbide Build Configurations page
@@ -73,6 +74,7 @@
workingDirBrowse.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent evt) {
DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE);
+ BrowseDialogUtils.initializeFrom(dialog, workingDirEdit);
dialog.setText(Messages.getString("CarbideRomBuilderTab.Rom_Dir_Dialog_Title")); //$NON-NLS-1$
String result = dialog.open();
--- a/connectivity/com.nokia.carbide.remoteConnections/META-INF/MANIFEST.MF Thu Dec 10 14:51:11 2009 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/META-INF/MANIFEST.MF Thu Dec 10 14:53:07 2009 -0600
@@ -11,7 +11,8 @@
com.nokia.cpp.utils.core,
org.eclipse.emf.ecore.xmi;bundle-version="2.4.0",
org.eclipse.core.net;bundle-version="1.1.0",
- org.eclipse.help;bundle-version="3.4.0"
+ org.eclipse.help;bundle-version="3.4.0",
+ com.nokia.cpp.utils.ui;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Export-Package: com.nokia.carbide.installpackages,
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/wizard/ImportPage.java Thu Dec 10 14:51:11 2009 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/wizard/ImportPage.java Thu Dec 10 14:53:07 2009 -0600
@@ -22,6 +22,7 @@
import com.nokia.carbide.remoteconnections.Messages;
import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator;
import com.nokia.carbide.remoteconnections.internal.registry.Reader;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -68,6 +69,7 @@
fileDialog.setText(Messages.getString("ImportPage.FileDialogTitle")); //$NON-NLS-1$
fileDialog.setFilterExtensions(FILTER_EXTS);
fileDialog.setFilterNames(FILTER_EXT_NAMES);
+ BrowseDialogUtils.initializeFrom(fileDialog, pathText);
String pathstr = fileDialog.open();
if (pathstr != null) {
pathText.setText(pathstr);
--- a/core/com.nokia.carbide.bugreport/META-INF/MANIFEST.MF Thu Dec 10 14:51:11 2009 -0600
+++ b/core/com.nokia.carbide.bugreport/META-INF/MANIFEST.MF Thu Dec 10 14:53:07 2009 -0600
@@ -11,7 +11,8 @@
org.eclipse.ui.console,
org.eclipse.jface.text,
org.eclipse.core.net,
- com.nokia.cpp.utils.core
+ com.nokia.cpp.utils.core,
+ com.nokia.cpp.utils.ui;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Export-Package: com.nokia.carbide.internal.bugreport.export
Bundle-ClassPath: lib/commons-httpclient-3.1.jar,
--- a/core/com.nokia.carbide.bugreport/src/com/nokia/carbide/internal/bugreport/ui/wizards/BugDescriptionPage.java Thu Dec 10 14:51:11 2009 -0600
+++ b/core/com.nokia.carbide.bugreport/src/com/nokia/carbide/internal/bugreport/ui/wizards/BugDescriptionPage.java Thu Dec 10 14:53:07 2009 -0600
@@ -40,6 +40,7 @@
import com.nokia.carbide.internal.bugreport.model.*;
import com.nokia.carbide.internal.bugreport.resources.HelpContextIDs;
import com.nokia.carbide.internal.bugreport.resources.Messages;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
/**
@@ -196,6 +197,7 @@
if (event.widget == browseButton) {
FileDialog dialog = new FileDialog(this.getShell(), SWT.OPEN);
dialog.setText(Messages.getString("BugDescriptionPage.SelectAttachmentFile")); //$NON-NLS-1$
+ BrowseDialogUtils.initializeFrom(dialog, attachmentText);
String result = dialog.open();
attachmentText.setText(result);
} else if (event.widget == uiServiceLink) {
--- a/core/com.nokia.cpp.utils.ui/src/com/nokia/cpp/internal/api/utils/ui/DirectorySelectorWithHistory.java Thu Dec 10 14:51:11 2009 -0600
+++ b/core/com.nokia.cpp.utils.ui/src/com/nokia/cpp/internal/api/utils/ui/DirectorySelectorWithHistory.java Thu Dec 10 14:53:07 2009 -0600
@@ -96,11 +96,7 @@
public void widgetSelected(SelectionEvent e) {
DirectoryDialog dlg = new DirectoryDialog(parent.getShell());
- String curPath = directoryCombo.getText();
- if (curPath.length() > 0)
- dlg.setFilterPath(curPath);
- else
- dlg.setFilterPath("."); //$NON-NLS-1$
+ BrowseDialogUtils.initializeFrom(dlg, directoryCombo.getText());
String dir = dlg.open();
if (dir != null) {
directoryCombo.setText(dir);
--- a/debuggercdi/com.nokia.cdt.debug.launch/META-INF/MANIFEST.MF Thu Dec 10 14:51:11 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/META-INF/MANIFEST.MF Thu Dec 10 14:53:07 2009 -0600
@@ -27,7 +27,8 @@
com.nokia.carbide.cpp.ui,
com.nokia.cpp.utils.core,
com.freescale.cdt.debug.cw.core.ui,
- com.nokia.carbide.remoteConnections
+ com.nokia.carbide.remoteConnections,
+ com.nokia.cpp.utils.ui;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Export-Package: com.nokia.cdt.internal.debug.launch,
com.nokia.cdt.internal.debug.launch.ui,
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/AddEditFileToTransferDialog.java Thu Dec 10 14:51:11 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/AddEditFileToTransferDialog.java Thu Dec 10 14:53:07 2009 -0600
@@ -38,7 +38,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
-import com.nokia.cpp.internal.api.utils.core.HostOS;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
public class AddEditFileToTransferDialog extends StatusDialog {
@@ -107,7 +107,9 @@
dialog.setText(Messages.getString("AddEditFileToTransferDialog.4")); //$NON-NLS-1$
dialog.setFilterExtensions(new String[] {"*"}); //$NON-NLS-1$
dialog.setFilterNames(new String[] {Messages.getString("AddEditFileToTransferDialog.11")}); //$NON-NLS-1$
-
+
+ BrowseDialogUtils.initializeFrom(dialog, hostPath);
+
String result = dialog.open();
if (result != null) {
IPath path = new Path(result);
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/EmulationMainTab.java Thu Dec 10 14:51:11 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/EmulationMainTab.java Thu Dec 10 14:53:07 2009 -0600
@@ -18,6 +18,7 @@
import com.freescale.cdt.debug.cw.core.settings.DebuggerCommonData;
import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.CoreException;
@@ -128,7 +129,9 @@
hostBrowse.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent evt) {
FileDialog dialog = new FileDialog(getShell(), SWT.NONE);
-
+
+ BrowseDialogUtils.initializeFrom(dialog, hostText);
+
dialog.setText(Messages.getString("EmulationMainTab.5")); //$NON-NLS-1$
String result = dialog.open();
if (result != null && new File(result).exists()) {
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/ExecutablesTab.java Thu Dec 10 14:51:11 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/ExecutablesTab.java Thu Dec 10 14:53:07 2009 -0600
@@ -63,6 +63,7 @@
import com.nokia.cdt.debug.cw.symbian.SettingsData;
import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
import com.nokia.cdt.internal.debug.launch.NokiaAbstractLaunchDelegate;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
import cwdbg.PreferenceConstants;
@@ -162,6 +163,9 @@
public void widgetSelected(SelectionEvent e) {
FileDialog dialog = new FileDialog(getShell(), SWT.NONE);
dialog.setText(Messages.getString("ExecutablesTab.7")); //$NON-NLS-1$
+ if (executablesToTarget != null && executablesToTarget.size() > 0) {
+ BrowseDialogUtils.initializeFrom(dialog, executablesToTarget.get(executablesToTarget.size() - 1).getExePath());
+ }
final String res = dialog.open();
if (res != null) {
Job importJob = new Job(Messages.getString("ExecutablesTab.8")) { //$NON-NLS-1$
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/InstallationTab.java Thu Dec 10 14:51:11 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/InstallationTab.java Thu Dec 10 14:53:07 2009 -0600
@@ -55,6 +55,7 @@
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
import cwdbg.PreferenceConstants;
@@ -143,9 +144,8 @@
dialog.setText(Messages.getString("InstallationTab.4")); //$NON-NLS-1$
dialog.setFilterExtensions(new String[] {"*.sis*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setFilterNames(new String[] {Messages.getString("InstallationTab.27"), Messages.getString("InstallationTab.28")}); //$NON-NLS-1$ //$NON-NLS-2$
-
- dialog.setFilterPath(new File(hostPath.getText()).getParent());
- dialog.setFileName(new File(hostPath.getText()).getName());
+
+ BrowseDialogUtils.initializeFrom(dialog, hostPath);
String result = dialog.open();
if (result != null && new File(result).exists()) {
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RomImageTab.java Thu Dec 10 14:51:11 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RomImageTab.java Thu Dec 10 14:53:07 2009 -0600
@@ -40,6 +40,7 @@
import org.eclipse.ui.PlatformUI;
import com.freescale.swt.widgets.CheckboxGroup;
import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
import cwdbg.PreferenceConstants;
@@ -138,7 +139,9 @@
dialog.setText(Messages.getString("RomImageTab.14")); //$NON-NLS-1$
dialog.setFilterExtensions(new String[] {"*.img*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setFilterNames(new String[] {Messages.getString("RomImageTab.15"), Messages.getString("RomImageTab.16")}); //$NON-NLS-1$ //$NON-NLS-2$
-
+
+ BrowseDialogUtils.initializeFrom(dialog, osImagePath);
+
String result = dialog.open();
if (result != null && new File(result).exists()) {
osImagePath.setText(result);
@@ -232,7 +235,9 @@
dialog.setText(Messages.getString("RomLogFileTab.6")); //$NON-NLS-1$
dialog.setFilterExtensions(new String[] {"*.log*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setFilterNames(new String[] {Messages.getString("RomLogFileTab.7"), Messages.getString("RomLogFileTab.8")}); //$NON-NLS-1$ //$NON-NLS-2$
-
+
+ BrowseDialogUtils.initializeFrom(dialog, romLogFilePath);
+
String result = dialog.open();
if (result != null && new File(result).exists()) {
romLogFilePath.setText(result);
@@ -263,6 +268,7 @@
public void widgetSelected(SelectionEvent evt) {
DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE);
+ BrowseDialogUtils.initializeFrom(dialog, epoc32DirPath);
dialog.setText(Messages.getString("RomLogFileTab.11")); //$NON-NLS-1$
String result = dialog.open();
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RomLogFileTab.java Thu Dec 10 14:51:11 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RomLogFileTab.java Thu Dec 10 14:53:07 2009 -0600
@@ -40,6 +40,7 @@
import org.eclipse.ui.PlatformUI;
import com.freescale.swt.widgets.CheckboxGroup;
import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
import cwdbg.PreferenceConstants;
@@ -138,6 +139,8 @@
dialog.setFilterExtensions(new String[] {"*.log*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setFilterNames(new String[] {Messages.getString("RomLogFileTab.7"), Messages.getString("RomLogFileTab.8")}); //$NON-NLS-1$ //$NON-NLS-2$
+ BrowseDialogUtils.initializeFrom(dialog, romLogFilePath);
+
String result = dialog.open();
if (result != null && new File(result).exists()) {
romLogFilePath.setText(result);
@@ -171,6 +174,7 @@
public void widgetSelected(SelectionEvent evt) {
DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE);
+ BrowseDialogUtils.initializeFrom(dialog, epoc32DirPath);
dialog.setText(Messages.getString("RomLogFileTab.11")); //$NON-NLS-1$
String result = dialog.open();
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/MainExecutableSelectionWizardPage.java Thu Dec 10 14:51:11 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/MainExecutableSelectionWizardPage.java Thu Dec 10 14:53:07 2009 -0600
@@ -17,6 +17,7 @@
package com.nokia.cdt.internal.debug.launch.wizard;
import com.nokia.cpp.internal.api.utils.core.*;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -237,7 +238,7 @@
if (item.equals(BROWSE_ITEM)) {
FileDialog fileDialog = new FileDialog(getShell(), SWT.OPEN);
fileDialog.setText(Messages.getString("MainExecutableSelectionWizardPage.SelectExectuableTitle")); //$NON-NLS-1$
- fileDialog.setFilterPath(emulatorPath.removeLastSegments(1).toOSString());
+ BrowseDialogUtils.initializeFrom(fileDialog, emulatorPath);
fileDialog.setFilterExtensions(FILTER_EXTS);
fileDialog.setFilterNames(FILTER_EXT_NAMES);
String pathstr = fileDialog.open();
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/SophiaWizardPage.java Thu Dec 10 14:51:11 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/SophiaWizardPage.java Thu Dec 10 14:53:07 2009 -0600
@@ -38,6 +38,7 @@
import com.nokia.cdt.debug.cw.symbian.SettingsData;
import com.nokia.cpp.internal.api.utils.core.Check;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
import cwdbg.PreferenceConstants;
@@ -113,6 +114,8 @@
dialog.setFilterExtensions(new String[] {"*.dll*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setFilterNames(new String[] {Messages.getString("SophiaWizardPage.5"), Messages.getString("SophiaWizardPage.6")}); //$NON-NLS-1$ //$NON-NLS-2$
+ BrowseDialogUtils.initializeFrom(dialog, sophiaSTIDLLPath);
+
String result = dialog.open();
if (result != null && new File(result).exists()) {
sophiaSTIDLLPath.setText(result);
@@ -145,6 +148,8 @@
dialog.setFilterExtensions(new String[] {"*.cfg*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setFilterNames(new String[] {Messages.getString("SophiaWizardPage.10"), Messages.getString("SophiaWizardPage.6")}); //$NON-NLS-1$ //$NON-NLS-2$
+ BrowseDialogUtils.initializeFrom(dialog, targetInitFilePath);
+
String result = dialog.open();
if (result != null && new File(result).exists()) {
targetInitFilePath.setText(result);
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/StopModeRomImageWizardPage.java Thu Dec 10 14:51:11 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/StopModeRomImageWizardPage.java Thu Dec 10 14:53:07 2009 -0600
@@ -17,6 +17,7 @@
package com.nokia.cdt.internal.debug.launch.wizard;
import com.nokia.cpp.internal.api.utils.core.Check;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
import cwdbg.PreferenceConstants;
@@ -167,6 +168,8 @@
dialog.setFilterExtensions(new String[] {"*.img*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setFilterNames(new String[] {Messages.getString("StopModeRomImageWizardPage.14"), Messages.getString("StopModeRomImageWizardPage.10")}); //$NON-NLS-1$ //$NON-NLS-2$
+ BrowseDialogUtils.initializeFrom(dialog, romImagePath);
+
String result = dialog.open();
if (result != null && new File(result).exists()) {
romImagePath.setText(result);
@@ -199,6 +202,8 @@
dialog.setFilterExtensions(new String[] {"*.log*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setFilterNames(new String[] {Messages.getString("StopModeRomImageWizardPage.9"), Messages.getString("StopModeRomImageWizardPage.10")}); //$NON-NLS-1$ //$NON-NLS-2$
+ BrowseDialogUtils.initializeFrom(dialog, romLogFilePath);
+
String result = dialog.open();
if (result != null && new File(result).exists()) {
romLogFilePath.setText(result);
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/TRKSISSelectionWizardPage.java Thu Dec 10 14:51:11 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/TRKSISSelectionWizardPage.java Thu Dec 10 14:53:07 2009 -0600
@@ -19,6 +19,7 @@
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cdt.builder.project.*;
import com.nokia.cpp.internal.api.utils.core.Check;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
import cwdbg.PreferenceConstants;
@@ -158,6 +159,8 @@
dialog.setFilterExtensions(new String[] {"*.sis*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setFilterNames(new String[] {Messages.getString("TRKSISSelectionWizardPage.7"), Messages.getString("TRKSISSelectionWizardPage.8")}); //$NON-NLS-1$ //$NON-NLS-2$
+ BrowseDialogUtils.initializeFrom(dialog, sisEdit);
+
String result = dialog.open();
if (result != null && new File(result).exists()) {
sisEdit.setText(result);
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/Trace32WizardPage.java Thu Dec 10 14:51:11 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/Trace32WizardPage.java Thu Dec 10 14:53:07 2009 -0600
@@ -38,6 +38,7 @@
import com.nokia.cdt.debug.cw.symbian.SettingsData;
import com.nokia.cpp.internal.api.utils.core.Check;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
import cwdbg.PreferenceConstants;
@@ -107,6 +108,8 @@
dialog.setFilterExtensions(new String[] {"*.cmm*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setFilterNames(new String[] {Messages.getString("Trace32WizardPage.5"), Messages.getString("Trace32WizardPage.6")}); //$NON-NLS-1$ //$NON-NLS-2$
+ BrowseDialogUtils.initializeFrom(dialog, t32BootConfigFilePath);
+
String result = dialog.open();
if (result != null && new File(result).exists()) {
t32BootConfigFilePath.setText(result);
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/ProjectPropertiesPage.java Thu Dec 10 14:51:11 2009 -0600
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/ProjectPropertiesPage.java Thu Dec 10 14:53:07 2009 -0600
@@ -46,6 +46,7 @@
import com.nokia.carbide.cdt.builder.EpocEngineHelper;
import com.nokia.carbide.cpp.internal.project.ui.ProjectUIHelpIds;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
public class ProjectPropertiesPage extends WizardPage implements Listener {
@@ -167,8 +168,7 @@
private String showBrowseDialog() {
DirectoryDialog dialog = new DirectoryDialog(rootDirectory.getShell(), SWT.OPEN);
dialog.setText(Messages.ProjectPropertiesPage_browseDialogTitle);
-
- dialog.setFilterPath(rootDirectory.getText());
+ BrowseDialogUtils.initializeFrom(dialog, rootDirectory);
return dialog.open();
}
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/dialogs/ChooseDirectoryComposite.java Thu Dec 10 14:51:11 2009 -0600
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/dialogs/ChooseDirectoryComposite.java Thu Dec 10 14:53:07 2009 -0600
@@ -20,6 +20,7 @@
import com.nokia.carbide.cdt.builder.MMPViewPathHelper;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cpp.internal.project.ui.ProjectUIPlugin;
+import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
@@ -157,6 +158,17 @@
private void doBrowse() {
DirectoryDialog dialog = new DirectoryDialog(getShell());
dialog.setMessage(Messages.getString("IncludeDirectoryDialog.browseForDirectoryPrompt")); //$NON-NLS-1$
+
+ IPath currentPath = new Path(pathViewer.getCombo().getText());
+ if (!currentPath.isEmpty()) {
+ currentPath = pathHelper.convertMMPToFilesystem(pathContext, currentPath);
+ } else if (pathContext == EMMPPathContext.SYSTEMINCLUDE
+ || pathContext == EMMPPathContext.SYSTEMRESOURCE
+ || pathContext == EMMPPathContext.TARGETPATH) {
+ currentPath = new Path(buildConfiguration.getSDK().getEPOCROOT());
+ }
+ BrowseDialogUtils.initializeFrom(dialog, currentPath);
+
String fullPath = dialog.open();
if (fullPath != null) {
setViewerPath(new Path(fullPath));