Merge commit
authorEd Swartz <ed.swartz@nokia.com>
Thu, 10 Dec 2009 14:56:18 -0600
changeset 675 9a3f563fb474
parent 674 20c7966a3405 (diff)
parent 670 7305e0342ce0 (current diff)
child 676 7a49747f237a
Merge commit
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java	Thu Dec 10 13:44:05 2009 -0600
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java	Thu Dec 10 14:56:18 2009 -0600
@@ -35,6 +35,8 @@
 import org.eclipse.cdt.core.CCorePlugin;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.InstanceScope;
 
 import java.io.*;
 import java.util.*;
@@ -892,7 +894,7 @@
 	 * @param targetPath full path to device-side .rsc directory
 	 */
 	private static void addResourceLanguageTargets(Map<String, String> resources, IMMPData data, IMMPResource resource, 
-			String baseGeneratedPath, String targetPath) {
+			IPath baseGeneratedPath, IPath targetPath) {
 		List<EMMPLanguage> languages = null;
 		// block resource can override languages (entirely)
 		if (resource != null) {
@@ -909,7 +911,8 @@
 		}
 		for (EMMPLanguage language : languages) {
 			String extension = ".R" + language.getCodeString(); //$NON-NLS-1$
-			resources.put(HostOS.convertPathToNative(baseGeneratedPath + extension), HostOS.convertPathToWindows(targetPath));
+			resources.put(baseGeneratedPath.toOSString() + extension.toLowerCase(), 
+					HostOS.convertPathToWindows(targetPath));
 		}
 	}
 	
@@ -944,84 +947,7 @@
 								new MMPDataRunnableAdapter() {
 
 								public Object run(IMMPData mmpData) {
-									// read the project-wide target path
-									String targetPath = mmpData.getSingleArgumentSettings().get(EMMPStatement.TARGETPATH);
-									if (targetPath != null) {
-										// make sure it doesn't start with a "\" but ends with one
-										IPath targetP = new Path(targetPath).makeRelative().addTrailingSeparator();
-										targetPath = targetP.toOSString();
-									} else {
-										// for EKA1 just leave empty.  for EKA2 use sys\bin\
-										if (buildConfig.getSDK().getOSVersion().getMajor() > 8) {
-											targetPath = "sys/bin/"; //$NON-NLS-1$
-										} else {
-											targetPath = ""; //$NON-NLS-1$
-										}
-									}
-
-									String dataZDir = buildConfig.getSDK().getReleaseRoot().removeLastSegments(1).toPortableString() + "/data/z/"; //$NON-NLS-1$
-									// get the aifs
-									List<IMMPAIFInfo> aifs = mmpData.getAifs();
-									for (IMMPAIFInfo aif : aifs) {
-										IPath aifPath = aif.getTarget().makeAbsolute();
-										resources.put(HostOS.convertPathToNative(dataZDir + targetPath + aifPath.lastSegment().toLowerCase()), 
-												HostOS.convertPathToWindows("C:\\" + targetPath)); //$NON-NLS-1$
-									}
-
-									// get the bitmaps
-									List<IMMPBitmap> bmps = mmpData.getBitmaps();
-									for (IMMPBitmap bmp : bmps) {
-										IPath mbmPath = bmp.getTargetFilePath().makeRelative();
-										resources.put(HostOS.convertPathToNative(dataZDir + mbmPath.toOSString().toLowerCase()), 
-												HostOS.convertPathToWindows("C:\\" + mbmPath.removeLastSegments(1).addTrailingSeparator().toOSString())); //$NON-NLS-1$
-									}
-
-									// get the user resources
-									List<IPath> userResources = mmpData.getUserResources();
-									for (IPath userRes : userResources) {
-										addResourceLanguageTargets(resources, mmpData, null, 
-												HostOS.convertPathToNative(dataZDir + targetPath + userRes.removeFileExtension().lastSegment().toLowerCase()), 
-												HostOS.convertPathToWindows("C:\\" + targetPath)); //$NON-NLS-1$
-									}
-
-									// get the system resources
-									List<IPath> systemResources = mmpData.getSystemResources();
-									for (IPath systemRes : systemResources) {
-										addResourceLanguageTargets(resources, mmpData, null,
-												HostOS.convertPathToNative(dataZDir + targetPath + systemRes.removeFileExtension().lastSegment().toLowerCase()), 
-												HostOS.convertPathToWindows("C:\\" + targetPath)); //$NON-NLS-1$
-									}
-
-									// get the resource blocks
-									List<IMMPResource> resourceBlocks = mmpData.getResourceBlocks();
-									for (IMMPResource resourceBlock : resourceBlocks) {
-										IPath resPath = resourceBlock.getTargetPath();
-										if (resPath == null) {
-											// if not specified in the resource block then get the global
-											// target path
-											String targetP = mmpData.getSingleArgumentSettings().get(EMMPStatement.TARGETPATH);
-											if (targetP != null) {
-												resPath = new Path(targetP);
-											}
-										}
-										if (resPath != null) {
-											resPath = resPath.makeRelative().addTrailingSeparator();
-											String filename = resourceBlock.getTargetFile();
-											if (filename == null) {
-												filename = resourceBlock.getSource().removeFileExtension().lastSegment().toLowerCase();
-											} else {
-												filename = HostOS.createPathFromString(filename).removeFileExtension().toPortableString().toLowerCase();
-											}
-											// adjust the path if necessary as it's different on the phone for the *_.reg file
-											IPath adjustedTargetPath = resPath;
-											if (adjustedTargetPath.toPortableString().equalsIgnoreCase("private/10003a3f/apps/")) { //$NON-NLS-1$
-												adjustedTargetPath = new Path("private/10003a3f/import/apps/"); //$NON-NLS-1$
-											}
-											addResourceLanguageTargets(resources, mmpData, resourceBlock,
-													HostOS.convertPathToNative(dataZDir + resPath.toOSString() + filename), 
-													HostOS.convertPathToWindows("C:\\" + HostOS.convertPathToWindows(adjustedTargetPath))); //$NON-NLS-1$
-										}
-									}
+									gatherMMPResourceMappings(buildConfig, resources, mmpData);
 									return null;
 								}
 						});
@@ -1048,103 +974,7 @@
 				new MMPDataRunnableAdapter() {
 
 				public Object run(IMMPData mmpData) {
-					// read the project-wide target path
-					String targetPath = mmpData.getSingleArgumentSettings().get(EMMPStatement.TARGETPATH);
-					if (targetPath != null) {
-						// make sure it doesn't start with a "\" but ends with one
-						IPath targetP = new Path(targetPath).makeRelative().addTrailingSeparator();
-						targetPath = targetP.toOSString();
-					} else {
-						// for EKA1 just leave empty.  for EKA2 use sys\bin\
-						if (buildConfig.getSDK().getOSVersion().getMajor() > 8) {
-							targetPath = "sys\\bin\\"; //$NON-NLS-1$
-						} else {
-							targetPath = ""; //$NON-NLS-1$
-						}
-					}
-
-					String dataZDir = buildConfig.getSDK().getReleaseRoot().removeLastSegments(1).toPortableString() + "/data/z/"; //$NON-NLS-1$
-					
-					// get the aifs
-					List<IMMPAIFInfo> aifs = mmpData.getAifs();
-					for (IMMPAIFInfo aif : aifs) {
-						IPath aifPath = aif.getTarget().makeAbsolute();
-						resources.put(HostOS.convertPathToNative(dataZDir + targetPath + aifPath.lastSegment()), 
-								HostOS.convertPathToWindows("C:\\" + targetPath)); //$NON-NLS-1$
-					}
-
-					// for resources and bitmaps, the target path may be based on the target type if not explicitly
-					// set for the resource or bitmap.
-					String targetType = mmpData.getSingleArgumentSettings().get(EMMPStatement.TARGETTYPE);
-					if (targetType != null) {
-						// could be PLUGIN or PLUGIN3
-						if (targetType.toUpperCase().startsWith("PLUGIN")) { //$NON-NLS-1$
-							targetPath = "resource/plugins/"; //$NON-NLS-1$
-						} else if (targetType.compareToIgnoreCase("PDL") == 0) { //$NON-NLS-1$
-							targetPath = "resource/printers/"; //$NON-NLS-1$
-						}
-					}
-
-					// get the bitmaps
-					List<IMMPBitmap> bmps = mmpData.getBitmaps();
-					for (IMMPBitmap bmp : bmps) {
-						IPath mbmPath = bmp.getTargetFilePath().makeRelative();
-						// if there's no target path then use the main target path
-						if (mbmPath.segmentCount() == 1) {
-							mbmPath = new Path(targetPath).append(mbmPath);
-						}
-						resources.put(HostOS.convertPathToNative(dataZDir + mbmPath.toOSString()), 
-								HostOS.convertPathToWindows("C:\\" + mbmPath.removeLastSegments(1).addTrailingSeparator().toOSString())); //$NON-NLS-1$
-					}
-
-					// get the user resources
-					List<IPath> userResources = mmpData.getUserResources();
-					for (IPath userRes : userResources) {
-						addResourceLanguageTargets(resources, mmpData, null, 
-								HostOS.convertPathToNative(dataZDir + targetPath + userRes.removeFileExtension().lastSegment()), 
-								HostOS.convertPathToWindows("C:\\" + targetPath)); //$NON-NLS-1$ //$NON-NLS-2$
-					}
-
-					// get the system resources
-					List<IPath> systemResources = mmpData.getSystemResources();
-					for (IPath systemRes : systemResources) {
-						addResourceLanguageTargets(resources, mmpData, null,
-								HostOS.convertPathToNative(dataZDir + targetPath + systemRes.removeFileExtension().lastSegment()), 
-								HostOS.convertPathToWindows("C:\\" + targetPath)); //$NON-NLS-1$ //$NON-NLS-2$
-					}
-
-					// get the resource blocks
-					List<IMMPResource> resourceBlocks = mmpData.getResourceBlocks();
-					for (IMMPResource resourceBlock : resourceBlocks) {
-						IPath resPath = resourceBlock.getTargetPath();
-						if (resPath == null) {
-							// not specified in the resource block so use existing
-							resPath = new Path(targetPath);
-						}
-
-						String filename = resourceBlock.getTargetFile();
-						if (filename == null) {
-							filename = resourceBlock.getSource().removeFileExtension().lastSegment();
-						} else {
-							filename = HostOS.createPathFromString(filename).removeFileExtension().toOSString();
-						}
-						
-						if (resPath != null) {
-							resPath = resPath.makeRelative().addTrailingSeparator();
-							// adjust the path if necessary as it's different on the phone for the *_.reg file
-							IPath adjustedTargetPath = resPath;
-							if ((adjustedTargetPath.toPortableString()).equalsIgnoreCase("private/10003a3f/apps/")) { //$NON-NLS-1$
-								adjustedTargetPath = new Path("private/10003a3f/import/apps/"); //$NON-NLS-1$
-							}
-							addResourceLanguageTargets(resources, mmpData, resourceBlock,
-									HostOS.convertPathToNative(dataZDir + resPath.toOSString() + filename), 
-									HostOS.convertPathToWindows("C:\\" + adjustedTargetPath)); //$NON-NLS-1$
-						} else {
-							CarbideBuilderPlugin.log(Logging.newStatus(CarbideBuilderPlugin.getDefault(), 
-									IStatus.WARNING,
-									"No TARGETPATH specified for resource " + filename + ".  Skipping..."));
-						}
-					}
+					gatherMMPResourceMappings(buildConfig, resources, mmpData);
 					return null;
 				}
 		});
@@ -1152,6 +982,114 @@
 		return resources;
 	}
 	
+	private static void gatherMMPResourceMappings(
+			final ICarbideBuildConfiguration buildConfig,
+			final HashMap<String, String> resources, IMMPData mmpData) {
+		// read the project-wide target path
+		String targetPathStr = mmpData.getSingleArgumentSettings().get(EMMPStatement.TARGETPATH);
+		
+		// the target path, should always be absolute and deviceless
+		IPath targetPath;
+		
+		if (targetPathStr != null) {
+			targetPath = new Path(targetPathStr).makeAbsolute();
+		} else {
+			// for EKA1 just leave empty.  for EKA2 use sys\bin\
+			if (buildConfig.getSDK().getOSVersion().getMajor() > 8) {
+				targetPath = new Path("/sys/bin/"); //$NON-NLS-1$
+			} else {
+				targetPath = Path.ROOT; //$NON-NLS-1$
+			}
+		}
+	
+		IPath dataZDir = buildConfig.getSDK().getReleaseRoot().removeLastSegments(1).append("/data/z/"); //$NON-NLS-1$
+		
+		// get the aifs
+		List<IMMPAIFInfo> aifs = mmpData.getAifs();
+		for (IMMPAIFInfo aif : aifs) {
+			IPath aifPath = aif.getTarget().makeAbsolute();
+			resources.put(dataZDir.append(targetPath).append(aifPath.lastSegment()).toOSString(), 
+					HostOS.convertPathToWindows(targetPath.setDevice("C:"))); //$NON-NLS-1$
+		}
+	
+		///////////
+		
+		// for resources and bitmaps, the target path may be based on the target type if not explicitly
+		// set for the resource or bitmap.
+		String targetType = mmpData.getSingleArgumentSettings().get(EMMPStatement.TARGETTYPE);
+		if (targetType != null) {
+			// could be PLUGIN or PLUGIN3
+			if (targetType.toUpperCase().startsWith("PLUGIN")) { //$NON-NLS-1$
+				targetPath = new Path("/resource/plugins"); //$NON-NLS-1$
+			} else if (targetType.compareToIgnoreCase("PDL") == 0) { //$NON-NLS-1$
+				targetPath = new Path("/resource/printers"); //$NON-NLS-1$
+			}
+		}
+	
+		// get the bitmaps
+		List<IMMPBitmap> bmps = mmpData.getBitmaps();
+		for (IMMPBitmap bmp : bmps) {
+			IPath mbmPath = bmp.getTargetFilePath().makeRelative();
+			// if there's no target path then use the main target path
+			if (mbmPath.segmentCount() == 1) {
+				mbmPath = targetPath.append(mbmPath);
+			}
+			IPath mbmDir = mbmPath.removeLastSegments(1).addTrailingSeparator().setDevice("C:"); //$NON-NLS-1$
+			resources.put(dataZDir.append(mbmPath).toOSString(), 
+					HostOS.convertPathToWindows(mbmDir.toOSString()));
+		}
+	
+		// get the user resources
+		List<IPath> userResources = mmpData.getUserResources();
+		for (IPath userRes : userResources) {
+			addResourceLanguageTargets(resources, mmpData, null, 
+					dataZDir.append(targetPath).append(userRes.removeFileExtension().lastSegment().toLowerCase()), 
+					targetPath.setDevice("C:")); //$NON-NLS-1$
+		}
+	
+		// get the system resources
+		List<IPath> systemResources = mmpData.getSystemResources();
+		for (IPath systemRes : systemResources) {
+			addResourceLanguageTargets(resources, mmpData, null,
+					dataZDir.append(targetPath).append(systemRes.removeFileExtension().lastSegment().toLowerCase()), 
+					targetPath.setDevice("C:")); //$NON-NLS-1$
+		}
+	
+		// get the resource blocks
+		List<IMMPResource> resourceBlocks = mmpData.getResourceBlocks();
+		for (IMMPResource resourceBlock : resourceBlocks) {
+			IPath resPath = resourceBlock.getTargetPath();
+			if (resPath == null) {
+				// not specified in the resource block so use existing
+				resPath = targetPath;
+			}
+	
+			String filename = resourceBlock.getTargetFile();
+			if (filename == null) {
+				filename = resourceBlock.getSource().removeFileExtension().lastSegment();
+			} else {
+				filename = HostOS.createPathFromString(filename).removeFileExtension().toOSString();
+			}
+			filename = filename.toLowerCase();
+			
+			if (resPath != null) {
+				resPath = resPath.makeAbsolute().addTrailingSeparator();
+				// adjust the path if necessary as it's different on the phone for the *_.reg file
+				IPath adjustedTargetPath = resPath;
+				if ((adjustedTargetPath.toPortableString()).equalsIgnoreCase("/private/10003a3f/apps/")) { //$NON-NLS-1$
+					adjustedTargetPath = new Path("/private/10003a3f/import/apps/"); //$NON-NLS-1$
+				}
+				addResourceLanguageTargets(resources, mmpData, resourceBlock,
+						dataZDir.append(resPath).append(filename), 
+						adjustedTargetPath.setDevice("C:")); //$NON-NLS-1$
+			} else {
+				CarbideBuilderPlugin.log(Logging.newStatus(CarbideBuilderPlugin.getDefault(), 
+						IStatus.WARNING,
+						"No TARGETPATH specified for resource " + filename + ".  Skipping..."));
+			}
+		}
+	}
+
 	/**
 	 * Get a map of the generated images from image makefiles for the project. 
 	 * @param buildConfig the build configuration
@@ -1592,13 +1530,13 @@
 	
 	public static boolean getIndexAllPreference() {
 		// Can't access this pref from the project ui plugin because it would cause a circular dependency
-		Plugin plugin = Platform.getPlugin("com.nokia.carbide.cpp.project.ui"); //$NON-NLS-1$
-		if (plugin == null) {
+		IEclipsePreferences prefs = new InstanceScope().getNode("com.nokia.carbide.cpp.project.ui");
+		if (prefs == null) {
 			CarbideBuilderPlugin.log(Logging.newStatus(CarbideBuilderPlugin.getDefault(), 
 					IStatus.WARNING, "Could not find project UI plugin!"));
 			return true;
 		}
-		return plugin.getPluginPreferences().getBoolean("indexAll"); //$NON-NLS-1$
+		return prefs.getBoolean("indexAll", false); //$NON-NLS-1$
 	}
 
 	/**
@@ -2159,26 +2097,6 @@
 	}
 	
 	/**
-	 * Get the target name with a variant suffix inserted.
-	 * @param mmpData
-	 * @param target
-	 * @return updated target name
-	 * 
-	 * @deprecated Deprecated in 2.1. Use {@link #getBinaryVariantTargetName(IMMPData mmpData, IPath target, IProject project)} instead.
-	 */
-	private static IPath getVariantTargetName(IMMPData mmpData, IPath target) {
-		if (target == null)
-			return null;
-		
-		String suffix = mmpData.getSingleArgumentSettings().get(EMMPStatement.VAR);
-		if (suffix != null) {
-			target = target.removeFileExtension().addFileExtension(suffix + "." + FileUtils.getSafeFileExtension(target)); //$NON-NLS-1$
-		}
-		
-		return target;
-	}
-	
-	/**
 	 * Get the target name with a variant suffix inserted. Since 2.1 this includes support for Symbian Binary Variation builds
 	 * that have the FEATUREVARIANT keyword in their MMP file.
 	 * @param mmpData
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/AddEditSisFileToBuildDialog.java	Thu Dec 10 13:44:05 2009 -0600
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/AddEditSisFileToBuildDialog.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideMacroSettingsPage.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/ROMBuilderTabComposite.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/META-INF/MANIFEST.MF	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/wizard/ImportPage.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/core/com.nokia.carbide.bugreport/META-INF/MANIFEST.MF	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/core/com.nokia.carbide.bugreport/src/com/nokia/carbide/internal/bugreport/ui/wizards/BugDescriptionPage.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/core/com.nokia.cpp.utils.ui/src/com/nokia/cpp/internal/api/utils/ui/DirectorySelectorWithHistory.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/META-INF/MANIFEST.MF	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/AddEditFileToTransferDialog.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/EmulationMainTab.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/ExecutablesTab.java	Thu Dec 10 14:56:18 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/FileTransferTab.java	Thu Dec 10 13:44:05 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/FileTransferTab.java	Thu Dec 10 14:56:18 2009 -0600
@@ -97,7 +97,7 @@
 							tp = tp.append(hp.lastSegment());
 						}
 						String enabled = tokenizer.nextToken();
-						files.add(new FileToTransfer(hp.toOSString(), tp.toOSString(), enabled.compareTo("1") == 0)); //$NON-NLS-1$
+						files.add(new FileToTransfer(hp.toOSString(), HostOS.convertPathToWindows(tp), enabled.compareTo("1") == 0)); //$NON-NLS-1$
 					}
 				}
 			} else {
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/InstallationTab.java	Thu Dec 10 13:44:05 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/InstallationTab.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RomImageTab.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/RomLogFileTab.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/MainExecutableSelectionWizardPage.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/SophiaWizardPage.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/StopModeRomImageWizardPage.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/TRKSISSelectionWizardPage.java	Thu Dec 10 14:56:18 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 13:44:05 2009 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/Trace32WizardPage.java	Thu Dec 10 14:56:18 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 13:44:05 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:56:18 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 13:44:05 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:56:18 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));