| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -268,7 +268,8 @@ static public boolean isCommandLine() { | |||
| 268 | 268 | ||
| 269 | 269 | ||
| 270 | 270 | public Base(String[] args) throws Exception { | |
| 271 | - ContributionManager.cleanup(this); | ||
| 271 | + ContributionManager.init(this); | ||
| 272 | + | ||
| 272 | 273 | buildCoreModes(); | |
| 273 | 274 | rebuildContribModes(); | |
| 274 | 275 | rebuildContribExamples(); | |
@@ -686,7 +687,7 @@ public void populateToolsMenu(JMenu toolsMenu) { | |||
| 686 | 687 | JMenuItem item = new JMenuItem(Language.text("menu.tools.add_tool")); | |
| 687 | 688 | item.addActionListener(new ActionListener() { | |
| 688 | 689 | public void actionPerformed(ActionEvent e) { | |
| 689 | - ContributionManager.openToolManager(getActiveEditor()); | ||
| 690 | + ContributionManager.openTools(); | ||
| 690 | 691 | } | |
| 691 | 692 | }); | |
| 692 | 693 | toolsMenu.add(item); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -416,7 +416,7 @@ public void actionPerformed(ActionEvent e) { | |||
| 416 | 416 | item = new JMenuItem(Language.text("examples.add_examples")); | |
| 417 | 417 | item.addActionListener(new ActionListener() { | |
| 418 | 418 | public void actionPerformed(ActionEvent e) { | |
| 419 | - ContributionManager.openExampleManager(base.getActiveEditor()); | ||
| 419 | + ContributionManager.openExamples(); | ||
| 420 | 420 | } | |
| 421 | 421 | }); | |
| 422 | 422 | toolbarMenu.add(item); | |
@@ -492,7 +492,7 @@ public void rebuildImportMenu() { //JMenu importMenu) { | |||
| 492 | 492 | JMenuItem addLib = new JMenuItem(Language.text("menu.library.add_library")); | |
| 493 | 493 | addLib.addActionListener(new ActionListener() { | |
| 494 | 494 | public void actionPerformed(ActionEvent e) { | |
| 495 | - ContributionManager.openLibraryManager(base.getActiveEditor()); | ||
| 495 | + ContributionManager.openLibraries(); | ||
| 496 | 496 | } | |
| 497 | 497 | }); | |
| 498 | 498 | importMenu.add(addLib); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -180,7 +180,7 @@ protected boolean promptToOpenContributionManager() { | |||
| 180 | 180 | options, | |
| 181 | 181 | options[0]); | |
| 182 | 182 | if (result == JOptionPane.YES_OPTION) { | |
| 183 | - ContributionManager.openUpdates(base.getActiveEditor()); | ||
| 183 | + ContributionManager.openUpdates(); | ||
| 184 | 184 | return true; | |
| 185 | 185 | } | |
| 186 | 186 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,7 +30,6 @@ | |||
| 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 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments