File tree Expand file tree Collapse file tree 9 files changed +19
-112
lines changed
src/main/java/org/glavo/viewer/gui Expand file tree Collapse file tree 9 files changed +19
-112
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ plugins {
1515}
1616
1717group ' org.glavo'
18- version ' 3.5 '
18+ version ' 3.6 '
1919
2020modularity. mixedJavaRelease 8
2121
@@ -61,29 +61,11 @@ jlink {
6161 ' --compress' , ' 1' ,
6262 ' --no-header-files' ,
6363 ' --no-man-pages'
64-
65- if (file( " launcher/ ${ jforeign.Platform.PLATFORM } " ) . exists()) {
64+ if ( jforeign.Platform . isWindows()) {
65+ addOptions ' --strip-native-commands '
6666 project. tasks. getByName(' jlink' ). doLast {
67- delete {
68- delete " $imageDir /bin/ClassViewer" ,
69- " $imageDir /bin/ClassViewer.bat"
70- }
71- copy {
72- from " launcher/${ jforeign.Platform.PLATFORM} "
73- into " $imageDir /bin"
74- }
75- }
76-
77- } else {
78- launcher {
79- name = ' ClassViewer'
80- }
81- if (! jforeign.Platform . isWindows()) {
82- project. tasks. getByName(' jlink' ). doLast {
83- delete {
84- delete " $imageDir /bin/ClassViewer.bat"
85- }
86- }
67+ delete " $imageDir /bin/ClassViewer"
68+ delete " $imageDir /bin/ClassViewer.bat"
8769 }
8870 }
89- }
71+ }
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1212import java .util .*;
1313
1414public final class Options {
15- public static boolean color = true ;
15+ public static boolean color = false ;
1616 public static boolean debug = false ;
1717 public static boolean useSystemTilteBar = true ;
1818 public static String skin = null ;
@@ -49,6 +49,7 @@ public static void init() {
4949 }
5050
5151 RecentFiles .init ();
52+ Log .info ("loading finished" );
5253 }
5354
5455 public static void init (Properties ... properties ) {
Original file line number Diff line number Diff line change 1616
1717public final class RecentFiles {
1818
19- public static final RecentFiles Instance = new RecentFiles () ;
19+ public static RecentFiles Instance = null ;
2020
2121 public static void init () {
22-
22+ Instance = new RecentFiles ();
2323 }
2424
2525 private final List <RecentFile > list = Collections .synchronizedList (new LinkedList <>());
@@ -115,7 +115,7 @@ private void load() {
115115 Path p = Options .path .resolve ("recentfiles" );
116116
117117 if (Files .notExists (p )) {
118- Log .warning ("Recent files not exists" );
118+ Log .info ("Recent files not exists" );
119119 return ;
120120 }
121121 Log .info ("Load recent files from file: " + p );
@@ -132,8 +132,8 @@ private void load() {
132132 });
133133 }
134134
135- } catch (IOException e ) {
136- ViewerAlert . logAndShowExceptionAlert (e );
135+ } catch (Throwable e ) {
136+ Log . error (e );
137137 }
138138 }
139139}
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ public final class Viewer extends Application {
2525
2626 public static void main (String [] args ) {
2727 Options .init ();
28+ Log .info ("launch application" );
2829 Application .launch (Viewer .class , args );
2930 }
3031
@@ -38,6 +39,7 @@ public static void main(String[] args) {
3839 @ Override
3940 public void init () throws Exception {
4041 Application .setUserAgentStylesheet (Options .skin );
42+ Log .info ("info " + this );
4143 }
4244
4345 @ Override
@@ -82,6 +84,10 @@ public void start(Stage stage) {
8284 javafx .application .Platform .runLater (() -> openFiles (files ));
8385 }
8486 stage .show ();
87+ stage .setOnCloseRequest (event -> {
88+ Log .info ("close " + this );
89+ });
90+ Log .info ("show " + this );
8591 }
8692
8793 public void openFile () {
You can’t perform that action at this time.
0 commit comments