@@ -604,34 +604,38 @@ public void run() {
604
604
}
605
605
606
606
public static void checkandDelete (String url ) {
607
- Alert alert = new Alert (AlertType .CONFIRMATION );
608
- alert .setTitle ("Are you sure you have published all your work?" );
609
- alert .setHeaderText ("This will wipe out the local cache for " + url );
610
- alert .setContentText ("All files that are not published will be deleted" );
611
- Node root = alert .getDialogPane ();
612
- Stage stage = (Stage ) alert .getDialogPane ().getScene ().getWindow ();
613
- stage .setOnCloseRequest (ev -> alert .hide ());
614
- FontSizeManager .addListener (fontNum -> {
615
- int tmp = fontNum - 10 ;
616
- if (tmp < 12 )
617
- tmp = 12 ;
618
- root .setStyle ("-fx-font-size: " + tmp + "pt" );
619
- alert .getDialogPane ().applyCss ();
620
- alert .getDialogPane ().layout ();
621
- stage .sizeToScene ();
607
+ BowlerStudio .runLater (() -> {
608
+
609
+ Alert alert = new Alert (AlertType .CONFIRMATION );
610
+ alert .setTitle ("Are you sure you have published all your work?" );
611
+ alert .setHeaderText ("This will wipe out the local cache for " + url );
612
+ alert .setContentText ("All files that are not published will be deleted" );
613
+ Node root = alert .getDialogPane ();
614
+ Stage stage = (Stage ) alert .getDialogPane ().getScene ().getWindow ();
615
+ stage .setOnCloseRequest (ev -> alert .hide ());
616
+ FontSizeManager .addListener (fontNum -> {
617
+ int tmp = fontNum - 10 ;
618
+ if (tmp < 12 )
619
+ tmp = 12 ;
620
+ root .setStyle ("-fx-font-size: " + tmp + "pt" );
621
+ alert .getDialogPane ().applyCss ();
622
+ alert .getDialogPane ().layout ();
623
+ stage .sizeToScene ();
624
+ });
625
+ Optional <ButtonType > result = alert .showAndWait ();
626
+ if (result .get () == ButtonType .OK ) {
627
+ new Thread (() -> {
628
+ ScriptingEngine .deleteRepo (url );
629
+ BowlerStudioMenuWorkspace .remove (url );
630
+ BowlerStudio .runLater (() -> {
631
+ BowlerStudioMenuWorkspace .sort ();
632
+ });
633
+ }).start ();
634
+ } else {
635
+ com .neuronrobotics .sdk .common .Log .error ("Nothing was deleted" );
636
+ }
637
+
622
638
});
623
- Optional <ButtonType > result = alert .showAndWait ();
624
- if (result .get () == ButtonType .OK ) {
625
- new Thread (() -> {
626
- ScriptingEngine .deleteRepo (url );
627
- BowlerStudioMenuWorkspace .remove (url );
628
- BowlerStudio .runLater (() -> {
629
- BowlerStudioMenuWorkspace .sort ();
630
- });
631
- }).start ();
632
- } else {
633
- com .neuronrobotics .sdk .common .Log .error ("Nothing was deleted" );
634
- }
635
639
}
636
640
637
641
private static MenuResettingEventHandler createLoadCommitsEvent (String url , Menu orgCommits ) {
@@ -665,7 +669,7 @@ public void handle(Event event) {
665
669
try {
666
670
ScriptingEngine .checkout (url , branchName );
667
671
668
- ScriptingEngine .openGit (url ,git -> {
672
+ ScriptingEngine .openGit (url , git -> {
669
673
Repository repo = git .getRepository ();
670
674
// com.neuronrobotics.sdk.common.Log.error("Commits of branch: " + branchName);
671
675
// com.neuronrobotics.sdk.common.Log.error("-------------------------------------");
@@ -687,8 +691,8 @@ public void handle(Event event) {
687
691
// RevCommit previous = null;
688
692
for (RevCommit commit : commitsList ) {
689
693
String date = format .format (new Date (commit .getCommitTime () * 1000L ));
690
- String fullData = commit .getName () + "\r \n " + commit .getAuthorIdent ().getName () + " \r \n "
691
- + date + "\r \n " + commit .getFullMessage () + "\r \n "
694
+ String fullData = commit .getName () + "\r \n " + commit .getAuthorIdent ().getName ()
695
+ + " \r \n " + date + "\r \n " + commit .getFullMessage () + "\r \n "
692
696
+ "---------------------------------------------------\r \n " ;// +
693
697
// previous==null?"":getDiffOfCommit(previous,commit, repo, git);
694
698
@@ -704,7 +708,8 @@ public void handle(Event event) {
704
708
tmp .setOnAction (ev -> {
705
709
new Thread () {
706
710
public void run () {
707
- com .neuronrobotics .sdk .common .Log .error ("Selecting \r \n \r \n " + fullData );
711
+ com .neuronrobotics .sdk .common .Log
712
+ .error ("Selecting \r \n \r \n " + fullData );
708
713
709
714
String branch ;
710
715
try {
@@ -726,9 +731,11 @@ public void run() {
726
731
ScriptingEngine .setCommitContentsAsCurrent (url ,
727
732
slugify , commit );
728
733
} catch (IOException e ) {
729
- exp .uncaughtException (Thread .currentThread (), e );
734
+ exp .uncaughtException (Thread .currentThread (),
735
+ e );
730
736
} catch (GitAPIException e ) {
731
- exp .uncaughtException (Thread .currentThread (), e );
737
+ exp .uncaughtException (Thread .currentThread (),
738
+ e );
732
739
}
733
740
}
734
741
}.start ();
@@ -745,8 +752,6 @@ public void run() {
745
752
}
746
753
});
747
754
748
-
749
-
750
755
BowlerStudio .runLater (() -> {
751
756
orgCommits .hide ();
752
757
BowlerStudio .runLater (() -> {
@@ -1619,21 +1624,21 @@ public void onLogin(String arg0) {
1619
1624
try {
1620
1625
int i = currentIndex + 1 ;
1621
1626
1622
- double percent =((double )i )/ ((double )finalIndex )* 100 ;
1623
- String x = intermediateShape .getName () + " " + type .trim () + " " + String .format ("%.1f" , percent )+ "% finished : " + i + " of "
1624
- + finalIndex ;
1627
+ double percent = ((double ) i ) / ((double ) finalIndex ) * 100 ;
1628
+ String x = intermediateShape .getName () + " " + type .trim () + " " + String .format ("%.1f" , percent )
1629
+ + "% finished : " + i + " of " + finalIndex ;
1625
1630
if (showCSGProgress .isSelected ()) {
1626
1631
System .out .println (x );
1627
- if (finalIndex > 50 ) {
1628
- if (percent > 90 ) {
1632
+ if (finalIndex > 50 ) {
1633
+ if (percent > 90 ) {
1629
1634
SplashManager .closeSplash ();
1630
- }else {
1631
- SplashManager .renderSplashFrame ((int )percent , x );
1635
+ } else {
1636
+ SplashManager .renderSplashFrame ((int ) percent , x );
1632
1637
}
1633
- }else {
1638
+ } else {
1634
1639
SplashManager .closeSplash ();
1635
1640
}
1636
- }else
1641
+ } else
1637
1642
com .neuronrobotics .sdk .common .Log .error (x );
1638
1643
} catch (Exception ex ) {
1639
1644
ex .printStackTrace ();
@@ -1655,8 +1660,8 @@ public void onLogin(String arg0) {
1655
1660
// }
1656
1661
// });
1657
1662
Runnable r = () -> {
1658
- boolean parseBoolean = Boolean
1659
- .parseBoolean ( ConfigurationDatabase . getObject ("MenueSettings" , "CSG_Advanced_STL" , CSG .isPreventNonManifoldTriangles ()).toString ());
1663
+ boolean parseBoolean = Boolean . parseBoolean ( ConfigurationDatabase
1664
+ .getObject ("MenueSettings" , "CSG_Advanced_STL" , CSG .isPreventNonManifoldTriangles ()).toString ());
1660
1665
CSG .setPreventNonManifoldTriangles (parseBoolean );
1661
1666
useAdvancedSTL .setSelected (parseBoolean );
1662
1667
showCSGProgress .setSelected (Boolean
@@ -1665,7 +1670,7 @@ public void onLogin(String arg0) {
1665
1670
new Thread (r ).start ();
1666
1671
1667
1672
CreatureLab3dController .getEngine ().setControls (showRuler , idlespin , autohighlight );
1668
- WindowMenu .getItems ().addAll (showRuler , idlespin , autohighlight , showCSGProgress ,useAdvancedSTL );
1673
+ WindowMenu .getItems ().addAll (showRuler , idlespin , autohighlight , showCSGProgress , useAdvancedSTL );
1669
1674
1670
1675
new Thread () {
1671
1676
public void run () {
0 commit comments