|
30 | 30 | import processing.app.Base; |
31 | 31 | import processing.app.Language; |
32 | 32 | import processing.app.Messages; |
33 | | -import processing.app.Settings; |
34 | 33 | import processing.app.Util; |
35 | 34 | import processing.app.ui.Editor; |
36 | 35 | import processing.core.PApplet; |
@@ -481,7 +480,7 @@ static public String getFileName(File libFile) { |
481 | 480 | * and remove any "requires restart" flags. |
482 | 481 | * Also updates all entries previously marked for update. |
483 | 482 | */ |
484 | | - static public void cleanup(final Base base) throws Exception { |
| 483 | + static private void cleanup(final Base base) throws Exception { |
485 | 484 | deleteTemp(Base.getSketchbookModesFolder()); |
486 | 485 | deleteTemp(Base.getSketchbookToolsFolder()); |
487 | 486 |
|
@@ -649,47 +648,52 @@ public boolean accept(File folder) { |
649 | 648 | // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
650 | 649 |
|
651 | 650 |
|
652 | | - static ManagerFrame managerDialog = |
653 | | - new ManagerFrame(); |
| 651 | + static ManagerFrame managerDialog; |
| 652 | + |
| 653 | + |
| 654 | + static public void init(Base base) throws Exception { |
| 655 | + managerDialog = new ManagerFrame(base); |
| 656 | + cleanup(base); |
| 657 | + } |
654 | 658 |
|
655 | 659 |
|
656 | 660 | /** |
657 | 661 | * Show the Library installer window. |
658 | 662 | */ |
659 | | - static public void openLibraryManager(Editor editor) { |
660 | | - managerDialog.showFrame(editor, ContributionType.LIBRARY); |
| 663 | + static public void openLibraries() { |
| 664 | + managerDialog.showFrame(ContributionType.LIBRARY); |
661 | 665 | } |
662 | 666 |
|
663 | 667 |
|
664 | 668 | /** |
665 | | - * Show the Tool installer window. |
| 669 | + * Show the Mode installer window. |
666 | 670 | */ |
667 | | - static public void openToolManager(Editor editor) { |
668 | | - managerDialog.showFrame(editor, ContributionType.TOOL); |
| 671 | + static public void openModes() { |
| 672 | + managerDialog.showFrame(ContributionType.MODE); |
669 | 673 | } |
670 | 674 |
|
671 | 675 |
|
672 | 676 | /** |
673 | | - * Show the Mode installer window. |
| 677 | + * Show the Tool installer window. |
674 | 678 | */ |
675 | | - static public void openModeManager(Editor editor) { |
676 | | - managerDialog.showFrame(editor, ContributionType.MODE); |
| 679 | + static public void openTools() { |
| 680 | + managerDialog.showFrame(ContributionType.TOOL); |
677 | 681 | } |
678 | 682 |
|
679 | 683 |
|
680 | 684 | /** |
681 | 685 | * Show the Examples installer window. |
682 | 686 | */ |
683 | | - static public void openExampleManager(Editor editor) { |
684 | | - managerDialog.showFrame(editor, ContributionType.EXAMPLES); |
| 687 | + static public void openExamples() { |
| 688 | + managerDialog.showFrame(ContributionType.EXAMPLES); |
685 | 689 | } |
686 | 690 |
|
687 | 691 |
|
688 | 692 | /** |
689 | 693 | * Open the updates panel. |
690 | 694 | */ |
691 | | - static public void openUpdates(Editor editor) { |
692 | | - managerDialog.showFrame(editor, null); |
| 695 | + static public void openUpdates() { |
| 696 | + managerDialog.showFrame(null); |
693 | 697 | } |
694 | 698 |
|
695 | 699 |
|
|
0 commit comments