69162
|
1 |
diff -ru MacOSX-trunk-r24891/build.properties MacOSX-trunk/build.properties
|
|
2 |
--- MacOSX-trunk-r24891/build.properties 2018-10-20 11:45:32.632681780 +0200
|
|
3 |
+++ MacOSX-trunk/build.properties 2018-10-20 13:11:21.039870008 +0200
|
|
4 |
@@ -1,3 +1,6 @@
|
|
5 |
build.support=../build-support-trunk
|
|
6 |
jedit.install.dir=../jedit-trunk/build
|
|
7 |
install.dir=${jedit.install.dir}/jars
|
|
8 |
+compiler.target=1.9
|
|
9 |
+compiler.source=1.9
|
|
10 |
+compiler.extdirs=
|
|
11 |
diff -ru MacOSX-trunk-r24891/CHANGES.txt MacOSX-trunk/CHANGES.txt
|
|
12 |
--- MacOSX-trunk-r24891/CHANGES.txt 2013-09-24 01:12:13.000000000 +0200
|
|
13 |
+++ MacOSX-trunk/CHANGES.txt 2018-10-20 15:28:20.068978715 +0200
|
|
14 |
@@ -1,3 +1,6 @@
|
|
15 |
+Mac OS X Plugin 1.4 [Makarius]
|
|
16 |
+- Updates for Java 9: use java.awt.Desktop instead of old com.apple.eawt.Application / OSXAdapter.
|
|
17 |
+
|
|
18 |
Mac OS X Plugin 1.3 [Alan Ezust]
|
|
19 |
- Updates for Java 7 and jEdit 5.2
|
|
20 |
- Got rid of alternative dispatcher stuff which was workaround for Java 5 bugs.
|
|
21 |
diff -ru MacOSX-trunk-r24891/docs/MacOSX.html MacOSX-trunk/docs/MacOSX.html
|
|
22 |
--- MacOSX-trunk-r24891/docs/MacOSX.html 2013-09-19 19:42:51.000000000 +0200
|
|
23 |
+++ MacOSX-trunk/docs/MacOSX.html 2018-10-20 15:09:33.726059959 +0200
|
|
24 |
@@ -16,8 +16,8 @@
|
|
25 |
<td valign="TOP"><strong><font size="+2">jEdit Mac OS X Plugin</font></strong></td>
|
|
26 |
<td valign="TOP" align="RIGHT">
|
|
27 |
<font size="-1">
|
|
28 |
- <strong>Version 1.3 </strong>
|
|
29 |
- <br/> By Seph M. Soliman and Alan Ezust
|
|
30 |
+ <strong>Version 1.4 </strong>
|
|
31 |
+ <br/> By Seph M. Soliman, Alan Ezust, Makarius
|
|
32 |
<br/> $Date: 2013-09-19 17:42:51 +0000 (Thu, 19 Sep 2013) $
|
|
33 |
</font>
|
|
34 |
</td>
|
|
35 |
diff -ru MacOSX-trunk-r24891/macosx/MacOSXPlugin.java MacOSX-trunk/macosx/MacOSXPlugin.java
|
|
36 |
--- MacOSX-trunk-r24891/macosx/MacOSXPlugin.java 2013-09-20 02:51:27.000000000 +0200
|
|
37 |
+++ MacOSX-trunk/macosx/MacOSXPlugin.java 2018-10-20 13:33:25.272004064 +0200
|
|
38 |
@@ -25,6 +25,7 @@
|
|
39 |
//{{{ Imports
|
|
40 |
import java.awt.event.InputEvent;
|
|
41 |
|
|
42 |
+import java.awt.Desktop;
|
|
43 |
import javax.swing.*;
|
|
44 |
import java.util.regex.Pattern;
|
|
45 |
import java.io.File;
|
|
46 |
@@ -59,17 +60,13 @@
|
|
47 |
{
|
|
48 |
try
|
|
49 |
{
|
|
50 |
- MacOSXPlugin listener = MacOSXPlugin.this;
|
|
51 |
- Class theClass = listener.getClass();
|
|
52 |
-
|
|
53 |
- // Generate and register the OSXAdapter, passing it a hash of all the methods we wish to
|
|
54 |
- // use as delegates for various com.apple.eawt.ApplicationListener methods
|
|
55 |
- OSXAdapter.setQuitHandler(listener, theClass.getDeclaredMethod("handleQuit", (Class[])null));
|
|
56 |
- OSXAdapter.setAboutHandler(listener, theClass.getDeclaredMethod("handleAbout", (Class[])null));
|
|
57 |
- OSXAdapter.setPreferencesHandler(listener, theClass.getDeclaredMethod("handlePreferences", (Class[])null));
|
|
58 |
- OSXAdapter.setFileHandler(listener, theClass.getDeclaredMethod("handleOpenFile", new Class[] { String.class }));
|
|
59 |
- OSXAdapter.setReOpenApplicationHandler(listener, theClass.getDeclaredMethod("handleReOpenApplication", (Class[])null));
|
|
60 |
-
|
|
61 |
+ Desktop desktop = Desktop.getDesktop();
|
|
62 |
+
|
|
63 |
+ desktop.setQuitHandler((e, r) -> { handleQuit(); r.cancelQuit(); });
|
|
64 |
+ desktop.setAboutHandler((e) -> handleAbout());
|
|
65 |
+ desktop.setPreferencesHandler((e) -> handlePreferences());
|
|
66 |
+ desktop.setOpenFileHandler((e) -> { for (File f : e.getFiles()) handleOpenFile(f); });
|
|
67 |
+
|
|
68 |
String lf = jEdit.getProperty("lookAndFeel");
|
|
69 |
if(lf != null && lf.length() != 0)
|
|
70 |
{
|
|
71 |
@@ -86,7 +83,7 @@
|
|
72 |
}
|
|
73 |
catch (Exception e)
|
|
74 |
{
|
|
75 |
- Log.log(Log.ERROR, this, "Error while loading the OSXAdapter:", e);
|
|
76 |
+ Log.log(Log.ERROR, this, "Error while configuring MacOSX support:", e);
|
|
77 |
}
|
|
78 |
}
|
|
79 |
};
|
|
80 |
@@ -109,7 +106,7 @@
|
|
81 |
//JOptionPane.showMessageDialog(null, jEdit.getProperty("MacOSXPlugin.dialog.unload.message"), jEdit.getProperty("MacOSXPlugin.dialog.unload.title"), 1);
|
|
82 |
}
|
|
83 |
|
|
84 |
- // General quit handler; fed to the OSXAdapter as the method to call when a system quit event occurs
|
|
85 |
+ // General quit handler; the method to call when a system quit event occurs
|
|
86 |
// A quit event is triggered by Cmd-Q, selecting Quit from the application or Dock menu, or logging out
|
|
87 |
public boolean handleQuit()
|
|
88 |
{
|
|
89 |
@@ -122,16 +119,14 @@
|
|
90 |
new CombinedOptions(jEdit.getActiveView());
|
|
91 |
}
|
|
92 |
|
|
93 |
- // General info dialog; fed to the OSXAdapter as the method to call when
|
|
94 |
- // "About OSXAdapter" is selected from the application menu
|
|
95 |
+ // General info dialog; the method to call when "About" is selected from the application menu
|
|
96 |
public void handleAbout()
|
|
97 |
{
|
|
98 |
new AboutDialog(jEdit.getActiveView());
|
|
99 |
}
|
|
100 |
|
|
101 |
- public void handleOpenFile(String filepath)
|
|
102 |
+ public void handleOpenFile(File file)
|
|
103 |
{
|
|
104 |
- File file = new File(filepath);
|
|
105 |
if(file.exists())
|
|
106 |
{
|
|
107 |
if(file.isDirectory())
|
|
108 |
@@ -152,7 +147,7 @@
|
|
109 |
}
|
|
110 |
|
|
111 |
if (jEdit.openFile(view, file.getPath()) == null)
|
|
112 |
- Log.log(Log.ERROR, this, "Unable to open file: " + filepath);
|
|
113 |
+ Log.log(Log.ERROR, this, "Unable to open file: " + file.getPath());
|
|
114 |
}
|
|
115 |
else
|
|
116 |
{
|
|
117 |
@@ -161,7 +156,7 @@
|
|
118 |
}
|
|
119 |
else
|
|
120 |
{
|
|
121 |
- Log.log(Log.ERROR, this, "Cannot open non-existing file: " + filepath);
|
|
122 |
+ Log.log(Log.ERROR, this, "Cannot open non-existing file: " + file.getPath());
|
|
123 |
}
|
|
124 |
|
|
125 |
}
|
|
126 |
Only in MacOSX-trunk-r24891/macosx: OSXAdapter.java
|
|
127 |
diff -ru MacOSX-trunk-r24891/MacOSX.props MacOSX-trunk/MacOSX.props
|
|
128 |
--- MacOSX-trunk-r24891/MacOSX.props 2013-09-24 01:12:13.000000000 +0200
|
|
129 |
+++ MacOSX-trunk/MacOSX.props 2018-10-20 15:20:44.362204710 +0200
|
|
130 |
@@ -5,8 +5,8 @@
|
|
131 |
# Plugin info
|
|
132 |
#
|
|
133 |
plugin.macosx.MacOSXPlugin.name=Mac OS X Support
|
|
134 |
-plugin.macosx.MacOSXPlugin.author=Seph Soliman, Alan Ezust
|
|
135 |
-plugin.macosx.MacOSXPlugin.version=1.3
|
|
136 |
+plugin.macosx.MacOSXPlugin.author=Seph Soliman, Alan Ezust, Makarius
|
|
137 |
+plugin.macosx.MacOSXPlugin.version=1.4
|
|
138 |
plugin.macosx.MacOSXPlugin.docs=docs/MacOSX.html
|
|
139 |
plugin.macosx.MacOSXPlugin.description=Provides better MacOS X integration through features such as better CMD-key mapping, drag-and-drop from Finder and more.
|
|
140 |
plugin.macosx.MacOSXPlugin.longdescription=description.html
|
|
141 |
@@ -15,7 +15,7 @@
|
|
142 |
# Dependencies
|
|
143 |
#
|
|
144 |
plugin.macosx.MacOSXPlugin.depend.0=jedit 05.01.99.00
|
|
145 |
-plugin.macosx.MacOSXPlugin.depend.1=jdk 1.6
|
|
146 |
+plugin.macosx.MacOSXPlugin.depend.1=jdk 1.9
|
|
147 |
|
|
148 |
MacOSXPlugin.depend.os.name=Mac OS X
|
|
149 |
MacOSXPlugin.depend.mrj.version=99
|