Bug 527186 - Platform Ant should use SWT.SHEET with File and Directory
Dialog

Change-Id: Iadd219a04184c6b3585d6b75c3759147c6f1a9a0
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/AntNewJavaProjectPage.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/AntNewJavaProjectPage.java
index 2d4ef73..630b0cc 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/AntNewJavaProjectPage.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/AntNewJavaProjectPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -281,8 +281,8 @@
 	private void handleBrowseButtonPressed() {
 
 		String lastUsedPath = IAntCoreConstants.EMPTY_STRING;
-		FileDialog dialog = new FileDialog(getShell(), SWT.SINGLE);
-		dialog.setFilterExtensions(new String[] { "*.xml" }); //$NON-NLS-1$;
+		FileDialog dialog = new FileDialog(getShell(), SWT.SINGLE | SWT.SHEET);
+		dialog.setFilterExtensions(new String[] { "*.xml" }); //$NON-NLS-1$ ;
 		dialog.setFilterPath(lastUsedPath);
 
 		String result = dialog.open();
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/EditAntHomeEntryAction.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/EditAntHomeEntryAction.java
index e8088c1..bbefd7a 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/EditAntHomeEntryAction.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/EditAntHomeEntryAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@
 import org.eclipse.jdt.launching.IRuntimeClasspathEntry2;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.DirectoryDialog;
 
 /**
@@ -58,7 +59,7 @@
 		if (lastUsedPath == null) {
 			lastUsedPath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
 		}
-		DirectoryDialog dialog = new DirectoryDialog(getShell());
+		DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.SHEET);
 		dialog.setMessage(AntPreferencesMessages.AntClasspathBlock_3);
 		dialog.setFilterPath(lastUsedPath);
 		String path = dialog.open();
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java
index 688df97..ccdb33b 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -215,13 +215,13 @@
 		if (lastUsedPath == null) {
 			lastUsedPath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
 		}
-		DirectoryDialog dialog = new DirectoryDialog(treeViewer.getControl().getShell());
+		DirectoryDialog dialog = new DirectoryDialog(treeViewer.getControl().getShell(), SWT.SHEET);
 		dialog.setMessage(AntPreferencesMessages.AntClasspathBlock_1);
 		dialog.setFilterPath(lastUsedPath);
 		String result = dialog.open();
 		if (result != null) {
 			try {
-				URL url = new URL(IAntCoreConstants.FILE_PROTOCOL + result + "/"); //$NON-NLS-1$;
+				URL url = new URL(IAntCoreConstants.FILE_PROTOCOL + result + "/"); //$NON-NLS-1$ ;
 				((AntClasspathContentProvider) treeViewer.getContentProvider()).add(currentParent, url);
 			}
 			catch (MalformedURLException e) {
@@ -238,7 +238,7 @@
 		if (lastUsedPath == null) {
 			lastUsedPath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
 		}
-		FileDialog dialog = new FileDialog(treeViewer.getControl().getShell(), SWT.MULTI);
+		FileDialog dialog = new FileDialog(treeViewer.getControl().getShell(), SWT.MULTI | SWT.SHEET);
 		dialog.setFilterExtensions(new String[] { "*.jar;*.zip" }); //$NON-NLS-1$
 		dialog.setFilterPath(lastUsedPath);
 
@@ -473,7 +473,7 @@
 		if (lastUsedPath == null) {
 			lastUsedPath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
 		}
-		DirectoryDialog dialog = new DirectoryDialog(treeViewer.getControl().getShell());
+		DirectoryDialog dialog = new DirectoryDialog(treeViewer.getControl().getShell(), SWT.SHEET);
 		dialog.setMessage(AntPreferencesMessages.AntClasspathBlock_3);
 		dialog.setFilterPath(lastUsedPath);
 		String path = dialog.open();
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java
index dad0e14..b641741 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -101,8 +101,8 @@
 	private final String[] fTableColumnHeaders = { AntPreferencesMessages.AntPropertiesBlock_0, AntPreferencesMessages.AntPropertiesBlock_5,
 			AntPreferencesMessages.AntPropertiesBlock_6 };
 
-	private final ColumnLayoutData[] fTableColumnLayouts = { new ColumnWeightData(30),// , 190, true),
-			new ColumnWeightData(40),// , 190, true),
+	private final ColumnLayoutData[] fTableColumnLayouts = { new ColumnWeightData(30), // , 190, true),
+			new ColumnWeightData(40), // , 190, true),
 			new ColumnWeightData(30) // , 190, true)
 	};
 
@@ -417,8 +417,8 @@
 		if (lastUsedPath == null) {
 			lastUsedPath = IAntCoreConstants.EMPTY_STRING;
 		}
-		FileDialog dialog = new FileDialog(fileTableViewer.getControl().getShell(), SWT.MULTI);
-		dialog.setFilterExtensions(new String[] { "*.properties", "*.*" }); //$NON-NLS-1$ //$NON-NLS-2$;
+		FileDialog dialog = new FileDialog(fileTableViewer.getControl().getShell(), SWT.MULTI | SWT.SHEET);
+		dialog.setFilterExtensions(new String[] { "*.properties", "*.*" }); //$NON-NLS-1$ //$NON-NLS-2$ ;
 		dialog.setFilterPath(lastUsedPath);
 
 		String result = dialog.open();
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/URLFieldEditor.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/URLFieldEditor.java
index 2f0971d..6921053 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/URLFieldEditor.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/URLFieldEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -94,7 +94,7 @@
 	 */
 	private File getDirectory(File startingDirectory) {
 
-		DirectoryDialog fileDialog = new DirectoryDialog(getShell(), SWT.OPEN);
+		DirectoryDialog fileDialog = new DirectoryDialog(getShell(), SWT.OPEN | SWT.SHEET);
 		if (startingDirectory != null) {
 			fileDialog.setFilterPath(startingDirectory.getPath());
 		}