Bug 527187 - JDT Debug should use SWT.SHEET with File and Directory
Dialog
Change-Id: Ibcbd769ca015ec67931b11ef1b58dfd7cf6a30e6
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddExternalFolderAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddExternalFolderAction.java
index 7208dec..874e1e5 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddExternalFolderAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddExternalFolderAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -41,7 +41,7 @@
if (lastUsedPath == null) {
lastUsedPath= ""; //$NON-NLS-1$
}
- DirectoryDialog dialog= new DirectoryDialog(getShell(), SWT.MULTI);
+ DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.MULTI | SWT.SHEET);
dialog.setText(ActionMessages.AddExternalFolderAction_Folder_Selection_3);
dialog.setFilterPath(lastUsedPath);
String res= dialog.open();
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddExternalJarAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddExternalJarAction.java
index 5a5b764..2892c33 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddExternalJarAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddExternalJarAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -45,7 +45,7 @@
if (lastUsedPath == null) {
lastUsedPath = ""; //$NON-NLS-1$
}
- FileDialog dialog = new FileDialog(getShell(), SWT.MULTI);
+ FileDialog dialog = new FileDialog(getShell(), SWT.MULTI | SWT.SHEET);
dialog.setText(ActionMessages.AddExternalJar_Jar_Selection_3);
dialog.setFilterExtensions(new String[] {"*.jar;*.zip","*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setFilterPath(lastUsedPath);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/EEVMPage.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/EEVMPage.java
index 5b47db7..5637d15 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/EEVMPage.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/EEVMPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2018 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
@@ -146,7 +146,7 @@
public void widgetDefaultSelected(SelectionEvent e) {}
@Override
public void widgetSelected(SelectionEvent e) {
- FileDialog dialog = new FileDialog(getShell());
+ FileDialog dialog = new FileDialog(getShell(), SWT.SHEET);
dialog.setFilterExtensions(new String[]{"*.ee"}); //$NON-NLS-1$
File file = getDefinitionFile();
String text = fEEFile.getText();
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java
index afad9ef..c67cdc3 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -845,7 +845,7 @@
*/
protected void search() {
// choose a root directory for the search
- DirectoryDialog dialog = new DirectoryDialog(getShell());
+ DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.SHEET);
dialog.setMessage(JREMessages.InstalledJREsBlock_9);
dialog.setText(JREMessages.InstalledJREsBlock_10);
String path = dialog.open();
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/StandardVMPage.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/StandardVMPage.java
index d90b00c..7b926e4 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/StandardVMPage.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/StandardVMPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2018 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
@@ -138,7 +138,7 @@
public void widgetDefaultSelected(SelectionEvent e) {}
@Override
public void widgetSelected(SelectionEvent e) {
- DirectoryDialog dialog = new DirectoryDialog(getShell());
+ DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.SHEET);
File file = new File(fJRERoot.getText());
String text = fJRERoot.getText();
if (file.isFile()) {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMLibraryBlock.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMLibraryBlock.java
index e8ec412..4b4597a 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMLibraryBlock.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMLibraryBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -301,7 +301,7 @@
if (lastUsedPath == null) {
lastUsedPath= ""; //$NON-NLS-1$
}
- FileDialog dialog= new FileDialog(fLibraryViewer.getControl().getShell(), SWT.MULTI);
+ FileDialog dialog = new FileDialog(fLibraryViewer.getControl().getShell(), SWT.MULTI | SWT.SHEET);
dialog.setText(JREMessages.VMLibraryBlock_10);
dialog.setFilterExtensions(new String[] {"*.jar;*.zip","*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setFilterPath(lastUsedPath);
diff --git a/org.eclipse.jdt.launching.ui.macosx/src/org/eclipse/jdt/internal/ui/macbundler/BundleWizardPage1.java b/org.eclipse.jdt.launching.ui.macosx/src/org/eclipse/jdt/internal/ui/macbundler/BundleWizardPage1.java
index c8eb6ce..4e24d01 100644
--- a/org.eclipse.jdt.launching.ui.macosx/src/org/eclipse/jdt/internal/ui/macbundler/BundleWizardPage1.java
+++ b/org.eclipse.jdt.launching.ui.macosx/src/org/eclipse/jdt/internal/ui/macbundler/BundleWizardPage1.java
@@ -118,7 +118,7 @@
browse.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- DirectoryDialog dd = new DirectoryDialog(browse.getShell(), SWT.SAVE);
+ DirectoryDialog dd = new DirectoryDialog(browse.getShell(), SWT.SAVE | SWT.SHEET);
dd.setMessage(Util.getString("page1.appFolder.browseDialog.message")); //$NON-NLS-1$
dd.setText(Util.getString("page1.appFolder.browseDialog.title")); //$NON-NLS-1$
String name = dd.open();
@@ -152,7 +152,7 @@
b.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- FileDialog fd = new FileDialog(b.getShell(), SWT.OPEN);
+ FileDialog fd = new FileDialog(b.getShell(), SWT.OPEN | SWT.SHEET);
fd.setText(Util.getString("page1.appIcon.chooseDialog.title")); //$NON-NLS-1$
fd.setFilterExtensions(new String[] { "icns" }); //$NON-NLS-1$
String name = fd.open();
diff --git a/org.eclipse.jdt.launching.ui.macosx/src/org/eclipse/jdt/internal/ui/macbundler/BundleWizardPage2.java b/org.eclipse.jdt.launching.ui.macosx/src/org/eclipse/jdt/internal/ui/macbundler/BundleWizardPage2.java
index eae7c7f..dd03bf4 100644
--- a/org.eclipse.jdt.launching.ui.macosx/src/org/eclipse/jdt/internal/ui/macbundler/BundleWizardPage2.java
+++ b/org.eclipse.jdt.launching.ui.macosx/src/org/eclipse/jdt/internal/ui/macbundler/BundleWizardPage2.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -56,7 +56,7 @@
addButton1.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- FileDialog fd= new FileDialog(addButton1.getShell(), SWT.OPEN);
+ FileDialog fd = new FileDialog(addButton1.getShell(), SWT.OPEN | SWT.SHEET);
fd.setText(Util.getString("page2.chooseFileDialog.title")); //$NON-NLS-1$
String path= fd.open();
if (path != null) {
@@ -70,7 +70,7 @@
addButton2.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- DirectoryDialog fd= new DirectoryDialog(addButton2.getShell(), SWT.OPEN);
+ DirectoryDialog fd = new DirectoryDialog(addButton2.getShell(), SWT.OPEN | SWT.SHEET);
fd.setText(Util.getString("page2.chooseFolder.dialog.title")); //$NON-NLS-1$
String path= fd.open();
if (path != null) {