@@ -937,14 +937,14 @@ public void populateToolsMenu(JMenu toolsMenu) {
937937 }
938938 toolsMenu .addSeparator ();
939939
940- if (coreTools .size () > 0 ) {
940+ if (! coreTools .isEmpty () ) {
941941 for (Tool tool : coreTools ) {
942942 toolsMenu .add (createToolItem (tool ));
943943 }
944944 toolsMenu .addSeparator ();
945945 }
946946
947- if (contribTools .size () > 0 ) {
947+ if (! contribTools .isEmpty () ) {
948948 for (Tool tool : contribTools ) {
949949 toolsMenu .add (createToolItem (tool ));
950950 }
@@ -1032,18 +1032,23 @@ public List<ExamplesContribution> getContribExamples() {
10321032 }
10331033
10341034
1035+ /**
1036+ * Get all the contributed Modes, Libraries, Tools, and Examples
1037+ * so that they can be reported for an update check.
1038+ */
10351039 private Set <Contribution > getInstalledContribs () {
10361040 List <ModeContribution > modeContribs = getModeContribs ();
10371041 Set <Contribution > contributions = new HashSet <>(modeContribs );
10381042
10391043 for (ModeContribution modeContrib : modeContribs ) {
10401044 Mode mode = modeContrib .getMode ();
1041- contributions .addAll (new ArrayList <>(mode .contribLibraries ));
1045+ contributions .addAll (mode .contribLibraries );
1046+ contributions .addAll (mode .foundationLibraries );
10421047 }
10431048
1044- // how is this different from getToolContribs()?
1045- // TODO this duplicates code in Editor, but it's not editor-specific
1046- contributions .addAll (ToolContribution . loadAll ( getSketchbookToolsFolder ()) );
1049+ // For 4.1.2, not reloading all the tools here. Just in case it causes a
1050+ // regression b/c it's not clear why it was written that way. [fry 230110]
1051+ contributions .addAll (contribTools );
10471052
10481053 contributions .addAll (getContribExamples ());
10491054 return contributions ;
0 commit comments