Skip to content

Commit c414b5e

Browse files
committed
Upgrade joda-time to 2.14.0
1 parent 4f915f1 commit c414b5e

File tree

5 files changed

+41
-38
lines changed

5 files changed

+41
-38
lines changed

.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<classpathentry exported="true" kind="lib" path="lib/AppleJavaExtensions.jar"/>
1818
<classpathentry exported="true" kind="lib" path="lib/jflex-full-1.8.2.jar" sourcepath="libsrc/jflex-1.8.2.zip"/>
1919
<classpathentry exported="true" kind="lib" path="lib/xom-1.3.9.jar" sourcepath="libsrc/xom-1.3.9-sources.jar"/>
20-
<classpathentry exported="true" kind="lib" path="lib/joda-time-2.13.0.jar" sourcepath="libsrc/joda-time-2.13.0-sources.zip"/>
20+
<classpathentry exported="true" kind="lib" path="lib/joda-time-2.14.0.jar" sourcepath="libsrc/joda-time-2.14.0.zip"/>
2121
<classpathentry exported="true" kind="lib" path="lib/jollyday-0.4.9.jar" sourcepath="libsrc/jollyday-0.4.9-sources.jar"/>
2222
<classpathentry exported="true" kind="lib" path="lib/commons-lang3-3.1.jar" sourcepath="libsrc/commons-lang3-3.1-sources.jar"/>
2323
<classpathentry exported="true" kind="lib" path="lib/protobuf-java-3.25.5.jar" sourcepath="libsrc/protobuf-java-3.25.5-sources.jar"/>

lib/README

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,20 +245,20 @@ LAST UPDATE: 2020-11-04
245245
LAST UPDATE BY: John Bauer
246246

247247
-----------------------------------------------------------------------
248-
joda-time-2.13.0.jar
249-
ORIGINAL JAR NAME: joda-time-2.13.0.jar
250-
VERSION: 2.13.0
251-
RELEASE DATE: 2024-09-15
248+
joda-time-2.14.0.jar
249+
ORIGINAL JAR NAME: joda-time-2.14.0.jar
250+
VERSION: 2.14.0
251+
RELEASE DATE: 2025-03-30
252252
SOURCE AVAILABLE: yes
253-
DESCRIPTION: Extended date/time API that handles partial dates/times
253+
DESCRIPTION: Extended date/time API that handles partial dates/times (but designed for pre-Java 8 baseline)
254254
URL: https://github.com/JodaOrg/joda-time/releases
255255
formerly http://joda-time.sourceforge.net/index.html
256256

257257
USED BY: edu.stanford.nlp.time
258258
Needed by CoreNLP distributions.
259259

260-
LAST UPDATE: 2024-10-18
261-
LAST UPDATE BY: John Bauer
260+
LAST UPDATE: 2025-06-27
261+
LAST UPDATE BY: Christopher Maning
262262

263263
-----------------------------------------------------------------------
264264
jollyday-0.4.9.jar
624 KB
Binary file not shown.
1.42 MB
Binary file not shown.
Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
11
package edu.stanford.nlp.trees.tregex.gui;
22

3-
import com.apple.eawt.ApplicationAdapter;
4-
import com.apple.eawt.ApplicationEvent;
53

4+
import java.awt.*;
65

76
/**
8-
* Class to load OSX specific settings for TregexGUI. Made by consulting the Apple sample code
9-
* for a similar (and identically named) class at http://devworld.apple.com/samplecode/OSXAdapter/index.html.
7+
* Class to load macOS-specific settings for TregexGUI. This was initially written to use the (pre-2014, OS X)
8+
* {@code com.apple.eawt.*} library (AppleJavaExtensions.jar), but now uses the Java 9+ methods in
9+
* the {@code java.awt.Desktop} class.
10+
*
1011
* @author rafferty
12+
* @author Christopher Manning
1113
*
1214
*/
13-
public class OSXAdapter extends ApplicationAdapter {
15+
public class OSXAdapter {
1416

1517
private static OSXAdapter adapter;
16-
private static com.apple.eawt.Application app;
18+
private static Desktop desktop;
19+
private static TregexGUI mainApp;
20+
1721

18-
private TregexGUI mainApp;
19-
2022
private OSXAdapter (TregexGUI inApp) {
2123
mainApp = inApp;
2224
}
2325

2426
// implemented handler methods. These are basically hooks into existing
2527
// functionality from the main app, as if it came over from another platform.
26-
@Override
27-
public void handleAbout(ApplicationEvent ae) {
28+
29+
public void handleAbout() {
2830
if (mainApp != null) {
29-
ae.setHandled(true);
31+
// ae.setHandled(true);
3032
mainApp.about();
3133
} else {
3234
throw new IllegalStateException("handleAbout: TregexGUI instance detached from listener");
3335
}
3436
}
3537

36-
@Override
37-
public void handlePreferences(ApplicationEvent ae) {
38+
public void handlePreferences() {
3839
if (mainApp != null) {
3940
mainApp.doPreferences();
40-
ae.setHandled(true);
41+
// ae.setHandled(true);
4142
} else {
4243
throw new IllegalStateException("handlePreferences: TregexGUI instance detached from listener");
4344
}
4445
}
4546

46-
@Override
47-
public void handleQuit(ApplicationEvent ae) {
47+
public void handleQuit() {
4848
if (mainApp != null) {
4949
/*
5050
/ You MUST setHandled(false) if you want to delay or cancel the quit.
@@ -53,35 +53,38 @@ public void handleQuit(ApplicationEvent ae) {
5353
/ on all platforms. This example simply cancels the AppleEvent-based quit and
5454
/ defers to that universal method.
5555
*/
56-
ae.setHandled(false);
56+
// ae.setHandled(false);
5757
TregexGUI.doQuit();
5858
} else {
5959
throw new IllegalStateException("handleQuit: TregexGUI instance detached from listener");
6060
}
6161
}
6262

63-
64-
// The main entry-point for this functionality. This is the only method
65-
// that needs to be called at runtime, and it can easily be done using
66-
// reflection (see MyApp.java)
67-
public static void registerMacOSXApplication(TregexGUI inApp) {
68-
if (app == null) {
69-
app = new com.apple.eawt.Application();
70-
}
63+
64+
/** The main method for this macOS-specific functionality. */
65+
public static void registerMacOSApplication(TregexGUI inApp) {
66+
System.setProperty( "apple.laf.useScreenMenuBar", "true" );
67+
System.setProperty( "apple.awt.application.name", "TregexGUI" );
68+
System.setProperty( "apple.awt.application.appearance", "system" );
69+
// if (app == null) {
70+
// app = new com.apple.eawt.Application();
71+
// }
7172

7273
if (adapter == null) {
7374
adapter = new OSXAdapter(inApp);
7475
}
75-
app.addApplicationListener(adapter);
76+
// app.addApplicationListener(adapter);
7677
}
7778

7879
// Another static entry point for EAWT functionality. Enables the
7980
// "Preferences..." menu item in the application menu.
8081
public static void enablePrefs(boolean enabled) {
81-
if (app == null) {
82-
app = new com.apple.eawt.Application();
83-
}
84-
app.setEnabledPreferencesMenu(enabled);
82+
System.setProperty( "apple.laf.useScreenMenuBar", "true" );
83+
System.setProperty( "apple.awt.application.name", "TregexGUI" );
84+
// if (app == null) {
85+
// app = new com.apple.eawt.Application();
86+
// }
87+
// app.setEnabledPreferencesMenu(enabled);
8588
}
8689

8790
}

0 commit comments

Comments
 (0)