Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2019-06-18 06:11:53 -0400
committerLakshmi Shanmugam2019-06-18 07:16:55 -0400
commit47276e7681ad612719fc947fb2ec0fb2cecd3690 (patch)
tree81f46b8430fe338e3ea73ea0c3a1c64a0557f28e /bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse
parenteebc5e7cbb549ba580cb7b91ce8443dde9c056dc (diff)
downloadeclipse.platform.swt-47276e7681ad612719fc947fb2ec0fb2cecd3690.tar.gz
eclipse.platform.swt-47276e7681ad612719fc947fb2ec0fb2cecd3690.tar.xz
eclipse.platform.swt-47276e7681ad612719fc947fb2ec0fb2cecd3690.zip
Bug 548378: [Mac]Replace deprecated method used FileDialog
Replace panel:shouldShowFilename: which has been deprecated in Mac 10.6. with NSOpenSavePanelDelegate.panel:shouldEnableURL: Change-Id: If2eba8a2b1bba959cda18a7ac56be5405d1ddfca
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTOpenSavePanelDelegate.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Selector.java2
4 files changed, 36 insertions, 9 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
index f970f78fe4..7b9dae576e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
@@ -5311,6 +5311,13 @@
<retval></retval>
</method>
</informal_protocol>
+ <informal_protocol name="NSOpenSavePanelDelegate" swt_gen="mixed">
+ <method selector="panel:shouldEnableURL:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
+ </informal_protocol>
<informal_protocol name="NSOutlineViewDataSource" swt_gen="mixed">
<method selector="outlineView:acceptDrop:item:childIndex:" swt_gen="true">
<arg swt_gen="true"></arg>
@@ -5410,12 +5417,6 @@
<retval></retval>
</method>
</informal_protocol>
- <informal_protocol name="NSSavePanelDelegate" swt_gen="mixed">
- <method selector="panel:shouldShowFilename:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <arg swt_gen="true"></arg>
- </method>
- </informal_protocol>
<informal_protocol name="NSTabViewDelegate" swt_gen="mixed">
<method selector="tabView:didSelectTabViewItem:" swt_gen="true">
<arg swt_gen="true"></arg>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
index ef08209ae4..65ecd5c95e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
@@ -942,11 +942,11 @@ public static final long protocol_NSFontManagerResponderMethod = objc_getProtoco
public static final long protocol_NSFontPanelValidationAdditions = objc_getProtocol("NSFontPanelValidationAdditions");
public static final long protocol_NSMenuDelegate = objc_getProtocol("NSMenuDelegate");
public static final long protocol_NSMenuValidation = objc_getProtocol("NSMenuValidation");
+public static final long protocol_NSOpenSavePanelDelegate = objc_getProtocol("NSOpenSavePanelDelegate");
public static final long protocol_NSOutlineViewDataSource = objc_getProtocol("NSOutlineViewDataSource");
public static final long protocol_NSOutlineViewDelegate = objc_getProtocol("NSOutlineViewDelegate");
public static final long protocol_NSOutlineViewNotifications = objc_getProtocol("NSOutlineViewNotifications");
public static final long protocol_NSPasteboardOwner = objc_getProtocol("NSPasteboardOwner");
-public static final long protocol_NSSavePanelDelegate = objc_getProtocol("NSSavePanelDelegate");
public static final long protocol_NSTabViewDelegate = objc_getProtocol("NSTabViewDelegate");
public static final long protocol_NSTableDataSource = objc_getProtocol("NSTableDataSource");
public static final long protocol_NSTableViewDelegate = objc_getProtocol("NSTableViewDelegate");
@@ -1713,7 +1713,7 @@ public static final long sel_owner = Selector.sel_owner.value;
public static final long sel_pageDown_ = Selector.sel_pageDown_.value;
public static final long sel_pageTitle = Selector.sel_pageTitle.value;
public static final long sel_pageUp_ = Selector.sel_pageUp_.value;
-public static final long sel_panel_shouldShowFilename_ = Selector.sel_panel_shouldShowFilename_.value;
+public static final long sel_panel_shouldEnableURL_ = Selector.sel_panel_shouldEnableURL_.value;
public static final long sel_panelConvertFont_ = Selector.sel_panelConvertFont_.value;
public static final long sel_paperSize = Selector.sel_paperSize.value;
public static final long sel_paragraphs = Selector.sel_paragraphs.value;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTOpenSavePanelDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTOpenSavePanelDelegate.java
new file mode 100644
index 0000000000..989367d431
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTOpenSavePanelDelegate.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2019 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.cocoa;
+
+public class SWTOpenSavePanelDelegate extends NSObject {
+
+public SWTOpenSavePanelDelegate() {
+ super(0);
+}
+
+public SWTOpenSavePanelDelegate(long id) {
+ super(id);
+}
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Selector.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Selector.java
index 6045f563fc..f4ab9558ca 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Selector.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Selector.java
@@ -824,7 +824,7 @@ public enum Selector {
, sel_pageDown_("pageDown:")
, sel_pageTitle("pageTitle")
, sel_pageUp_("pageUp:")
- , sel_panel_shouldShowFilename_("panel:shouldShowFilename:")
+ , sel_panel_shouldEnableURL_("panel:shouldEnableURL:")
, sel_panelConvertFont_("panelConvertFont:")
, sel_paperSize("paperSize")
, sel_paragraphs("paragraphs")

Back to the top