Skip to content

Commit c66ab09

Browse files
committed
Cleaned up code to install contributions
1 parent 075a319 commit c66ab09

File tree

7 files changed

+317
-370
lines changed

7 files changed

+317
-370
lines changed

app/src/processing/app/Base.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public class Base {
116116

117117
private Mode defaultMode;
118118
private Mode[] coreModes;
119-
private List<ModeContribution> contribModes;
119+
List<ModeContribution> contribModes;
120120

121121
private JMenu sketchbookMenu;
122122

@@ -341,7 +341,7 @@ void rebuildContribModes() {
341341
contribModes = new ArrayList<ModeContribution>();
342342

343343
ArrayList<ModeContribution> newContribs = ModeContribution
344-
.list(this, getSketchbookModesFolder(), false);
344+
.list(this, getSketchbookModesFolder());
345345
for (ModeContribution contrib : newContribs) {
346346
if (!contribModes.contains(contrib)) {
347347
if (contrib.instantiateModeClass()) {
@@ -358,7 +358,7 @@ public Base(String[] args) {
358358
// Delete all modes and tools that have been flagged for deletion before
359359
// they are initialized by an editor.
360360
ArrayList<InstalledContribution> contribs = new ArrayList<InstalledContribution>();
361-
contribs.addAll(ModeContribution.list(this, getSketchbookModesFolder(), false));
361+
contribs.addAll(ModeContribution.list(this, getSketchbookModesFolder()));
362362
contribs.addAll(ToolContribution.list(getSketchbookToolsFolder(), false));
363363
for (InstalledContribution contrib : contribs) {
364364
if (ContributionManager.isFlaggedForDeletion(contrib)) {
@@ -1610,14 +1610,6 @@ public void handleShowUpdates() {
16101610
updateManagerFrame.showFrame(activeEditor);
16111611
}
16121612

1613-
/**
1614-
* Installed the libraries in the given file after a confirmation from the
1615-
* user. Returns the number of libraries installed.
1616-
*/
1617-
public boolean handleConfirmAndInstallLibrary(File libFile) {
1618-
return ContributionManager.confirmAndInstallLibrary(activeEditor, libFile, null) != null;
1619-
}
1620-
16211613
// ...................................................................
16221614

16231615

0 commit comments

Comments
 (0)